Skip to content

Commit

Permalink
x86: kallsyms: disable absolute percpu symbols on !SMP
Browse files Browse the repository at this point in the history
scripts/kallsyms.c has a special --absolute-percpu command line option
which deals with the zero based per cpu offsets that are used when
building for SMP on x86_64.  This means that the option should only be
passed in that case, so add a Kconfig symbol with the correct predicate,
and use that instead.

Signed-off-by: Ard Biesheuvel <[email protected]>
Tested-by: Guenter Roeck <[email protected]>
Reviewed-by: Kees Cook <[email protected]>
Tested-by: Kees Cook <[email protected]>
Acked-by: Rusty Russell <[email protected]>
Cc: Heiko Carstens <[email protected]>
Cc: Michael Ellerman <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: H. Peter Anvin <[email protected]>
Cc: Benjamin Herrenschmidt <[email protected]>
Cc: Michal Marek <[email protected]>
Cc: Arnd Bergmann <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
Ard Biesheuvel authored and torvalds committed Mar 15, 2016
1 parent 6b8c69e commit 4d5d566
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions init/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -1420,6 +1420,10 @@ config KALLSYMS_ALL

Say N unless you really need all symbols.

config KALLSYMS_ABSOLUTE_PERCPU
bool
default X86_64 && SMP

config PRINTK
default y
bool "Enable support for printk" if EXPERT
Expand Down
2 changes: 1 addition & 1 deletion scripts/link-vmlinux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ kallsyms()
kallsymopt="${kallsymopt} --page-offset=$CONFIG_PAGE_OFFSET"
fi

if [ -n "${CONFIG_X86_64}" ]; then
if [ -n "${CONFIG_KALLSYMS_ABSOLUTE_PERCPU}" ]; then
kallsymopt="${kallsymopt} --absolute-percpu"
fi

Expand Down

0 comments on commit 4d5d566

Please sign in to comment.