summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2021-05-28 21:31:48 +0300
committerLinus Torvalds <torvalds@linux-foundation.org>2021-05-28 21:31:48 +0300
commit8508b97ae2b6c73c2c09798c9fa9d27ec57ff1dc (patch)
treea5dcf52347b95a669857c9b66d51ddeed8a3783e /include/linux
parentafdd14704d7eb4d7634cb7ba8d117066fed44282 (diff)
parent24845dcb170e16b3100bd49743687648c71387ae (diff)
downloadlinux-8508b97ae2b6c73c2c09798c9fa9d27ec57ff1dc.tar.xz
Merge tag 'clang-features-v5.13-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux
Pull clang feature fixes from Kees Cook: - Correctly pass stack frame size checking under LTO (Nick Desaulniers) - Avoid CFI mismatches by checking initcall_t types (Marco Elver) * tag 'clang-features-v5.13-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux: Makefile: LTO: have linker check -Wframe-larger-than init: verify that function is initcall_t at compile-time
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/init.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/linux/init.h b/include/linux/init.h
index 045ad1650ed1..d82b4b2e1d25 100644
--- a/include/linux/init.h
+++ b/include/linux/init.h
@@ -242,7 +242,8 @@ extern bool initcall_debug;
asm(".section \"" __sec "\", \"a\" \n" \
__stringify(__name) ": \n" \
".long " __stringify(__stub) " - . \n" \
- ".previous \n");
+ ".previous \n"); \
+ static_assert(__same_type(initcall_t, &fn));
#else
#define ____define_initcall(fn, __unused, __name, __sec) \
static initcall_t __name __used \