]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commitdiff
x86/unwind: Rename unwinder config options to 'CONFIG_UNWINDER_*'
authorJosh Poimboeuf <jpoimboe@redhat.com>
Fri, 13 Oct 2017 20:02:00 +0000 (15:02 -0500)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Sat, 6 Jan 2018 12:22:35 +0000 (13:22 +0100)
CVE-2017-5754

Rename the unwinder config options from:

  CONFIG_ORC_UNWINDER
  CONFIG_FRAME_POINTER_UNWINDER
  CONFIG_GUESS_UNWINDER

to:

  CONFIG_UNWINDER_ORC
  CONFIG_UNWINDER_FRAME_POINTER
  CONFIG_UNWINDER_GUESS

... in order to give them a more logical config namespace.

Suggested-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/73972fc7e2762e91912c6b9584582703d6f1b8cc.1507924831.git.jpoimboe@redhat.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
(cherry picked from commit 11af847446ed0d131cf24d16a7ef3d5ea7a49554)
Signed-off-by: Andy Whitcroft <apw@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
12 files changed:
Documentation/x86/orc-unwinder.txt
Makefile
arch/x86/Kconfig
arch/x86/Kconfig.debug
arch/x86/configs/tiny.config
arch/x86/configs/x86_64_defconfig
arch/x86/include/asm/module.h
arch/x86/include/asm/unwind.h
arch/x86/kernel/Makefile
include/asm-generic/vmlinux.lds.h
lib/Kconfig.debug
scripts/Makefile.build

index af0c9a4c65a6dab9d5b806dadb011209de718c33..cd4b29be29af1e84162f06b86f306183b1df5d22 100644 (file)
@@ -4,7 +4,7 @@ ORC unwinder
 Overview
 --------
 
-The kernel CONFIG_ORC_UNWINDER option enables the ORC unwinder, which is
+The kernel CONFIG_UNWINDER_ORC option enables the ORC unwinder, which is
 similar in concept to a DWARF unwinder.  The difference is that the
 format of the ORC data is much simpler than DWARF, which in turn allows
 the ORC unwinder to be much simpler and faster.
index 490ce18685eace2c9f311e96a55b803932dc0921..b740e3dc9ff892797ab5c3b6770bd92654241165 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -965,8 +965,8 @@ ifdef CONFIG_STACK_VALIDATION
   ifeq ($(has_libelf),1)
     objtool_target := tools/objtool FORCE
   else
-    ifdef CONFIG_ORC_UNWINDER
-      $(error "Cannot generate ORC metadata for CONFIG_ORC_UNWINDER=y, please install libelf-dev, libelf-devel or elfutils-libelf-devel")
+    ifdef CONFIG_UNWINDER_ORC
+      $(error "Cannot generate ORC metadata for CONFIG_UNWINDER_ORC=y, please install libelf-dev, libelf-devel or elfutils-libelf-devel")
     else
       $(warning "Cannot use CONFIG_STACK_VALIDATION=y, please install libelf-dev, libelf-devel or elfutils-libelf-devel")
     endif
index 3a0b8cb57cafa4fc69808497b879895abb7a3304..bf9f03740c30151299c1e6cd27c5d85c198eae8c 100644 (file)
@@ -168,7 +168,7 @@ config X86
        select HAVE_PERF_REGS
        select HAVE_PERF_USER_STACK_DUMP
        select HAVE_REGS_AND_STACK_ACCESS_API
-       select HAVE_RELIABLE_STACKTRACE         if X86_64 && FRAME_POINTER_UNWINDER && STACK_VALIDATION
+       select HAVE_RELIABLE_STACKTRACE         if X86_64 && UNWINDER_FRAME_POINTER && STACK_VALIDATION
        select HAVE_STACK_VALIDATION            if X86_64
        select HAVE_SYSCALL_TRACEPOINTS
        select HAVE_UNSTABLE_SCHED_CLOCK
index c441b5d65ec83829ee26196c8d108603b88f63e9..5435a943f8944afd9c7792b8e146e0fd6557d8cb 100644 (file)
@@ -358,13 +358,13 @@ config PUNIT_ATOM_DEBUG
 
 choice
        prompt "Choose kernel unwinder"
-       default FRAME_POINTER_UNWINDER
+       default UNWINDER_FRAME_POINTER
        ---help---
          This determines which method will be used for unwinding kernel stack
          traces for panics, oopses, bugs, warnings, perf, /proc/<pid>/stack,
          livepatch, lockdep, and more.
 
-config FRAME_POINTER_UNWINDER
+config UNWINDER_FRAME_POINTER
        bool "Frame pointer unwinder"
        select FRAME_POINTER
        ---help---
@@ -379,7 +379,7 @@ config FRAME_POINTER_UNWINDER
          consistency model, as this is currently the only way to get a
          reliable stack trace (CONFIG_HAVE_RELIABLE_STACKTRACE).
 
-config ORC_UNWINDER
+config UNWINDER_ORC
        bool "ORC unwinder"
        depends on X86_64
        select STACK_VALIDATION
@@ -396,7 +396,7 @@ config ORC_UNWINDER
          Enabling this option will increase the kernel's runtime memory usage
          by roughly 2-4MB, depending on your kernel config.
 
-config GUESS_UNWINDER
+config UNWINDER_GUESS
        bool "Guess unwinder"
        depends on EXPERT
        ---help---
@@ -411,7 +411,7 @@ config GUESS_UNWINDER
 endchoice
 
 config FRAME_POINTER
-       depends on !ORC_UNWINDER && !GUESS_UNWINDER
+       depends on !UNWINDER_ORC && !UNWINDER_GUESS
        bool
 
 endmenu
index 550cd5012b7354efd1d1eb3eaeebffd8cd7e30eb..66c9e2aab16cc31932c68ba08d484876ccf53ddc 100644 (file)
@@ -1,5 +1,5 @@
 CONFIG_NOHIGHMEM=y
 # CONFIG_HIGHMEM4G is not set
 # CONFIG_HIGHMEM64G is not set
-CONFIG_GUESS_UNWINDER=y
-# CONFIG_FRAME_POINTER_UNWINDER is not set
+CONFIG_UNWINDER_GUESS=y
+# CONFIG_UNWINDER_FRAME_POINTER is not set
index eb65c248708d4fec4358f7a8bd432d123d5385b9..e32fc1f274d854d48e1175a27210b87ccfaf509c 100644 (file)
@@ -299,7 +299,7 @@ CONFIG_DEBUG_STACKOVERFLOW=y
 # CONFIG_DEBUG_RODATA_TEST is not set
 CONFIG_DEBUG_BOOT_PARAMS=y
 CONFIG_OPTIMIZE_INLINING=y
-CONFIG_ORC_UNWINDER=y
+CONFIG_UNWINDER_ORC=y
 CONFIG_SECURITY=y
 CONFIG_SECURITY_NETWORK=y
 CONFIG_SECURITY_SELINUX=y
index 9eb7c718aaf8bdcd3ba6c3fc18e38d04a8228440..9f05a1002aa94c922b722c9c57c5485f58851711 100644 (file)
@@ -5,7 +5,7 @@
 #include <asm/orc_types.h>
 
 struct mod_arch_specific {
-#ifdef CONFIG_ORC_UNWINDER
+#ifdef CONFIG_UNWINDER_ORC
        unsigned int num_orcs;
        int *orc_unwind_ip;
        struct orc_entry *orc_unwind;
index e9f793e2df7a135f72a5dcbeee6a09a1d73fb383..35d67dc7b69fc88832b81a03a67453fc501e2a3b 100644 (file)
@@ -12,11 +12,11 @@ struct unwind_state {
        struct task_struct *task;
        int graph_idx;
        bool error;
-#if defined(CONFIG_ORC_UNWINDER)
+#if defined(CONFIG_UNWINDER_ORC)
        bool signal, full_regs;
        unsigned long sp, bp, ip;
        struct pt_regs *regs;
-#elif defined(CONFIG_FRAME_POINTER_UNWINDER)
+#elif defined(CONFIG_UNWINDER_FRAME_POINTER)
        bool got_irq;
        unsigned long *bp, *orig_sp, ip;
        struct pt_regs *regs;
@@ -50,7 +50,7 @@ void unwind_start(struct unwind_state *state, struct task_struct *task,
        __unwind_start(state, task, regs, first_frame);
 }
 
-#if defined(CONFIG_ORC_UNWINDER) || defined(CONFIG_FRAME_POINTER_UNWINDER)
+#if defined(CONFIG_UNWINDER_ORC) || defined(CONFIG_UNWINDER_FRAME_POINTER)
 static inline struct pt_regs *unwind_get_entry_regs(struct unwind_state *state)
 {
        if (unwind_done(state))
@@ -65,7 +65,7 @@ static inline struct pt_regs *unwind_get_entry_regs(struct unwind_state *state)
 }
 #endif
 
-#ifdef CONFIG_ORC_UNWINDER
+#ifdef CONFIG_UNWINDER_ORC
 void unwind_init(void);
 void unwind_module_init(struct module *mod, void *orc_ip, size_t orc_ip_size,
                        void *orc, size_t orc_size);
index e2315aecc4413ff3b31730509ecab9f90cca5dfb..5bf0d5a473b41dbcc39529f654c4e6966047eef5 100644 (file)
@@ -125,9 +125,9 @@ obj-$(CONFIG_PERF_EVENTS)           += perf_regs.o
 obj-$(CONFIG_TRACING)                  += tracepoint.o
 obj-$(CONFIG_SCHED_MC_PRIO)            += itmt.o
 
-obj-$(CONFIG_ORC_UNWINDER)             += unwind_orc.o
-obj-$(CONFIG_FRAME_POINTER_UNWINDER)   += unwind_frame.o
-obj-$(CONFIG_GUESS_UNWINDER)           += unwind_guess.o
+obj-$(CONFIG_UNWINDER_ORC)             += unwind_orc.o
+obj-$(CONFIG_UNWINDER_FRAME_POINTER)   += unwind_frame.o
+obj-$(CONFIG_UNWINDER_GUESS)           += unwind_guess.o
 
 ###
 # 64 bit specific files
index 9fdb54a95976ccbf15ad25004f58b13db7bc483e..e71e424323601540bceb8db56890af4be4304335 100644 (file)
 #define BUG_TABLE
 #endif
 
-#ifdef CONFIG_ORC_UNWINDER
+#ifdef CONFIG_UNWINDER_ORC
 #define ORC_UNWIND_TABLE                                               \
        . = ALIGN(4);                                                   \
        .orc_unwind_ip : AT(ADDR(.orc_unwind_ip) - LOAD_OFFSET) {       \
index 0b4d1b3880b0edeccf54f8ce109ff54a5033f068..4f6ca5f60f7e1d5055867923cb460fa2a8936b4e 100644 (file)
@@ -375,7 +375,7 @@ config STACK_VALIDATION
          that runtime stack traces are more reliable.
 
          This is also a prerequisite for generation of ORC unwind data, which
-         is needed for CONFIG_ORC_UNWINDER.
+         is needed for CONFIG_UNWINDER_ORC.
 
          For more information, see
          tools/objtool/Documentation/stack-validation.txt.
index ab2c8ef43cdb1ec8ee3e795905815a3170c5527d..436005392047b73486de4c86cf08d17de0bf0b66 100644 (file)
@@ -258,7 +258,7 @@ ifneq ($(SKIP_STACK_VALIDATION),1)
 
 __objtool_obj := $(objtree)/tools/objtool/objtool
 
-objtool_args = $(if $(CONFIG_ORC_UNWINDER),orc generate,check)
+objtool_args = $(if $(CONFIG_UNWINDER_ORC),orc generate,check)
 
 ifndef CONFIG_FRAME_POINTER
 objtool_args += --no-fp