diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2021-02-26 19:12:19 +0100 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2021-02-26 19:12:19 +0100 |
commit | 2bd3f4eeb3147330d03df56f79378f12f25d73de (patch) | |
tree | 029e58082bdd623216aa786763361c8a9fe4de0e /include/asm-generic | |
parent | Merge tag 'clang-lto-v5.12-rc1-fix1' of git://git.kernel.org/pub/scm/linux/ke... (diff) | |
parent | vmlinux.lds.h: Define SANTIZER_DISCARDS with CONFIG_GCOV_KERNEL=y (diff) | |
download | linux-2bd3f4eeb3147330d03df56f79378f12f25d73de.tar.xz linux-2bd3f4eeb3147330d03df56f79378f12f25d73de.zip |
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
Diffstat (limited to 'include/asm-generic')
-rw-r--r-- | include/asm-generic/vmlinux.lds.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h index 6786f8c0182f..0331d5d49551 100644 --- a/include/asm-generic/vmlinux.lds.h +++ b/include/asm-generic/vmlinux.lds.h @@ -968,12 +968,13 @@ #endif /* - * Clang's -fsanitize=kernel-address and -fsanitize=thread produce - * unwanted sections (.eh_frame and .init_array.*), but - * CONFIG_CONSTRUCTORS wants to keep any .init_array.* sections. + * Clang's -fprofile-arcs, -fsanitize=kernel-address, and + * -fsanitize=thread produce unwanted sections (.eh_frame + * and .init_array.*), but CONFIG_CONSTRUCTORS wants to + * keep any .init_array.* sections. * https://bugs.llvm.org/show_bug.cgi?id=46478 */ -#if defined(CONFIG_KASAN_GENERIC) || defined(CONFIG_KCSAN) +#if defined(CONFIG_GCOV_KERNEL) || defined(CONFIG_KASAN_GENERIC) || defined(CONFIG_KCSAN) # ifdef CONFIG_CONSTRUCTORS # define SANITIZER_DISCARDS \ *(.eh_frame) |