X-Git-Url: https://jxself.org/git/?a=blobdiff_plain;ds=sidebyside;f=kconfig-hardened-check.py;h=83d1c0d85191d957282e780cb073a18c6727213c;hb=dfa4ccc71efd78f1962d695fc88982cbe24021fb;hp=a13969714daf4c445642711da306ad8bf29fd6f9;hpb=26ae3b02797f9494076e9cbb6f4a70abed5fb573;p=kconfig-hardened-check.git diff --git a/kconfig-hardened-check.py b/kconfig-hardened-check.py index a139697..83d1c0d 100755 --- a/kconfig-hardened-check.py +++ b/kconfig-hardened-check.py @@ -74,7 +74,9 @@ class OR: self.result = None # self.opts[0] is the option which this OR-check is about. - # Use case: OR(, ) + # Use case: + # OR(, ) + # OR(, ) @property def name(self): @@ -103,7 +105,7 @@ class OR: if i == 0: self.result = opt.result else: - self.result = 'CONFIG_{}: {} ("{}")'.format(opt.name, opt.result, opt.expected) + self.result = 'OK: CONFIG_{} "{}"'.format(opt.name, opt.expected) return True, self.result self.result = self.opts[0].result return False, self.result @@ -207,8 +209,9 @@ def construct_checklist(arch): checklist.append(OptCheck('LOCK_DOWN_KERNEL', 'y', 'my', 'self_protection')) # remember about LOCK_DOWN_MANDATORY checklist.append(OptCheck('SLUB_DEBUG_ON', 'y', 'my', 'self_protection')) checklist.append(OptCheck('SECURITY_DMESG_RESTRICT', 'y', 'my', 'self_protection')) - checklist.append(OptCheck('STATIC_USERMODEHELPER', 'y', 'my', 'self_protection')) # breaks systemd? - checklist.append(OptCheck('SECURITY_LOADPIN', 'y', 'my', 'self_protection')) + checklist.append(OptCheck('STATIC_USERMODEHELPER', 'y', 'my', 'self_protection')) # needs userspace support (systemd) + checklist.append(OptCheck('SECURITY_LOADPIN', 'y', 'my', 'self_protection')) # needs userspace support + checklist.append(OptCheck('RESET_ATTACK_MITIGATION', 'y', 'my', 'self_protection')) # needs userspace support (systemd) checklist.append(OptCheck('PAGE_POISONING_NO_SANITY', 'is not set', 'my', 'self_protection')) checklist.append(OptCheck('PAGE_POISONING_ZERO', 'is not set', 'my', 'self_protection')) checklist.append(OptCheck('SLAB_MERGE_DEFAULT', 'is not set', 'my', 'self_protection')) # slab_nomerge