Skip to content

Commit 9f68a4c

Browse files
zzby0GUIDINGLI
authored andcommitted
mm/kasan: default enable DISABLE_READS_CHECK
Change CONFIG_MM_KASAN_DISABLE_READS_CHECK default from n to y. This disables read-side instrumentation (--param asan-instrument-reads=0) by default, significantly reducing KASAN CPU overhead on hot paths like UART serial I/O. Write-side checks remain active to catch use-after-free and buffer overflows on write. Most memory corruption bugs (UAF, heap overflow, stack overflow) are caught by write-side checks. Read-side checks add substantial overhead with relatively lower detection value in embedded RTOS environments. Signed-off-by: guanyi3 <guanyi3@xiaomi.com>
1 parent edd1269 commit 9f68a4c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎mm/kasan/Kconfig‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ config MM_KASAN_DISABLE_NULL_POINTER_CHECK
111111

112112
config MM_KASAN_DISABLE_READS_CHECK
113113
bool "Disable reads check"
114-
default n
114+
default y
115115
---help---
116116
This option disables kasan reads check. It speeds up performance
117117
compared with default read/write check. Only disable it when you are

0 commit comments

Comments
 (0)