s390/kasan: dynamic shadow mem allocation for modules
authorVasily Gorbik <gor@linux.ibm.com>
Fri, 17 Nov 2017 17:22:24 +0000 (18:22 +0100)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Tue, 9 Oct 2018 09:21:23 +0000 (11:21 +0200)
commit793213a82de4ccc96f394ea5deaaf57c0bb01f0b
tree49afe68d1ca1ed84868329f647fee2483f3ebb62
parent0dac8f6bc3699f28d807ad3a5ec575e18da8ba62
s390/kasan: dynamic shadow mem allocation for modules

Move from modules area entire shadow memory preallocation to dynamic
allocation per module load.

This behaivior has been introduced for x86 with bebf56a1b: "This patch
also forces module_alloc() to return 8*PAGE_SIZE aligned address making
shadow memory handling ( kasan_module_alloc()/kasan_module_free() )
more simple. Such alignment guarantees that each shadow page backing
modules address space correspond to only one module_alloc() allocation"

Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
arch/s390/kernel/module.c
arch/s390/mm/kasan_init.c