diff options
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/kprobes.c | 18 | ||||
-rw-r--r-- | kernel/sys_ni.c | 2 |
2 files changed, 13 insertions, 7 deletions
diff --git a/kernel/kprobes.c b/kernel/kprobes.c index 831978cebf1d..06f58309fed2 100644 --- a/kernel/kprobes.c +++ b/kernel/kprobes.c | |||
@@ -1410,16 +1410,10 @@ static inline int check_kprobe_rereg(struct kprobe *p) | |||
1410 | return ret; | 1410 | return ret; |
1411 | } | 1411 | } |
1412 | 1412 | ||
1413 | static int check_kprobe_address_safe(struct kprobe *p, | 1413 | int __weak arch_check_ftrace_location(struct kprobe *p) |
1414 | struct module **probed_mod) | ||
1415 | { | 1414 | { |
1416 | int ret = 0; | ||
1417 | unsigned long ftrace_addr; | 1415 | unsigned long ftrace_addr; |
1418 | 1416 | ||
1419 | /* | ||
1420 | * If the address is located on a ftrace nop, set the | ||
1421 | * breakpoint to the following instruction. | ||
1422 | */ | ||
1423 | ftrace_addr = ftrace_location((unsigned long)p->addr); | 1417 | ftrace_addr = ftrace_location((unsigned long)p->addr); |
1424 | if (ftrace_addr) { | 1418 | if (ftrace_addr) { |
1425 | #ifdef CONFIG_KPROBES_ON_FTRACE | 1419 | #ifdef CONFIG_KPROBES_ON_FTRACE |
@@ -1431,7 +1425,17 @@ static int check_kprobe_address_safe(struct kprobe *p, | |||
1431 | return -EINVAL; | 1425 | return -EINVAL; |
1432 | #endif | 1426 | #endif |
1433 | } | 1427 | } |
1428 | return 0; | ||
1429 | } | ||
1434 | 1430 | ||
1431 | static int check_kprobe_address_safe(struct kprobe *p, | ||
1432 | struct module **probed_mod) | ||
1433 | { | ||
1434 | int ret; | ||
1435 | |||
1436 | ret = arch_check_ftrace_location(p); | ||
1437 | if (ret) | ||
1438 | return ret; | ||
1435 | jump_label_lock(); | 1439 | jump_label_lock(); |
1436 | preempt_disable(); | 1440 | preempt_disable(); |
1437 | 1441 | ||
diff --git a/kernel/sys_ni.c b/kernel/sys_ni.c index 02aa4185b17e..61eea02b53f5 100644 --- a/kernel/sys_ni.c +++ b/kernel/sys_ni.c | |||
@@ -169,6 +169,8 @@ cond_syscall(ppc_rtas); | |||
169 | cond_syscall(sys_spu_run); | 169 | cond_syscall(sys_spu_run); |
170 | cond_syscall(sys_spu_create); | 170 | cond_syscall(sys_spu_create); |
171 | cond_syscall(sys_subpage_prot); | 171 | cond_syscall(sys_subpage_prot); |
172 | cond_syscall(sys_s390_pci_mmio_read); | ||
173 | cond_syscall(sys_s390_pci_mmio_write); | ||
172 | 174 | ||
173 | /* mmu depending weak syscall entries */ | 175 | /* mmu depending weak syscall entries */ |
174 | cond_syscall(sys_mprotect); | 176 | cond_syscall(sys_mprotect); |