]> git.baikalelectronics.ru Git - kernel.git/commit
s390/kasan: provide uninstrumented __strlen
authorVasily Gorbik <gor@linux.ibm.com>
Mon, 12 Aug 2019 13:52:07 +0000 (15:52 +0200)
committerVasily Gorbik <gor@linux.ibm.com>
Wed, 21 Aug 2019 10:58:52 +0000 (12:58 +0200)
commit9fb6b819f5d4b2439657e1d063f96464a6a36974
tree395de5eef3a5529220a46473ab614bf4de149816
parent4083d63672a9332222ad6ae62a167e51e9db1035
s390/kasan: provide uninstrumented __strlen

s390 kasan code uses sclp_early_printk to report initialization
failures. The code doing that should not be instrumented, because kasan
shadow memory has not been set up yet. Even though sclp_early_core.c is
compiled with instrumentation disabled it uses strlen function, which
is instrumented and would produce shadow memory access if used. To
avoid that, introduce uninstrumented __strlen function to be used
instead.

Before commit 94603abc5848 ("s390/kasan: improve string/memory functions
checks") few string functions (including strlen) were escaping kasan
instrumentation due to usage of platform specific versions which are
implemented in inline assembly.

Fixes: 94603abc5848 ("s390/kasan: improve string/memory functions checks")
Acked-by: Ilya Leoshkevich <iii@linux.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
arch/s390/include/asm/string.h