diff options
| -rw-r--r-- | arch/s390/kernel/entry.S | 4 | ||||
| -rw-r--r-- | arch/s390/kernel/entry64.S | 4 | ||||
| -rw-r--r-- | arch/s390/kernel/mcount.S | 2 | ||||
| -rw-r--r-- | arch/s390/kernel/mcount64.S | 2 | ||||
| -rw-r--r-- | arch/s390/kernel/process.c | 9 | ||||
| -rw-r--r-- | arch/s390/kernel/time.c | 3 | ||||
| -rw-r--r-- | arch/s390/kernel/traps.c | 6 | ||||
| -rw-r--r-- | arch/s390/kernel/vtime.c | 5 | 
8 files changed, 26 insertions, 9 deletions
| diff --git a/arch/s390/kernel/entry.S b/arch/s390/kernel/entry.S index 1ecc337fb679..68d1a02db6be 100644 --- a/arch/s390/kernel/entry.S +++ b/arch/s390/kernel/entry.S @@ -188,6 +188,8 @@ STACK_SIZE  = 1 << STACK_SHIFT  	ssm	__SF_EMPTY(%r15)  	.endm +	.section .kprobes.text, "ax" +  /*   * Scheduler resume function, called by switch_to   *  gpr2 = (task_struct *) prev @@ -861,6 +863,8 @@ restart_crash:  restart_go:  #endif +	.section .kprobes.text, "ax" +  #ifdef CONFIG_CHECK_STACK  /*   * The synchronous or the asynchronous stack overflowed. We are dead. diff --git a/arch/s390/kernel/entry64.S b/arch/s390/kernel/entry64.S index 8f3e802174db..1c0dce58933a 100644 --- a/arch/s390/kernel/entry64.S +++ b/arch/s390/kernel/entry64.S @@ -197,6 +197,8 @@ _TIF_SYSCALL = (_TIF_SYSCALL_TRACE>>8 | _TIF_SYSCALL_AUDIT>>8 | \  	ssm	__SF_EMPTY(%r15)  	.endm +	.section .kprobes.text, "ax" +  /*   * Scheduler resume function, called by switch_to   *  gpr2 = (task_struct *) prev @@ -868,6 +870,8 @@ restart_crash:  restart_go:  #endif +	.section .kprobes.text, "ax" +  #ifdef CONFIG_CHECK_STACK  /*   * The synchronous or the asynchronous stack overflowed. We are dead. diff --git a/arch/s390/kernel/mcount.S b/arch/s390/kernel/mcount.S index dfe015d7398c..4a6e1a575f9e 100644 --- a/arch/s390/kernel/mcount.S +++ b/arch/s390/kernel/mcount.S @@ -7,6 +7,8 @@  #include <asm/asm-offsets.h> +	.section .kprobes.text, "ax" +  	.globl ftrace_stub  ftrace_stub:  	br	%r14 diff --git a/arch/s390/kernel/mcount64.S b/arch/s390/kernel/mcount64.S index c37211c6092b..b2bae06ad6c7 100644 --- a/arch/s390/kernel/mcount64.S +++ b/arch/s390/kernel/mcount64.S @@ -7,6 +7,8 @@  #include <asm/asm-offsets.h> +	.section .kprobes.text, "ax" +  	.globl ftrace_stub  ftrace_stub:  	br	%r14 diff --git a/arch/s390/kernel/process.c b/arch/s390/kernel/process.c index ec2e03b22ead..b825b3e1cb17 100644 --- a/arch/s390/kernel/process.c +++ b/arch/s390/kernel/process.c @@ -32,6 +32,7 @@  #include <linux/kernel_stat.h>  #include <linux/syscalls.h>  #include <linux/compat.h> +#include <linux/kprobes.h>  #include <asm/compat.h>  #include <asm/uaccess.h>  #include <asm/pgtable.h> @@ -116,15 +117,17 @@ void cpu_idle(void)  	}  } -extern void kernel_thread_starter(void); +extern void __kprobes kernel_thread_starter(void);  asm( -	".align 4\n" +	".section .kprobes.text, \"ax\"\n" +	".global kernel_thread_starter\n"  	"kernel_thread_starter:\n"  	"    la    2,0(10)\n"  	"    basr  14,9\n"  	"    la    2,0\n" -	"    br    11\n"); +	"    br    11\n" +	".previous\n");  int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags)  { diff --git a/arch/s390/kernel/time.c b/arch/s390/kernel/time.c index f754a6dc4f94..4c9d72d2e273 100644 --- a/arch/s390/kernel/time.c +++ b/arch/s390/kernel/time.c @@ -37,6 +37,7 @@  #include <linux/clocksource.h>  #include <linux/clockchips.h>  #include <linux/gfp.h> +#include <linux/kprobes.h>  #include <asm/uaccess.h>  #include <asm/delay.h>  #include <asm/s390_ext.h> @@ -60,7 +61,7 @@ static DEFINE_PER_CPU(struct clock_event_device, comparators);  /*   * Scheduler clock - returns current time in nanosec units.   */ -unsigned long long notrace sched_clock(void) +unsigned long long notrace __kprobes sched_clock(void)  {  	return (get_clock_monotonic() * 125) >> 9;  } diff --git a/arch/s390/kernel/traps.c b/arch/s390/kernel/traps.c index 70640822621a..bc4f32fcfa57 100644 --- a/arch/s390/kernel/traps.c +++ b/arch/s390/kernel/traps.c @@ -451,8 +451,8 @@ static inline void do_fp_trap(struct pt_regs *regs, void __user *location,  		"floating point exception", regs, &si);  } -static void illegal_op(struct pt_regs *regs, long pgm_int_code, -		       unsigned long trans_exc_code) +static void __kprobes illegal_op(struct pt_regs *regs, long pgm_int_code, +				 unsigned long trans_exc_code)  {  	siginfo_t info;          __u8 opcode[6]; @@ -688,7 +688,7 @@ static void space_switch_exception(struct pt_regs *regs, long pgm_int_code,  	do_trap(pgm_int_code, SIGILL, "space switch event", regs, &info);  } -asmlinkage void kernel_stack_overflow(struct pt_regs * regs) +asmlinkage void __kprobes kernel_stack_overflow(struct pt_regs * regs)  {  	bust_spinlocks(1);  	printk("Kernel stack overflow.\n"); diff --git a/arch/s390/kernel/vtime.c b/arch/s390/kernel/vtime.c index 7eff9b7347c0..8636dd00e393 100644 --- a/arch/s390/kernel/vtime.c +++ b/arch/s390/kernel/vtime.c @@ -20,6 +20,7 @@  #include <linux/rcupdate.h>  #include <linux/posix-timers.h>  #include <linux/cpu.h> +#include <linux/kprobes.h>  #include <asm/s390_ext.h>  #include <asm/timer.h> @@ -122,7 +123,7 @@ void account_system_vtime(struct task_struct *tsk)  }  EXPORT_SYMBOL_GPL(account_system_vtime); -void vtime_start_cpu(__u64 int_clock, __u64 enter_timer) +void __kprobes vtime_start_cpu(__u64 int_clock, __u64 enter_timer)  {  	struct s390_idle_data *idle = &__get_cpu_var(s390_idle);  	struct vtimer_queue *vq = &__get_cpu_var(virt_cpu_timer); @@ -162,7 +163,7 @@ void vtime_start_cpu(__u64 int_clock, __u64 enter_timer)  	idle->sequence++;  } -void vtime_stop_cpu(void) +void __kprobes vtime_stop_cpu(void)  {  	struct s390_idle_data *idle = &__get_cpu_var(s390_idle);  	struct vtimer_queue *vq = &__get_cpu_var(virt_cpu_timer); | 
