Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F148329304
D29454.id86411.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
916 B
Referenced Files
None
Subscribers
None
D29454.id86411.diff
View Options
Index: sys/conf/kern.pre.mk
===================================================================
--- sys/conf/kern.pre.mk
+++ sys/conf/kern.pre.mk
@@ -107,6 +107,16 @@
.endif
DEFINED_PROF= ${PROF}
+KASAN_ENABLED!= grep KASAN opt_global.h || true ; echo
+.if !empty(KASAN_ENABLED)
+SAN_CFLAGS+= -fsanitize=kernel-address \
+ -mllvm -asan-stack=true \
+ -mllvm -asan-instrument-dynamic-allocas=true \
+ -mllvm -asan-globals=true \
+ -mllvm -asan-use-after-scope=true \
+ -mllvm -asan-instrumentation-with-call-threshold=0
+.endif
+
KCSAN_ENABLED!= grep KCSAN opt_global.h || true ; echo
.if !empty(KCSAN_ENABLED)
SAN_CFLAGS+= -fsanitize=thread
Index: sys/conf/options
===================================================================
--- sys/conf/options
+++ sys/conf/options
@@ -229,6 +229,7 @@
# Sanitizers
COVERAGE opt_global.h
+KASAN opt_global.h
KCOV
KCSAN opt_global.h
KUBSAN opt_global.h
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Mar 18, 5:06 AM (16 h, 33 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
29881858
Default Alt Text
D29454.id86411.diff (916 B)
Attached To
Mode
D29454: Add a KASAN option to the kernel build
Attached
Detach File
Event Timeline
Log In to Comment