Skip to content

Commit b6cbe3e

Browse files
Vasily GorbikMartin Schwidefsky
authored andcommitted
s390/kasan: avoid user access code instrumentation
Kasan instrumentation adds "store" check for variables marked as modified by inline assembly. With user pointers containing addresses from another address space this produces false positives. static inline unsigned long clear_user_xc(void __user *to, ...) { asm volatile( ... : "+a" (to) ... User space access functions are wrapped by manually instrumented functions in kasan common code, which should be sufficient to catch errors. So, we just disable uaccess.o instrumentation altogether. Reviewed-by: Martin Schwidefsky <[email protected]> Signed-off-by: Vasily Gorbik <[email protected]> Signed-off-by: Martin Schwidefsky <[email protected]>
1 parent 7fef92c commit b6cbe3e

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

arch/s390/lib/Makefile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,9 @@ lib-$(CONFIG_SMP) += spinlock.o
99
lib-$(CONFIG_KPROBES) += probes.o
1010
lib-$(CONFIG_UPROBES) += probes.o
1111

12+
# Instrumenting memory accesses to __user data (in different address space)
13+
# produce false positives
14+
KASAN_SANITIZE_uaccess.o := n
15+
1216
chkbss := mem.o
1317
include $(srctree)/arch/s390/scripts/Makefile.chkbss

0 commit comments

Comments
 (0)