]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
s390/kasan: provide uninstrumented __strlen
authorVasily Gorbik <gor@linux.ibm.com>
Mon, 12 Aug 2019 13:52:07 +0000 (15:52 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 5 Oct 2019 11:13:44 +0000 (13:13 +0200)
commit14944c1cdf66a25dd1079f3fecb8b04e4ef8c270
tree5bdfb4637d708113b9dc92b9b10a03e42b4d4e05
parentad856c85132c4a5f699ec39e9a6c938617103827
s390/kasan: provide uninstrumented __strlen

[ Upstream commit f45f7b5bdaa4828ce871cf03f7c01599a0de57a5 ]

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 7e0d92f00246 ("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: 7e0d92f00246 ("s390/kasan: improve string/memory functions checks")
Acked-by: Ilya Leoshkevich <iii@linux.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/s390/include/asm/string.h