ptrace: Introduce exception_ip arch hook
authorJiaxun Yang <jiaxun.yang@flygoat.com>
Fri, 2 Feb 2024 12:30:26 +0000 (12:30 +0000)
committerThomas Bogendoerfer <tsbogend@alpha.franken.de>
Mon, 12 Feb 2024 22:04:34 +0000 (23:04 +0100)
commit11ba1728be3edb6928791f4c622f154ebe228ae6
treef60c7001335271870aaa3e6f3bef8996b22a1e9c
parentd55347bfe4e66dce2e1e7501e5492f4af3e315f8
ptrace: Introduce exception_ip arch hook

On architectures with delay slot, architecture level instruction
pointer (or program counter) in pt_regs may differ from where
exception was triggered.

Introduce exception_ip hook to invoke architecture code and determine
actual instruction pointer to the exception.

Link: https://lore.kernel.org/lkml/00d1b813-c55f-4365-8d81-d70258e10b16@app.fastmail.com/
Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
arch/mips/include/asm/ptrace.h
arch/mips/kernel/ptrace.c
include/linux/ptrace.h