From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from mga17.intel.com ([192.55.52.151]) by Galois.linutronix.de with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1fDfFS-0008Nh-6S for speck@linutronix.de; Wed, 02 May 2018 02:03:54 +0200 Message-Id: Resent-Message-ID: <20180502000347.GB44477@tassilo.jf.intel.com> Resent-To: speck@linutronix.de From: Andi Kleen Date: Mon, 23 Apr 2018 15:57:54 -0700 Subject: [MODERATED] [PATCH 3/6] Patch 3 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit MIME-Version: 1.0 To: speck@linutronix.de List-ID: The L1TF workaround doesn't make any attempt to mitigate speculate accesses to the first physical page for zeroed PTEs. Normally it only contains some data from the early real mode BIOS. I couldn't convince myself we always reserve the first page in all configurations, so add an extra reservation call to make sure it is really reserved. In most configurations (e.g. with the standard reservations) it's likely a nop. Signed-off-by: Andi Kleen --- arch/x86/kernel/setup.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/x86/kernel/setup.c b/arch/x86/kernel/setup.c index 6285697b6e56..fadbd41094d2 100644 --- a/arch/x86/kernel/setup.c +++ b/arch/x86/kernel/setup.c @@ -817,6 +817,9 @@ void __init setup_arch(char **cmdline_p) memblock_reserve(__pa_symbol(_text), (unsigned long)__bss_stop - (unsigned long)_text); + /* Make sure page 0 is always reserved */ + memblock_reserve(0, PAGE_SIZE); + early_reserve_initrd(); /* -- 2.15.0