diff options
Diffstat (limited to 'arch/s390/kernel')
| -rw-r--r-- | arch/s390/kernel/entry.h | 1 | ||||
| -rw-r--r-- | arch/s390/kernel/idle.c | 6 | ||||
| -rw-r--r-- | arch/s390/kernel/pgm_check.S | 2 | ||||
| -rw-r--r-- | arch/s390/kernel/ptrace.c | 7 | ||||
| -rw-r--r-- | arch/s390/kernel/runtime_instr.c | 2 | ||||
| -rw-r--r-- | arch/s390/kernel/setup.c | 6 | 
6 files changed, 13 insertions, 11 deletions
| diff --git a/arch/s390/kernel/entry.h b/arch/s390/kernel/entry.h index faca269d5f27..a44ddc2f2dec 100644 --- a/arch/s390/kernel/entry.h +++ b/arch/s390/kernel/entry.h @@ -26,6 +26,7 @@ void do_protection_exception(struct pt_regs *regs);  void do_dat_exception(struct pt_regs *regs);  void do_secure_storage_access(struct pt_regs *regs);  void do_non_secure_storage_access(struct pt_regs *regs); +void do_secure_storage_violation(struct pt_regs *regs);  void addressing_exception(struct pt_regs *regs);  void data_exception(struct pt_regs *regs); diff --git a/arch/s390/kernel/idle.c b/arch/s390/kernel/idle.c index 88bb42ca5008..f7f1e64e0d98 100644 --- a/arch/s390/kernel/idle.c +++ b/arch/s390/kernel/idle.c @@ -33,21 +33,19 @@ void enabled_wait(void)  		PSW_MASK_IO | PSW_MASK_EXT | PSW_MASK_MCHECK;  	clear_cpu_flag(CIF_NOHZ_DELAY); -	trace_cpu_idle_rcuidle(1, smp_processor_id());  	local_irq_save(flags);  	/* Call the assembler magic in entry.S */  	psw_idle(idle, psw_mask);  	local_irq_restore(flags); -	trace_cpu_idle_rcuidle(PWR_EVENT_EXIT, smp_processor_id());  	/* Account time spent with enabled wait psw loaded as idle time. */ -	write_seqcount_begin(&idle->seqcount); +	raw_write_seqcount_begin(&idle->seqcount);  	idle_time = idle->clock_idle_exit - idle->clock_idle_enter;  	idle->clock_idle_enter = idle->clock_idle_exit = 0ULL;  	idle->idle_time += idle_time;  	idle->idle_count++;  	account_idle_time(cputime_to_nsecs(idle_time)); -	write_seqcount_end(&idle->seqcount); +	raw_write_seqcount_end(&idle->seqcount);  }  NOKPROBE_SYMBOL(enabled_wait); diff --git a/arch/s390/kernel/pgm_check.S b/arch/s390/kernel/pgm_check.S index 2c27907a5ffc..9a92638360ee 100644 --- a/arch/s390/kernel/pgm_check.S +++ b/arch/s390/kernel/pgm_check.S @@ -80,7 +80,7 @@ PGM_CHECK(do_dat_exception)		/* 3b */  PGM_CHECK_DEFAULT			/* 3c */  PGM_CHECK(do_secure_storage_access)	/* 3d */  PGM_CHECK(do_non_secure_storage_access)	/* 3e */ -PGM_CHECK_DEFAULT			/* 3f */ +PGM_CHECK(do_secure_storage_violation)	/* 3f */  PGM_CHECK(monitor_event_exception)	/* 40 */  PGM_CHECK_DEFAULT			/* 41 */  PGM_CHECK_DEFAULT			/* 42 */ diff --git a/arch/s390/kernel/ptrace.c b/arch/s390/kernel/ptrace.c index 11d2f7d05f91..a76dd27fb2e8 100644 --- a/arch/s390/kernel/ptrace.c +++ b/arch/s390/kernel/ptrace.c @@ -1268,7 +1268,6 @@ static bool is_ri_cb_valid(struct runtime_instr_cb *cb)  		cb->pc == 1 &&  		cb->qc == 0 &&  		cb->reserved2 == 0 && -		cb->key == PAGE_DEFAULT_KEY &&  		cb->reserved3 == 0 &&  		cb->reserved4 == 0 &&  		cb->reserved5 == 0 && @@ -1330,7 +1329,11 @@ static int s390_runtime_instr_set(struct task_struct *target,  		kfree(data);  		return -EINVAL;  	} - +	/* +	 * Override access key in any case, since user space should +	 * not be able to set it, nor should it care about it. +	 */ +	ri_cb.key = PAGE_DEFAULT_KEY >> 4;  	preempt_disable();  	if (!target->thread.ri_cb)  		target->thread.ri_cb = data; diff --git a/arch/s390/kernel/runtime_instr.c b/arch/s390/kernel/runtime_instr.c index 125c7f6e8715..1788a5454b6f 100644 --- a/arch/s390/kernel/runtime_instr.c +++ b/arch/s390/kernel/runtime_instr.c @@ -57,7 +57,7 @@ static void init_runtime_instr_cb(struct runtime_instr_cb *cb)  	cb->k = 1;  	cb->ps = 1;  	cb->pc = 1; -	cb->key = PAGE_DEFAULT_KEY; +	cb->key = PAGE_DEFAULT_KEY >> 4;  	cb->v = 1;  } diff --git a/arch/s390/kernel/setup.c b/arch/s390/kernel/setup.c index e600f6953d7c..c2c1b4e723ea 100644 --- a/arch/s390/kernel/setup.c +++ b/arch/s390/kernel/setup.c @@ -619,7 +619,7 @@ static struct notifier_block kdump_mem_nb = {  /*   * Make sure that the area behind memory_end is protected   */ -static void reserve_memory_end(void) +static void __init reserve_memory_end(void)  {  	if (memory_end_set)  		memblock_reserve(memory_end, ULONG_MAX); @@ -628,7 +628,7 @@ static void reserve_memory_end(void)  /*   * Make sure that oldmem, where the dump is stored, is protected   */ -static void reserve_oldmem(void) +static void __init reserve_oldmem(void)  {  #ifdef CONFIG_CRASH_DUMP  	if (OLDMEM_BASE) @@ -640,7 +640,7 @@ static void reserve_oldmem(void)  /*   * Make sure that oldmem, where the dump is stored, is protected   */ -static void remove_oldmem(void) +static void __init remove_oldmem(void)  {  #ifdef CONFIG_CRASH_DUMP  	if (OLDMEM_BASE) |