]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
ptrace: Introduce exception_ip arch hook
authorJiaxun Yang <jiaxun.yang@flygoat.com>
Fri, 2 Feb 2024 12:30:26 +0000 (12:30 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 23 Feb 2024 08:24:53 +0000 (09:24 +0100)
commitfdd12a80f64fbe68307619f3e83ed17e12118de3
tree58a04d48c62fada491d0d531135f8e4a6f92909f
parent2252913f156fffb0b5bec3a88e266104b69f3c9b
ptrace: Introduce exception_ip arch hook

[ Upstream commit 11ba1728be3edb6928791f4c622f154ebe228ae6 ]

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>
Stable-dep-of: 8fa507083388 ("mm/memory: Use exception ip to search exception tables")
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/mips/include/asm/ptrace.h
arch/mips/kernel/ptrace.c
include/linux/ptrace.h