diff options
author | Ilya Leoshkevich <iii@linux.ibm.com> | 2020-06-30 20:52:03 +0200 |
---|---|---|
committer | Heiko Carstens <hca@linux.ibm.com> | 2020-07-20 10:55:50 +0200 |
commit | 05a68e892e89c97df6650cd8cc55058002657cbc (patch) | |
tree | 50da3706b76870f99a1acf549c9cbf4227388baf /arch/s390/kernel/kprobes.c | |
parent | s390/kernel: unify EX_TABLE* implementations (diff) | |
download | linux-05a68e892e89c97df6650cd8cc55058002657cbc.tar.xz linux-05a68e892e89c97df6650cd8cc55058002657cbc.zip |
s390/kernel: expand exception table logic to allow new handling options
This is a s390 port of commit 548acf19234d ("x86/mm: Expand the
exception table logic to allow new handling options"), which is needed
for implementing BPF_PROBE_MEM on s390.
The new handler field is made 64-bit in order to allow pointing from
dynamically allocated entries to handlers in kernel text. Unlike on x86,
NULL is used instead of ex_handler_default. This is because exception
tables are used by boot/text_dma.S, and it would be a pain to preserve
ex_handler_default.
The new infrastructure is ignored in early_pgm_check_handler, since
there is no pt_regs.
Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
Reviewed-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Diffstat (limited to 'arch/s390/kernel/kprobes.c')
-rw-r--r-- | arch/s390/kernel/kprobes.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/arch/s390/kernel/kprobes.c b/arch/s390/kernel/kprobes.c index 548d0ea9808d..d2a71d872638 100644 --- a/arch/s390/kernel/kprobes.c +++ b/arch/s390/kernel/kprobes.c @@ -523,10 +523,8 @@ static int kprobe_trap_handler(struct pt_regs *regs, int trapnr) * zero, try to fix up. */ entry = s390_search_extables(regs->psw.addr); - if (entry) { - regs->psw.addr = extable_fixup(entry); + if (entry && ex_handle(entry, regs)) return 1; - } /* * fixup_exception() could not handle it, |