Received: by mail.netbsd.org (Postfix, from userid 605) id A665384D48; Wed, 29 Jan 2020 01:54:35 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by mail.netbsd.org (Postfix) with ESMTP id 2BBDF84D3C for ; Wed, 29 Jan 2020 01:54:35 +0000 (UTC) X-Virus-Scanned: amavisd-new at netbsd.org Received: from mail.netbsd.org ([IPv6:::1]) by localhost (mail.netbsd.org [IPv6:::1]) (amavisd-new, port 10025) with ESMTP id QSRkfafUN2kG for ; Wed, 29 Jan 2020 01:54:34 +0000 (UTC) Received: from cvs.NetBSD.org (ivanova.netbsd.org [199.233.217.197]) by mail.netbsd.org (Postfix) with ESMTP id B0AFB84CFD for ; Wed, 29 Jan 2020 01:54:34 +0000 (UTC) Received: by cvs.NetBSD.org (Postfix, from userid 500) id A55E8FBF4; Wed, 29 Jan 2020 01:54:34 +0000 (UTC) Content-Disposition: inline Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII" MIME-Version: 1.0 Date: Wed, 29 Jan 2020 01:54:34 +0000 From: "Emmanuel Dreyfus" Subject: CVS commit: src/sys/arch/x86/x86 To: source-changes@NetBSD.org X-Mailer: log_accum Message-Id: <20200129015434.A55E8FBF4@cvs.NetBSD.org> Sender: source-changes-owner@NetBSD.org List-Id: source-changes.NetBSD.org Precedence: bulk Reply-To: source-changes-d@NetBSD.org Mail-Reply-To: "Emmanuel Dreyfus" Mail-Followup-To: source-changes-d@NetBSD.org List-Unsubscribe: Module Name: src Committed By: manu Date: Wed Jan 29 01:54:34 UTC 2020 Modified Files: src/sys/arch/x86/x86: x86_machdep.c Log Message: Fix startup crashes caused by wrong memory map handling init_x86_vm() takes the memory map from BIOS and EFI and selects regions suitable for memory allocation. This involves removing areas used by the kernel, but the logic missed some corner cases, which led to possible allocation in regions for which later memory access would cause a panic. The typical panic from this bug in GENERIC is at SVS startup: cpu_svs_init / uvm_pagealloc_strat / pagezero We fix the bug by adding logic for the missing cases of memory regions overlapping with the kernel. While there, add more #idef'ed debug output. To generate a diff of this commit: cvs rdiff -u -r1.134 -r1.135 src/sys/arch/x86/x86/x86_machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.