summaryrefslogtreecommitdiff
path: root/scripts/Makefile.thinlto
diff options
context:
space:
mode:
authorKees Cook <kees@kernel.org>2026-10-12 02:04:25 -0700
committerPeter Zijlstra <peterz@infradead.org>2026-10-12 11:47:35 +0200
commit41d1119e2f8577b4bd01d31321c6761af9140ce7 (patch)
treefe23723c041baae91512b5151c10c391a2b070b6 /scripts/Makefile.thinlto
parent24a19b953e2a3d0ea5a8c4951a0ab8f32720c907 (diff)
downloadlinux-next-41d1119e2f8577b4bd01d31321c6761af9140ce7.tar.gz
linux-next-41d1119e2f8577b4bd01d31321c6761af9140ce7.zip
x86/kcfi: Emit the FineIBT paranoid "cs" prefix as a byte
The "cs" prefix on the LEA in the FineIBT paranoid caller template is padding: it places the LEA's 0xf0 immediate byte where it doubles as the LOCK prefix that makes the failing Jcc raise #UD. GNU as warns about it in every CONFIG_FINEIBT=y build: Warning: segment override on `lea' is ineffectual Clang's integrated assembler does not warn, and both assemble the same bytes. Emit the prefix with ".byte 0x2e" to silence GNU as. Build tested ARCH=x86_64 defconfig with CONFIG_CFI=y, with GCC 17.0.0 (experimental, with the kCFI series) and GNU as 2.47, and with Clang 24.0.0git: GNU as no longer warns, and the template assembles to the same bytes as before with both. Under QEMU with cfi=fineibt,paranoid, the paranoid caller check catches LKDTM's CFI_FORWARD_PROTO with both. Assisted-by: LLM Signed-off-by: Kees Cook <kees@kernel.org> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Link: https://patch.msgid.link/20261012090436.1676525-2-kees@kernel.org
Diffstat (limited to 'scripts/Makefile.thinlto')
0 files changed, 0 insertions, 0 deletions