From: Alexander Popov Date: Tue, 16 Jan 2024 21:42:56 +0000 (+0300) Subject: Don't print the warning about ARCH_MMAP_RND_BITS in the json mode X-Git-Tag: v0.6.6~4 X-Git-Url: https://jxself.org/git/?a=commitdiff_plain;h=011315f0b995b8808c86cc303885850f4a01f299;p=kconfig-hardened-check.git Don't print the warning about ARCH_MMAP_RND_BITS in the json mode --- diff --git a/kernel_hardening_checker/__init__.py b/kernel_hardening_checker/__init__.py index cc256f7..2fa789d 100644 --- a/kernel_hardening_checker/__init__.py +++ b/kernel_hardening_checker/__init__.py @@ -331,7 +331,8 @@ def main(): override_expected_value(config_checklist, 'CONFIG_ARCH_MMAP_RND_BITS', mmap_rnd_bits_max) else: # remove the CONFIG_ARCH_MMAP_RND_BITS check to avoid false results - print('[-] Can\'t check CONFIG_ARCH_MMAP_RND_BITS without CONFIG_ARCH_MMAP_RND_BITS_MAX') + if mode != 'json': + print('[-] Can\'t check CONFIG_ARCH_MMAP_RND_BITS without CONFIG_ARCH_MMAP_RND_BITS_MAX') config_checklist[:] = [o for o in config_checklist if o.name != 'CONFIG_ARCH_MMAP_RND_BITS'] # now everything is ready, perform the checks