x86-64: Stack protector and percpu improvements
Status from this message: The following commit has been merged into the x86/asm branch of tip:
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v6 Latest15 patches 31 repliesApplied
- v516 patches 28 repliesApplied
- v416 patches 25 repliesSuperseded
Earlier versions · 3
| Version | Posted | Patches | Replies | Status |
|---|---|---|---|---|
| v3 | 14 patches | 0 replies | Superseded | |
| v2 | 11 patches | 19 replies | Superseded | |
| v1 | 9 patches | 4 replies | Superseded |
Changes in v6 from the cover letter
- Rebased to current tip tree
- Dropped patches already applied
- Fixed typos in commit messages
- Added Reviewed-by tags
Patches in v6 Applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/15 | x86: Raise minimum GCC version to 8.1scripts/ | +2 | 0 replies | |
| 2/15 | x86/stackprotector: Remove stack protector test scriptsarch/ scripts/ scripts/ | +1 | 0 replies | |
| 3/15 | x86/boot: Disable stack protector for early boot codearch/ | +2 | 0 replies | |
| 4/15 | x86/pvh: Use fixed_percpu_data for early boot GSBASEarch/ | +9 | 8 replies | |
| 5/15 | x86/relocs: Handle R_X86_64_REX_GOTPCRELX relocationsarch/ | +7 | 0 replies | |
| 6/15 | x86/module: Deal with GOT based stack cookie load on Clang < 17arch/ arch/ | +17 | 3 replies | |
| 7/15 | x86/stackprotector/64: Convert to normal percpu variablearch/ arch/ arch/ +6 more | +23 | 3 replies | |
| 8/15 | x86/percpu/64: Use relative percpu offsetsarch/ arch/ arch/ +5 more | +27 | 0 replies | |
| 9/15 | x86/percpu/64: Remove fixed_percpu_dataarch/ arch/ arch/ +1 more | +0 | 0 replies | |
| 10/15 | x86/boot/64: Remove inverse relocationsarch/ arch/ | +2 | 0 replies | |
| 11/15 | x86/percpu/64: Remove INIT_PER_CPU macrosarch/ arch/ arch/ +3 more | +1 | 0 replies | |
| 12/15 | percpu: Remove PER_CPU_FIRST_SECTIONinclude/ include/ | +0 | 0 replies | |
| 13/15 | percpu: Remove PERCPU_VADDR()include/ | +1 | 0 replies | |
| 14/15 | percpu: Remove __per_cpu_loadinclude/ include/ mm/ | +3 | 0 replies | |
| 15/15 | kallsyms: Remove KALLSYMS_ABSOLUTE_PERCPUinit/ kernel/ scripts/ +1 more | +14 | 0 replies |
Reviews trailers per patch
14 of 15 patches have a Reviewed-by or Acked-by.
| Patch | Ard Biesheuvel | Uros Bizjak |
|---|---|---|
| 1/15 | R-b | |
| 2/15 | R-b | R-b |
| 3/15 | R-b | |
| 4/15 | R-b | |
| 5/15 | R-b | |
| 6/15 | ||
| 7/15 | R-b | R-b |
| 8/15 | R-b | R-b |
| 9/15 | R-b | R-b |
| 10/15 | R-b | |
| 11/15 | R-b | R-b |
| 12/15 | R-b | |
| 13/15 | R-b | |
| 14/15 | R-b | |
| 15/15 | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v6 00/15] x86-64: Stack protector and percpu improvements
Currently, x86-64 uses an unusual percpu 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. This allows the percpu section to be linked normally, like other architectures. In turn, this allows removal of code that was needed to support the zero-based percpu section.
v6:
- Rebased to current tip tree
- Dropped patches already applied
- Fixed typos in commit messages
- Added Reviewed-by tags
Ard Biesheuvel (1):
x86/module: Deal with GOT based stack cookie load on Clang < 17
Brian Gerst (14):
x86: Raise minimum GCC version to 8.1 x86/stackprotector: Remove stack protector test scripts x86/boot: Disable stack protector for early boot code x86/pvh: Use fixed_percpu_data for early boot GSBASE x86/relocs: Handle R_X86_64_REX_GOTPCRELX relocations x86/stackprotector/64: Convert to normal percpu variable x86/percpu/64: Use relative percpu offsets x86/percpu/64: Remove fixed_percpu_data x86/boot/64: Remove inverse relocations x86/percpu/64: Remove INIT_PER_CPU macros
percpu: Remove PER_CPU_FIRST_SECTION
percpu: Remove PERCPU_VADDR()
percpu: Remove __per_cpu_load
kallsyms: Remove KALLSYMS_ABSOLUTE_PERCPU
arch/x86/Kconfig | 11 +- arch/x86/Makefile | 20 +-- arch/x86/boot/compressed/misc.c | 14 +-- arch/x86/entry/entry.S | 2 - arch/x86/entry/entry_64.S | 2 +- arch/x86/include/asm/desc.h | 1 - arch/x86/include/asm/elf.h | 3 +- arch/x86/include/asm/percpu.h | 22 ---- arch/x86/include/asm/processor.h | 28 +---- arch/x86/include/asm/stackprotector.h | 36 +----- arch/x86/kernel/Makefile | 2 + arch/x86/kernel/asm-offsets_64.c | 6 - arch/x86/kernel/cpu/common.c | 9 +- arch/x86/kernel/head64.c | 2 +- arch/x86/kernel/head_64.S | 20 ++- arch/x86/kernel/irq_64.c | 1 - arch/x86/kernel/module.c | 15 +++ arch/x86/kernel/setup_percpu.c | 12 +- arch/x86/kernel/vmlinux.lds.S | 35 ------ arch/x86/platform/pvh/head.S | 14 ++- arch/x86/tools/relocs.c | 147 ++-------------------- arch/x86/xen/xen-head.S | 10 +- include/asm-generic/sections.h | 2 +- include/asm-generic/vmlinux.lds.h | 38 +----- include/linux/percpu-defs.h | 12 -- init/Kconfig | 5 - kernel/kallsyms.c | 12 +- mm/percpu.c | 4 +- scripts/gcc-x86_32-has-stack-protector.sh | 8 -- scripts/gcc-x86_64-has-stack-protector.sh | 4 - scripts/kallsyms.c | 72 ++--------- scripts/link-vmlinux.sh | 4 - scripts/min-tool-version.sh | 2 + 33 files changed, 100 insertions(+), 475 deletions(-) delete mode 100755 scripts/gcc-x86_32-has-stack-protector.sh delete mode 100755 scripts/gcc-x86_64-has-stack-protector.sh
base-commit: b79d90e018587507fd42c4c888956668692ff431
Signature · 1 line
2.47.1