]> git.ipfire.org Git - people/arne_f/kernel.git/commit
s390/kasan: avoid user access code instrumentation
authorVasily Gorbik <gor@linux.ibm.com>
Fri, 17 Nov 2017 16:20:28 +0000 (17:20 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 24 Nov 2019 07:20:44 +0000 (08:20 +0100)
commite78c55ad66571aa6803478b3f4b6379dc18cc137
tree53fae1cdafb6efaf68630ddf56379e71863eb548
parentef5ad4f11e74262692bc194ab28f3dd7ae5e465c
s390/kasan: avoid user access code instrumentation

[ Upstream commit b6cbe3e8bdff6f21f1b58b08a55f479cdcf98282 ]

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 <schwidefsky@de.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/s390/lib/Makefile