From 4f2124b5a8c8b2e231d25db86f6832beeb4238f8 Mon Sep 17 00:00:00 2001 From: Alexander Popov Date: Sun, 8 Aug 2021 16:48:04 +0300 Subject: [PATCH] Add the news about PAGE_POISONING https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=f289041ed4cf9a3f6e8a32068fef9ffb2acc5662 https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=8f424750baaafcef229791882e879da01c9473b5 --- kconfig_hardened_check/__init__.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/kconfig_hardened_check/__init__.py b/kconfig_hardened_check/__init__.py index f75ebc6..5050ec4 100644 --- a/kconfig_hardened_check/__init__.py +++ b/kconfig_hardened_check/__init__.py @@ -358,7 +358,12 @@ def construct_checklist(l, arch): l += [OR(OptCheck('self_protection', 'kspp', 'INIT_STACK_ALL_ZERO', 'y'), OptCheck('self_protection', 'kspp', 'GCC_PLUGIN_STRUCTLEAK_BYREF_ALL', 'y'))] l += [OR(OptCheck('self_protection', 'kspp', 'INIT_ON_FREE_DEFAULT_ON', 'y'), - OptCheck('self_protection', 'kspp', 'PAGE_POISONING_ZERO', 'y'))] # before v5.3 + OptCheck('self_protection', 'kspp', 'PAGE_POISONING_ZERO', 'y'))] + # CONFIG_INIT_ON_FREE_DEFAULT_ON was added in v5.3. + # CONFIG_PAGE_POISONING_ZERO was removed in v5.11. + # Starting from v5.11 CONFIG_PAGE_POISONING unconditionally checks + # the 0xAA poison pattern on allocation. + # That brings higher performance penalty. if arch in ('X86_64', 'ARM64', 'X86_32'): stackleak_is_set = OptCheck('self_protection', 'kspp', 'GCC_PLUGIN_STACKLEAK', 'y') l += [stackleak_is_set] -- 2.31.1