]> git.ipfire.org Git - thirdparty/linux.git/commit - Makefile
cfi: Switch to -fsanitize=kcfi
authorSami Tolvanen <samitolvanen@google.com>
Thu, 8 Sep 2022 21:54:47 +0000 (14:54 -0700)
committerKees Cook <keescook@chromium.org>
Mon, 26 Sep 2022 17:13:13 +0000 (10:13 -0700)
commit89245600941e4e0f87d77f60ee269b5e61ef4e49
treea0069b5bd625907cb854091e6dbbeed4964815b0
parent92efda8eb15295a07f450828b2db14485bfc09c2
cfi: Switch to -fsanitize=kcfi

Switch from Clang's original forward-edge control-flow integrity
implementation to -fsanitize=kcfi, which is better suited for the
kernel, as it doesn't require LTO, doesn't use a jump table that
requires altering function references, and won't break cross-module
function address equality.

Signed-off-by: Sami Tolvanen <samitolvanen@google.com>
Reviewed-by: Kees Cook <keescook@chromium.org>
Tested-by: Kees Cook <keescook@chromium.org>
Tested-by: Nathan Chancellor <nathan@kernel.org>
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Tested-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Kees Cook <keescook@chromium.org>
Link: https://lore.kernel.org/r/20220908215504.3686827-6-samitolvanen@google.com
Makefile
arch/Kconfig
include/asm-generic/vmlinux.lds.h
include/linux/cfi.h
include/linux/compiler-clang.h
include/linux/module.h
kernel/cfi.c
kernel/module/main.c
scripts/module.lds.S