Skip to content

Commit 2bd3f4e

Browse files
committed
Merge tag 'orphan-handling-v5.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux
Pull orphan handling fix from Kees Cook: "Another case of bogus .eh_frame emission was noticed under CONFIG_GCOV_KERNEL=y. Summary: - Define SANITIZER_DISCARDS with CONFIG_GCOV_KERNEL=y (Nathan Chancellor)" * tag 'orphan-handling-v5.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux: vmlinux.lds.h: Define SANITIZER_DISCARDS with CONFIG_GCOV_KERNEL=y
2 parents fe1072f + f5b6a74 commit 2bd3f4e

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

include/asm-generic/vmlinux.lds.h

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -968,12 +968,13 @@
968968
#endif
969969

970970
/*
971-
* Clang's -fsanitize=kernel-address and -fsanitize=thread produce
972-
* unwanted sections (.eh_frame and .init_array.*), but
973-
* CONFIG_CONSTRUCTORS wants to keep any .init_array.* sections.
971+
* Clang's -fprofile-arcs, -fsanitize=kernel-address, and
972+
* -fsanitize=thread produce unwanted sections (.eh_frame
973+
* and .init_array.*), but CONFIG_CONSTRUCTORS wants to
974+
* keep any .init_array.* sections.
974975
* https://bugs.llvm.org/show_bug.cgi?id=46478
975976
*/
976-
#if defined(CONFIG_KASAN_GENERIC) || defined(CONFIG_KCSAN)
977+
#if defined(CONFIG_GCOV_KERNEL) || defined(CONFIG_KASAN_GENERIC) || defined(CONFIG_KCSAN)
977978
# ifdef CONFIG_CONSTRUCTORS
978979
# define SANITIZER_DISCARDS \
979980
*(.eh_frame)

0 commit comments

Comments
 (0)