linux/arch
Kees Cook 381a38ea53 init.h: Disable sanitizer coverage for __init and __head
While __noinstr already contained __no_sanitize_coverage, it needs to
be added to __init and __head section markings to support the Clang
implementation of CONFIG_KSTACK_ERASE. This is to make sure the stack
depth tracking callback is not executed in unsupported contexts.

The other sanitizer coverage options (trace-pc and trace-cmp) aren't
needed in __head nor __init either ("We are interested in code coverage
as a function of a syscall inputs"[1]), so this is fine to disable for
them as well.

Link: https://web.git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/kernel/kcov.c?h=v6.14#n179 [1]
Acked-by: Marco Elver <elver@google.com>
Link: https://lore.kernel.org/r/20250724055029.3623499-3-kees@kernel.org
Signed-off-by: Kees Cook <kees@kernel.org>
2025-07-26 14:28:35 -07:00
..
alpha mm: pgtable: fix pte_swp_exclusive 2025-06-11 14:52:08 -07:00
arc ARC fixes for 6.16 2025-06-12 08:17:56 -07:00
arm kstack_erase: Disable kstack_erase for all of arm compressed boot code 2025-07-26 14:27:33 -07:00
arm64 arm64: Handle KCOV __init vs inline mismatches 2025-07-24 16:55:11 -07:00
csky mm: pgtable: fix pte_swp_exclusive 2025-06-11 14:52:08 -07:00
hexagon mm: pgtable: fix pte_swp_exclusive 2025-06-11 14:52:08 -07:00
loongarch stackleak: Rename STACKLEAK to KSTACK_ERASE 2025-07-21 21:35:01 -07:00
m68k mm: pgtable: fix pte_swp_exclusive 2025-06-11 14:52:08 -07:00
microblaze mm: pgtable: fix pte_swp_exclusive 2025-06-11 14:52:08 -07:00
mips mips: Handle KCOV __init vs inline mismatch 2025-07-21 21:42:49 -07:00
nios2 mm: pgtable: fix pte_swp_exclusive 2025-06-11 14:52:08 -07:00
openrisc mm: pgtable: fix pte_swp_exclusive 2025-06-11 14:52:08 -07:00
parisc mm: pgtable: fix pte_swp_exclusive 2025-06-11 14:52:08 -07:00
powerpc powerpc/mm/book3s64: Move kfence and debug_pagealloc related calls to __init section 2025-07-21 21:42:21 -07:00
riscv stackleak: Rename STACKLEAK to KSTACK_ERASE 2025-07-21 21:35:01 -07:00
s390 s390: Handle KCOV __init vs inline mismatches 2025-07-21 21:44:01 -07:00
sh mm: pgtable: fix pte_swp_exclusive 2025-06-11 14:52:08 -07:00
sparc stackleak: Split KSTACK_ERASE_CFLAGS from GCC_PLUGINS_CFLAGS 2025-07-21 21:40:57 -07:00
um mm: pgtable: fix pte_swp_exclusive 2025-06-11 14:52:08 -07:00
x86 init.h: Disable sanitizer coverage for __init and __head 2025-07-26 14:28:35 -07:00
xtensa mm: pgtable: fix pte_swp_exclusive 2025-06-11 14:52:08 -07:00
.gitignore
Kconfig stackleak: Rename STACKLEAK to KSTACK_ERASE 2025-07-21 21:35:01 -07:00