]> git.proxmox.com Git - pve-kernel.git/blob - patches/kernel/0064-x86-unwind-Make-CONFIG_UNWINDER_ORC-y-the-default-in.patch
KPTI: add follow-up fixes
[pve-kernel.git] / patches / kernel / 0064-x86-unwind-Make-CONFIG_UNWINDER_ORC-y-the-default-in.patch
1 From a8ec58033a185db5d8c180d3508d34b8ae3a1c89 Mon Sep 17 00:00:00 2001
2 From: Josh Poimboeuf <jpoimboe@redhat.com>
3 Date: Fri, 13 Oct 2017 15:02:01 -0500
4 Subject: [PATCH 064/241] x86/unwind: Make CONFIG_UNWINDER_ORC=y the default in
5 kconfig for 64-bit
6 MIME-Version: 1.0
7 Content-Type: text/plain; charset=UTF-8
8 Content-Transfer-Encoding: 8bit
9
10 CVE-2017-5754
11
12 The ORC unwinder has been stable in testing so far. Give it much wider
13 testing by making it the default in kconfig for x86_64. It's not yet
14 supported for 32-bit, so leave frame pointers as the default there.
15
16 Suggested-by: Ingo Molnar <mingo@kernel.org>
17 Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
18 Cc: Linus Torvalds <torvalds@linux-foundation.org>
19 Cc: Peter Zijlstra <peterz@infradead.org>
20 Cc: Thomas Gleixner <tglx@linutronix.de>
21 Link: http://lkml.kernel.org/r/9b1237bbe7244ed9cdf8db2dcb1253e37e1c341e.1507924831.git.jpoimboe@redhat.com
22 Signed-off-by: Ingo Molnar <mingo@kernel.org>
23 (cherry picked from commit fc72ae40e30327aa24eb88a24b9c7058f938bd36)
24 Signed-off-by: Andy Whitcroft <apw@canonical.com>
25 Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
26 (cherry picked from commit aff8d5169f46ae6ac0eb26a5ba745aaf9afa0704)
27 Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
28 ---
29 arch/x86/Kconfig.debug | 33 +++++++++++++++++----------------
30 1 file changed, 17 insertions(+), 16 deletions(-)
31
32 diff --git a/arch/x86/Kconfig.debug b/arch/x86/Kconfig.debug
33 index 5435a943f894..7d88e9878a75 100644
34 --- a/arch/x86/Kconfig.debug
35 +++ b/arch/x86/Kconfig.debug
36 @@ -358,27 +358,13 @@ config PUNIT_ATOM_DEBUG
37
38 choice
39 prompt "Choose kernel unwinder"
40 - default UNWINDER_FRAME_POINTER
41 + default UNWINDER_ORC if X86_64
42 + default UNWINDER_FRAME_POINTER if X86_32
43 ---help---
44 This determines which method will be used for unwinding kernel stack
45 traces for panics, oopses, bugs, warnings, perf, /proc/<pid>/stack,
46 livepatch, lockdep, and more.
47
48 -config UNWINDER_FRAME_POINTER
49 - bool "Frame pointer unwinder"
50 - select FRAME_POINTER
51 - ---help---
52 - This option enables the frame pointer unwinder for unwinding kernel
53 - stack traces.
54 -
55 - The unwinder itself is fast and it uses less RAM than the ORC
56 - unwinder, but the kernel text size will grow by ~3% and the kernel's
57 - overall performance will degrade by roughly 5-10%.
58 -
59 - This option is recommended if you want to use the livepatch
60 - consistency model, as this is currently the only way to get a
61 - reliable stack trace (CONFIG_HAVE_RELIABLE_STACKTRACE).
62 -
63 config UNWINDER_ORC
64 bool "ORC unwinder"
65 depends on X86_64
66 @@ -396,6 +382,21 @@ config UNWINDER_ORC
67 Enabling this option will increase the kernel's runtime memory usage
68 by roughly 2-4MB, depending on your kernel config.
69
70 +config UNWINDER_FRAME_POINTER
71 + bool "Frame pointer unwinder"
72 + select FRAME_POINTER
73 + ---help---
74 + This option enables the frame pointer unwinder for unwinding kernel
75 + stack traces.
76 +
77 + The unwinder itself is fast and it uses less RAM than the ORC
78 + unwinder, but the kernel text size will grow by ~3% and the kernel's
79 + overall performance will degrade by roughly 5-10%.
80 +
81 + This option is recommended if you want to use the livepatch
82 + consistency model, as this is currently the only way to get a
83 + reliable stack trace (CONFIG_HAVE_RELIABLE_STACKTRACE).
84 +
85 config UNWINDER_GUESS
86 bool "Guess unwinder"
87 depends on EXPERT
88 --
89 2.14.2
90