···
DEBUG_PI_LIST = whenOlder "5.2" yes; # doesn't BUG()
DEBUG_PLIST = whenAtLeast "5.2" yes;
42
+
DEBUG_VIRTUAL = yes;
SCHED_STACK_END_CHECK = yes;
REFCOUNT_FULL = whenOlder "5.4.208" yes;
47
+
# tell EFI to wipe memory during reset
48
+
# https://lwn.net/Articles/730006/
49
+
RESET_ATTACK_MITIGATION = yes;
51
+
# restricts loading of line disciplines via TIOCSETD ioctl to CAP_SYS_MODULE
52
+
CONFIG_LDISC_AUTOLOAD = option no;
# Randomize page allocator when page_alloc.shuffle=1
SHUFFLE_PAGE_ALLOCATOR = whenAtLeast "5.2" yes;
49
-
# Allow enabling slub/slab free poisoning with slub_debug=P
# Wipe higher-level memory allocations on free() with page_poison=1
PAGE_POISONING_NO_SANITY = whenOlder "5.11" yes;
PAGE_POISONING_ZERO = whenOlder "5.11" yes;
62
+
# Enable init_on_alloc and init_on_free by default
63
+
INIT_ON_ALLOC_DEFAULT_ON = yes;
64
+
INIT_ON_FREE_DEFAULT_ON = yes;
66
+
# Wipe all caller-used registers on exit from a function
67
+
ZERO_CALL_USED_REGS = yes;
# Enable the SafeSetId LSM
SECURITY_SAFESETID = whenAtLeast "5.1" yes;
···
GCC_PLUGIN_RANDSTRUCT = whenOlder "5.19" yes; # A port of the PaX randstruct plugin
GCC_PLUGIN_RANDSTRUCT_PERFORMANCE = whenOlder "5.19" yes;
85
+
# Runtime undefined behaviour checks
86
+
# https://www.kernel.org/doc/html/latest/dev-tools/ubsan.html
87
+
# https://developers.redhat.com/blog/2014/10/16/gcc-undefined-behavior-sanitizer-ubsan
91
+
UBSAN_SANITIZE_ALL = yes;
92
+
UBSAN_LOCAL_BOUNDS = option yes; # clang only
93
+
CFI_CLANG = option yes; # clang only Control Flow Integrity since 6.1
# Same as GCC_PLUGIN_RANDSTRUCT*, but has been renamed to `RANDSTRUCT*` in 5.19.
RANDSTRUCT = whenAtLeast "5.19" yes;
RANDSTRUCT_PERFORMANCE = whenAtLeast "5.19" yes;
···
# CONFIG_DEVMEM=n causes these to not exist anymore.
STRICT_DEVMEM = option no;
IO_STRICT_DEVMEM = option no;
123
+
# stricter IOMMU TLB invalidation
124
+
IOMMU_DEFAULT_DMA_STRICT = option yes;
125
+
IOMMU_DEFAULT_DMA_LAZY = option no;
127
+
# not needed for less than a decade old glibc versions
128
+
LEGACY_VSYSCALL_NONE = yes;
130
+
# Straight-Line-Speculation
131
+
# https://lwn.net/Articles/877845/