From: Alexander Popov Date: Sun, 14 Jan 2024 14:31:50 +0000 (+0300) Subject: Don't add options without explicitly recommended values to Kconfig fragments X-Git-Tag: v0.6.6~16 X-Git-Url: https://jxself.org/git/?a=commitdiff_plain;h=61233b745a8612e41c80e5f63a013da95567a11f;p=kconfig-hardened-check.git Don't add options without explicitly recommended values to Kconfig fragments That's important for the '--generate' mode. --- diff --git a/kernel_hardening_checker/__init__.py b/kernel_hardening_checker/__init__.py index 7cd3957..a27e377 100644 --- a/kernel_hardening_checker/__init__.py +++ b/kernel_hardening_checker/__init__.py @@ -405,6 +405,8 @@ def main(): for opt in config_checklist: if opt.name == 'CONFIG_ARCH_MMAP_RND_BITS': continue # don't add CONFIG_ARCH_MMAP_RND_BITS because its value needs refinement + if opt.expected == 'is not off': + continue # don't add Kconfig options without explicitly recommended values if opt.expected == 'is not set': print(f'# {opt.name} is not set') else: