summaryrefslogtreecommitdiffstats
path: root/arch/s390/kernel/smp.c
diff options
context:
space:
mode:
authorVasily Gorbik <gor@linux.ibm.com>2017-11-20 12:13:52 +0100
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2018-10-09 11:21:26 +0200
commit9e8df6daed9e59153624e52aa4832ddaf39f1ae8 (patch)
treea8e09dfddde0eed16b6665d677d69b55422be560 /arch/s390/kernel/smp.c
parentcompiler: introduce __no_sanitize_address_or_inline (diff)
downloadlinux-9e8df6daed9e59153624e52aa4832ddaf39f1ae8.tar.xz
linux-9e8df6daed9e59153624e52aa4832ddaf39f1ae8.zip
s390/smp: kasan stack instrumentation support
smp_start_secondary function is called without DAT enabled. To avoid disabling kasan instrumentation for entire arch/s390/kernel/smp.c smp_start_secondary has been split in 2 parts. smp_start_secondary has instrumentation disabled, it does minimal setup and enables DAT. Then instrumentated __smp_start_secondary is called to do the rest. __load_psw_mask function instrumentation has been disabled as well to be able to call it from smp_start_secondary. 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>
Diffstat (limited to 'arch/s390/kernel/smp.c')
-rw-r--r--arch/s390/kernel/smp.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/s390/kernel/smp.c b/arch/s390/kernel/smp.c
index 032d98bfc60a..c98059faee46 100644
--- a/arch/s390/kernel/smp.c
+++ b/arch/s390/kernel/smp.c
@@ -804,6 +804,8 @@ static void smp_init_secondary(void)
{
int cpu = smp_processor_id();
+ S390_lowcore.last_update_clock = get_tod_clock();
+ restore_access_regs(S390_lowcore.access_regs_save_area);
cpu_init();
preempt_disable();
init_cpu_timer();
@@ -823,14 +825,12 @@ static void smp_init_secondary(void)
/*
* Activate a secondary processor.
*/
-static void smp_start_secondary(void *cpuvoid)
+static void __no_sanitize_address smp_start_secondary(void *cpuvoid)
{
- S390_lowcore.last_update_clock = get_tod_clock();
S390_lowcore.restart_stack = (unsigned long) restart_stack;
S390_lowcore.restart_fn = (unsigned long) do_restart;
S390_lowcore.restart_data = 0;
S390_lowcore.restart_source = -1UL;
- restore_access_regs(S390_lowcore.access_regs_save_area);
__ctl_load(S390_lowcore.cregs_save_area, 0, 15);
__load_psw_mask(PSW_KERNEL_BITS | PSW_MASK_DAT);
CALL_ON_STACK(smp_init_secondary, S390_lowcore.kernel_stack, 0);