X-Git-Url: https://jxself.org/git/?a=blobdiff_plain;f=kconfig_hardened_check%2F__init__.py;h=563091cd77abb9727e8b647fc59847bd1245bcaa;hb=361e571e1926ee172f22f9aad990158e2c03651d;hp=b8bfa1568b8f625d7a94e90e765556e996a0cb02;hpb=12d6535d07859a61acb83cb84aa06b4366c9e458;p=kconfig-hardened-check.git diff --git a/kconfig_hardened_check/__init__.py b/kconfig_hardened_check/__init__.py index b8bfa15..563091c 100644 --- a/kconfig_hardened_check/__init__.py +++ b/kconfig_hardened_check/__init__.py @@ -11,19 +11,18 @@ # # # N.B Hardening command line parameters: -# slub_debug=FZP # slab_nomerge # page_alloc.shuffle=1 # iommu=force (does it help against DMA attacks?) -# page_poison=1 (if enabled) -# init_on_alloc=1 -# init_on_free=1 +# slub_debug=FZ (slow) +# init_on_alloc=1 (since v5.3) +# init_on_free=1 (since v5.3, otherwise slub_debug=P and page_poison=1) # loadpin.enforce=1 # debugfs=no-mount (or off if possible) # # Mitigations of CPU vulnerabilities: # Аrch-independent: -# mitigations=auto,nosmt +# mitigations=auto,nosmt (nosmt is slow) # X86: # spectre_v2=on # pti=on @@ -403,7 +402,6 @@ def construct_checklist(l, arch): l += [AND(OptCheck('self_protection', 'my', 'UBSAN_BOUNDS', 'y'), OptCheck('self_protection', 'my', 'UBSAN_MISC', 'is not set'), OptCheck('self_protection', 'my', 'UBSAN_TRAP', 'y'))] - l += [OptCheck('self_protection', 'my', 'SLUB_DEBUG_ON', 'y')] # TODO: is it better to set that via kernel cmd? l += [OptCheck('self_protection', 'my', 'RESET_ATTACK_MITIGATION', 'y')] # needs userspace support (systemd) if arch == 'X86_64': l += [AND(OptCheck('self_protection', 'my', 'AMD_IOMMU_V2', 'y'),