Skip to content

arm64: Initial BTI kernel support

Mark Brown linux-arm-kernel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest5 patches 5 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5arm64: bti: Support building kernel C code using BTIarch/arm64/Makefile+4 -04 replies
2/5arm64: asm: Override SYM_FUNC_START when building the kernel with BTIarch/arm64/include/asm/linkage.h+46 -00 replies
3/5arm64: Set GP bit in kernel page tables to enable BTI for the kernelarch/arm64/include/asm/pgtable-prot.h arch/arm64/kernel/cpufeature.c arch/arm64/mm/mmu.c+33 -00 replies
4/5arm64: mm: Mark module text as guarded pagesarch/arm64/mm/pageattr.c+2 -20 replies
5/5arm64: bti: Provide Kconfig for kernel mode BTIarch/arm64/Kconfig+18 -01 reply

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/5] arm64: Initial BTI kernel support

This patch series extends the use of BTI to most kernel executable code, it does not currently handle BPF or the VDSO - those will be handled by future updates. It builds the kernel with annotations for BTI and then maps the kernel with GP based on the support on the boot CPU, rejecting secondaries that don't have BTI support. If there is a need to handle big.LITTLE systems with mismatched BTI support we will have to revisit this but no implementations currently exist.

This is just for initial review, it obviously can't be applied until after the merge window. It depends on the userspace BTI patches and the assembler annotation patches.

Since at least some versions of GCC appear to have an issue with generating incorrect BTI annotations when BTI is used in conjunction with pointer authentication for leaf functions this version of the series disables building with GCC entirely. The issue is still under investigation, no issues have been seen with clang.

Mark Brown (5):
arm64: bti: Support building kernel C code using BTI
arm64: asm: Override SYM_FUNC_START when building the kernel with BTI
arm64: Set GP bit in kernel page tables to enable BTI for the kernel
arm64: mm: Mark module text as guarded pages
arm64: bti: Provide Kconfig for kernel mode BTI

 arch/arm64/Kconfig                    | 18 +++++++++++
 arch/arm64/Makefile                   |  4 +++
 arch/arm64/include/asm/linkage.h      | 46 +++++++++++++++++++++++++++
 arch/arm64/include/asm/pgtable-prot.h |  5 +++
 arch/arm64/kernel/cpufeature.c        |  4 +++
 arch/arm64/mm/mmu.c                   | 24 ++++++++++++++
 arch/arm64/mm/pageattr.c              |  4 +--
 7 files changed, 103 insertions(+), 2 deletions(-)
Signature · 7 lines
2.20.1


_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel