From 61233b745a8612e41c80e5f63a013da95567a11f Mon Sep 17 00:00:00 2001 From: Alexander Popov Date: Sun, 14 Jan 2024 17:31:50 +0300 Subject: [PATCH] Don't add options without explicitly recommended values to Kconfig fragments That's important for the '--generate' mode. --- kernel_hardening_checker/__init__.py | 2 ++ 1 file changed, 2 insertions(+) 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: -- 2.31.1