diff options
author | Brian Gerst <brgerst@gmail.com> | 2025-01-23 14:07:40 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2025-02-18 10:15:27 +0100 |
commit | 9d7de2aa8b41407bc96d89a80dc1fd637d389d42 (patch) | |
tree | b94af48af75aa5b347f9624e73fd7dc1821a4e2d /init | |
parent | 80d47defddc000271502057ebd7efa4fd6481542 (diff) |
x86/percpu/64: Use relative percpu offsets
The percpu section is currently linked at absolute address 0, because
older compilers hard-coded the stack protector canary value at a fixed
offset from the start of the GS segment. Now that the canary is a
normal percpu variable, the percpu section does not need to be linked
at a specific address.
x86-64 will now calculate the percpu offsets as the delta between the
initial percpu address and the dynamically allocated memory, like other
architectures. Note that GSBASE is limited to the canonical address
width (48 or 57 bits, sign-extended). As long as the kernel text,
modules, and the dynamically allocated percpu memory are all in the
negative address space, the delta will not overflow this limit.
Signed-off-by: Brian Gerst <brgerst@gmail.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Reviewed-by: Ard Biesheuvel <ardb@kernel.org>
Reviewed-by: Uros Bizjak <ubizjak@gmail.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Link: https://lore.kernel.org/r/20250123190747.745588-9-brgerst@gmail.com
Diffstat (limited to 'init')
-rw-r--r-- | init/Kconfig | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/init/Kconfig b/init/Kconfig index d0d021b3fa3b..b5d9c0fa69f6 100644 --- a/init/Kconfig +++ b/init/Kconfig @@ -1872,7 +1872,7 @@ config KALLSYMS_ALL config KALLSYMS_ABSOLUTE_PERCPU bool depends on KALLSYMS - default X86_64 && SMP + default n # end of the "standard kernel features (expert users)" menu |