From: Alexander Popov Date: Thu, 2 May 2024 09:32:58 +0000 (+0300) Subject: Use CONFIG_LOCALVERSION instead of CONFIG_DEFAULT_INIT since it's older X-Git-Tag: v0.6.10~73^2~4 X-Git-Url: https://jxself.org/git/?a=commitdiff_plain;h=0e0aa5f1516aeb4ffd9161d1d2c3479fe8caa39d;p=kconfig-hardened-check.git Use CONFIG_LOCALVERSION instead of CONFIG_DEFAULT_INIT since it's older --- diff --git a/kernel_hardening_checker/checks.py b/kernel_hardening_checker/checks.py index 4b5dee6..feb36ee 100644 --- a/kernel_hardening_checker/checks.py +++ b/kernel_hardening_checker/checks.py @@ -663,8 +663,9 @@ def add_sysctl_checks(l, _arch): # Calling the SysctlCheck class constructor: # SysctlCheck(reason, decision, name, expected) - # use an omnipresent config symbol to see if we have a config file - have_config_file = KconfigCheck('-', '-', 'DEFAULT_INIT', 'is present') + # Use an omnipresent kconfig symbol to see if we have a kconfig file for checking + have_config_file = KconfigCheck('-', '-', 'LOCALVERSION', 'is present') + l += [OR(SysctlCheck('self_protection', 'kspp', 'net.core.bpf_jit_harden', '2'), AND(KconfigCheck('cut_attack_surface', 'kspp', 'BPF_JIT', 'is not set'), have_config_file))]