mirror of
https://github.com/t2linux/kernel.git
synced 2026-04-30 13:48:59 -07:00
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
This commit is contained in:
@@ -928,6 +928,11 @@ CC_FLAGS_LTO += -fvisibility=hidden
|
||||
|
||||
# Limit inlining across translation units to reduce binary size
|
||||
KBUILD_LDFLAGS += -mllvm -import-instr-limit=5
|
||||
|
||||
# Check for frame size exceeding threshold during prolog/epilog insertion.
|
||||
ifneq ($(CONFIG_FRAME_WARN),0)
|
||||
KBUILD_LDFLAGS += -plugin-opt=-warn-stack-size=$(CONFIG_FRAME_WARN)
|
||||
endif
|
||||
endif
|
||||
|
||||
ifdef CONFIG_LTO
|
||||
|
||||
@@ -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 \
|
||||
|
||||
Reference in New Issue
Block a user