projects
/
kconfig-hardened-check.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4dcb0cd
)
Add the recommendation about UBSAN_BOUNDS
author
Alexander Popov
<alex.popov@linux.com>
Thu, 22 Oct 2020 18:42:21 +0000
(21:42 +0300)
committer
Alexander Popov
<alex.popov@linux.com>
Thu, 22 Oct 2020 18:42:21 +0000
(21:42 +0300)
Enable UBSAN_BOUNDS and UBSAN_TRAP.
But keep UBSAN_MISC disabled to avoid useless reports.
kconfig_hardened_check/__init__.py
patch
|
blob
|
history
diff --git
a/kconfig_hardened_check/__init__.py
b/kconfig_hardened_check/__init__.py
index 48f40196f082fedac3175318986fb6d866d209ce..1ca05301efe69c1fcc2f0d24c8733ad2d5e7151c 100644
(file)
--- a/
kconfig_hardened_check/__init__.py
+++ b/
kconfig_hardened_check/__init__.py
@@
-395,6
+395,9
@@
def construct_checklist(l, arch):
iommu_support_is_set)]
# 'self_protection', 'my'
+ 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':