x86/Kconfig: Introduce function padding
authorThomas Gleixner <tglx@linutronix.de>
Thu, 15 Sep 2022 11:11:18 +0000 (13:11 +0200)
committerPeter Zijlstra <peterz@infradead.org>
Mon, 17 Oct 2022 14:41:10 +0000 (16:41 +0200)
commitbea75b33895f7f87f0c40023e36a2d087e87ffa1
tree301d9fc0cc4db3df6746e8163186cab5bf436632
parent8f7c0d8b23c3f5f740a48db31ebadef28af17a22
x86/Kconfig: Introduce function padding

Now that all functions are 16 byte aligned, add 16 bytes of NOP
padding in front of each function. This prepares things for software
call stack tracking and kCFI/FineIBT.

This significantly increases kernel .text size, around 5.1% on a
x86_64-defconfig-ish build.

However, per the random access argument used for alignment, these 16
extra bytes are code that wouldn't be used. Performance measurements
back this up by showing no significant performance regressions.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lore.kernel.org/r/20220915111146.950884492@infradead.org
arch/x86/Kconfig
arch/x86/Makefile
arch/x86/entry/vdso/Makefile
arch/x86/include/asm/linkage.h
include/linux/bpf.h