| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687 |
- From c7ef01f56951b1c876069387c44e11575288f3d2 Mon Sep 17 00:00:00 2001
- From: Vlastimil Babka <[email protected]>
- Date: Tue, 19 Dec 2017 22:33:46 +0100
- Subject: [PATCH 213/232] x86/dumpstack: Indicate in Oops whether PTI is
- configured and enabled
- MIME-Version: 1.0
- Content-Type: text/plain; charset=UTF-8
- Content-Transfer-Encoding: 8bit
- CVE-2017-5754
- CONFIG_PAGE_TABLE_ISOLATION is relatively new and intrusive feature that may
- still have some corner cases which could take some time to manifest and be
- fixed. It would be useful to have Oops messages indicate whether it was
- enabled for building the kernel, and whether it was disabled during boot.
- Example of fully enabled:
- Oops: 0001 [#1] SMP PTI
- Example of enabled during build, but disabled during boot:
- Oops: 0001 [#1] SMP NOPTI
- We can decide to remove this after the feature has been tested in the field
- long enough.
- [ tglx: Made it use boot_cpu_has() as requested by Borislav ]
- Signed-off-by: Vlastimil Babka <[email protected]>
- Signed-off-by: Thomas Gleixner <[email protected]>
- Reviewed-by: Eduardo Valentin <[email protected]>
- Acked-by: Dave Hansen <[email protected]>
- Cc: Andy Lutomirski <[email protected]>
- Cc: Andy Lutomirsky <[email protected]>
- Cc: Boris Ostrovsky <[email protected]>
- Cc: Borislav Petkov <[email protected]>
- Cc: Brian Gerst <[email protected]>
- Cc: Dave Hansen <[email protected]>
- Cc: David Laight <[email protected]>
- Cc: Denys Vlasenko <[email protected]>
- Cc: Greg KH <[email protected]>
- Cc: H. Peter Anvin <[email protected]>
- Cc: Josh Poimboeuf <[email protected]>
- Cc: Juergen Gross <[email protected]>
- Cc: Linus Torvalds <[email protected]>
- Cc: Peter Zijlstra <[email protected]>
- Cc: Will Deacon <[email protected]>
- Cc: [email protected]
- Cc: [email protected]
- Cc: [email protected]
- Cc: [email protected]
- Cc: [email protected]
- Cc: [email protected]
- Signed-off-by: Ingo Molnar <[email protected]>
- (cherry picked from commit 5f26d76c3fd67c48806415ef8b1116c97beff8ba)
- Signed-off-by: Andy Whitcroft <[email protected]>
- Signed-off-by: Kleber Sacilotto de Souza <[email protected]>
- (cherry picked from commit 7edb91fcc96589ad6b80446ec3835f83ffabb710)
- Signed-off-by: Fabian Grünbichler <[email protected]>
- ---
- arch/x86/kernel/dumpstack.c | 6 ++++--
- 1 file changed, 4 insertions(+), 2 deletions(-)
- diff --git a/arch/x86/kernel/dumpstack.c b/arch/x86/kernel/dumpstack.c
- index 2bdeb983b9d8..19a936e9b259 100644
- --- a/arch/x86/kernel/dumpstack.c
- +++ b/arch/x86/kernel/dumpstack.c
- @@ -298,11 +298,13 @@ int __die(const char *str, struct pt_regs *regs, long err)
- unsigned long sp;
- #endif
- printk(KERN_DEFAULT
- - "%s: %04lx [#%d]%s%s%s%s\n", str, err & 0xffff, ++die_counter,
- + "%s: %04lx [#%d]%s%s%s%s%s\n", str, err & 0xffff, ++die_counter,
- IS_ENABLED(CONFIG_PREEMPT) ? " PREEMPT" : "",
- IS_ENABLED(CONFIG_SMP) ? " SMP" : "",
- debug_pagealloc_enabled() ? " DEBUG_PAGEALLOC" : "",
- - IS_ENABLED(CONFIG_KASAN) ? " KASAN" : "");
- + IS_ENABLED(CONFIG_KASAN) ? " KASAN" : "",
- + IS_ENABLED(CONFIG_PAGE_TABLE_ISOLATION) ?
- + (boot_cpu_has(X86_FEATURE_PTI) ? " PTI" : " NOPTI") : "");
-
- if (notify_die(DIE_OOPS, str, regs, err,
- current->thread.trap_nr, SIGSEGV) == NOTIFY_STOP)
- --
- 2.14.2
|