[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20180115123421.066787195@linuxfoundation.org>
Date: Mon, 15 Jan 2018 13:35:22 +0100
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: linux-kernel@...r.kernel.org
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
stable@...r.kernel.org, Dave Hansen <dave.hansen@...ux.intel.com>,
Andrea Arcangeli <aarcange@...hat.com>,
Thomas Gleixner <tglx@...utronix.de>,
Alan Cox <gnomes@...rguk.ukuu.org.uk>,
Tim Chen <tim.c.chen@...ux.intel.com>,
Jon Masters <jcm@...hat.com>,
Dave Hansen <dave.hansen@...el.com>,
Andi Kleen <andi@...stfloor.org>, Jeff Law <law@...hat.com>,
Paolo Bonzini <pbonzini@...hat.com>,
Linus Torvalds <torvalds@...ux-foundation.org>,
David <dwmw@...zon.co.uk>, Nick Clifton <nickc@...hat.com>,
Greg Kroah-Hartman <gregkh@...ux-foundation.org>
Subject: [PATCH 4.14 095/118] x86/tboot: Unbreak tboot with PTI enabled
4.14-stable review patch. If anyone has any objections, please let me know.
------------------
From: Dave Hansen <dave.hansen@...ux.intel.com>
commit 262b6b30087246abf09d6275eb0c0dc421bcbe38 upstream.
This is another case similar to what EFI does: create a new set of
page tables, map some code at a low address, and jump to it. PTI
mistakes this low address for userspace and mistakenly marks it
non-executable in an effort to make it unusable for userspace.
Undo the poison to allow execution.
Fixes: 385ce0ea4c07 ("x86/mm/pti: Add Kconfig")
Signed-off-by: Dave Hansen <dave.hansen@...ux.intel.com>
Signed-off-by: Andrea Arcangeli <aarcange@...hat.com>
Signed-off-by: Thomas Gleixner <tglx@...utronix.de>
Cc: Alan Cox <gnomes@...rguk.ukuu.org.uk>
Cc: Tim Chen <tim.c.chen@...ux.intel.com>
Cc: Jon Masters <jcm@...hat.com>
Cc: Dave Hansen <dave.hansen@...el.com>
Cc: Andi Kleen <andi@...stfloor.org>
Cc: Jeff Law <law@...hat.com>
Cc: Paolo Bonzini <pbonzini@...hat.com>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Greg Kroah-Hartman <gregkh@...ux-foundation.org>
Cc: David <dwmw@...zon.co.uk>
Cc: Nick Clifton <nickc@...hat.com>
Link: https://lkml.kernel.org/r/20180108102805.GK25546@redhat.com
Signed-off-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
---
arch/x86/kernel/tboot.c | 1 +
1 file changed, 1 insertion(+)
--- a/arch/x86/kernel/tboot.c
+++ b/arch/x86/kernel/tboot.c
@@ -127,6 +127,7 @@ static int map_tboot_page(unsigned long
p4d = p4d_alloc(&tboot_mm, pgd, vaddr);
if (!p4d)
return -1;
+ pgd->pgd &= ~_PAGE_NX;
pud = pud_alloc(&tboot_mm, p4d, vaddr);
if (!pud)
return -1;
Powered by blists - more mailing lists