x86-64: Stack protector and percpu improvements
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v2 Latest6 patches 3 repliesIn review
- v13 patches 7 repliesSuperseded
Changes in v2 from the cover letter
- Remove fixed location stack protector support
Patches in v2 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/6 | x86: Remove stack protector test scriptsarch/ scripts/ scripts/ | +3 | 0 replies | |
| 2/6 | x86-64: Convert stack protector to normal percpu variablearch/ arch/ arch/ +8 more | +39 | 3 replies | |
| 3/6 | x86-64: Use relative per-cpu offsetsarch/ arch/ arch/ +4 more | +6 | 0 replies | |
| 4/6 | x86-64: Remove inverse relocationsarch/ arch/ | +1 | 0 replies | |
| 5/6 | kallsyms: Remove KALLSYMS_ABSOLUTE_PERCPUinit/ kernel/ scripts/ +1 more | +12 | 0 replies | |
| 6/6 | percpu: Remove PER_CPU_FIRST_SECTIONinclude/ include/ | +0 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.
Cover letter [PATCH v2 0/6] x86-64: Stack protector and percpu improvements
Currently, x86-64 uses an unusual per-cpu layout, where the percpu section is linked at absolute address 0. The reason behind this is that older GCC versions placed the stack protector (if enabled) at a fixed offset from the GS segment base. Since the GS segement is also used for percpu variables, this forced the current layout.
GCC since version 8.1 supports a configurable location for the stack protector value, which allows removal of the restriction on how the percpu section is linked.
Changes from v1:
- Remove fixed location stack protector support
Brian Gerst (6):
x86: Remove stack protector test scripts
x86-64: Convert stack protector to normal percpu variable
x86-64: Use relative per-cpu offsets
x86-64: Remove inverse relocations
kallsyms: Remove KALLSYMS_ABSOLUTE_PERCPU
percpu: Remove PER_CPU_FIRST_SECTION
arch/x86/Kconfig | 7 +- arch/x86/Makefile | 19 +-- arch/x86/boot/compressed/misc.c | 14 +-- arch/x86/entry/entry_64.S | 2 +- arch/x86/include/asm/percpu.h | 22 ---- arch/x86/include/asm/processor.h | 25 +--- arch/x86/include/asm/stackprotector.h | 36 ++---- arch/x86/kernel/asm-offsets_64.c | 6 - arch/x86/kernel/cpu/common.c | 8 +- arch/x86/kernel/head_64.S | 10 +- arch/x86/kernel/irq_64.c | 1 - arch/x86/kernel/setup_percpu.c | 12 +- arch/x86/kernel/vmlinux.lds.S | 33 ----- arch/x86/tools/relocs.c | 145 +--------------------- arch/x86/xen/xen-head.S | 10 +- include/asm-generic/vmlinux.lds.h | 1 - include/linux/percpu-defs.h | 12 -- init/Kconfig | 11 +- kernel/kallsyms.c | 12 +- scripts/gcc-x86_32-has-stack-protector.sh | 8 -- scripts/gcc-x86_64-has-stack-protector.sh | 4 - scripts/kallsyms.c | 68 ++-------- scripts/link-vmlinux.sh | 4 - 23 files changed, 56 insertions(+), 414 deletions(-) delete mode 100755 scripts/gcc-x86_32-has-stack-protector.sh delete mode 100755 scripts/gcc-x86_64-has-stack-protector.sh
Signature · 1 line
2.31.1