From dd429b9bcd068e3b049677d020d0dd6f0ca1f5d3 Mon Sep 17 00:00:00 2001 From: Alexander Popov Date: Wed, 25 Jul 2018 14:33:35 +0300 Subject: [PATCH] Support both versions of the STACKPROTECTOR_STRONG option --- README.md | 3 +-- kconfig-hardened-check.py | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index ac72965..fe20cfe 100644 --- a/README.md +++ b/README.md @@ -47,8 +47,7 @@ optional arguments: CONFIG_DEBUG_WX | y | ubuntu18 | self_protection || OK CONFIG_RANDOMIZE_BASE | y | ubuntu18 | self_protection || OK CONFIG_RANDOMIZE_MEMORY | y | ubuntu18 | self_protection || OK - CONFIG_CC_STACKPROTECTOR | y | ubuntu18 | self_protection || OK - CONFIG_CC_STACKPROTECTOR_STRONG | y | ubuntu18 | self_protection || OK + CONFIG_STACKPROTECTOR_STRONG | y | ubuntu18 | self_protection ||CONFIG_CC_STACKPROTECTOR_STRONG: OK ("y") CONFIG_VMAP_STACK | y | ubuntu18 | self_protection || OK CONFIG_THREAD_INFO_IN_TASK | y | ubuntu18 | self_protection || OK CONFIG_SCHED_STACK_END_CHECK | y | ubuntu18 | self_protection || OK diff --git a/kconfig-hardened-check.py b/kconfig-hardened-check.py index e8b846c..7ceb95d 100755 --- a/kconfig-hardened-check.py +++ b/kconfig-hardened-check.py @@ -107,8 +107,8 @@ def construct_opt_checks(): checklist.append(OptCheck('DEBUG_WX', 'y', 'ubuntu18', 'self_protection')) checklist.append(OptCheck('RANDOMIZE_BASE', 'y', 'ubuntu18', 'self_protection')) checklist.append(OptCheck('RANDOMIZE_MEMORY', 'y', 'ubuntu18', 'self_protection')) - checklist.append(OptCheck('CC_STACKPROTECTOR', 'y', 'ubuntu18', 'self_protection')) - checklist.append(OptCheck('CC_STACKPROTECTOR_STRONG','y', 'ubuntu18', 'self_protection')) + checklist.append(OR(OptCheck('STACKPROTECTOR_STRONG','y', 'ubuntu18', 'self_protection'), \ + OptCheck('CC_STACKPROTECTOR_STRONG','y', 'ubuntu18', 'self_protection'))) checklist.append(OptCheck('VMAP_STACK', 'y', 'ubuntu18', 'self_protection')) checklist.append(OptCheck('THREAD_INFO_IN_TASK', 'y', 'ubuntu18', 'self_protection')) checklist.append(OptCheck('SCHED_STACK_END_CHECK', 'y', 'ubuntu18', 'self_protection')) -- 2.31.1