]> git.baikalelectronics.ru Git - kernel.git/commit
s390/kasan: fix strncpy_from_user kasan checks
authorVasily Gorbik <gor@linux.ibm.com>
Tue, 23 Apr 2019 13:36:36 +0000 (15:36 +0200)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Wed, 24 Apr 2019 11:28:46 +0000 (13:28 +0200)
commit7f950e63075b855642b8ffcc18dd8925617658c1
tree9abe2b37f7a86b1a8dee78064c6592104bc2e71e
parent82696cb3598d3b891e85a8e29bae603c89b5dc66
s390/kasan: fix strncpy_from_user kasan checks

arch/s390/lib/uaccess.c is built without kasan instrumentation. Kasan
checks are performed explicitly in copy_from_user/copy_to_user
functions. But since those functions could be inlined, calls from
files like uaccess.c with instrumentation disabled won't generate
kasan reports. This is currently the case with strncpy_from_user
function which was revealed by newly added kasan test. Avoid inlining of
copy_from_user/copy_to_user when the kernel is built with kasan support
to make sure kasan checks are fully functional.

Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
arch/s390/include/asm/uaccess.h