This is a note to let you know that I've just added the patch titled Revert "ia64: kprobes: Fix to pass correct trampoline address to the handler" to the 4.19-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: revert-ia64-kprobes-fix-to-pass-correct-trampoline-address-to-the-handler.patch and it can be found in the queue-4.19 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From foo@baz Fri Apr 29 10:57:56 AM CEST 2022 From: Masami Hiramatsu <mhiramat@xxxxxxxxxx> Date: Tue, 26 Apr 2022 23:26:04 +0900 Subject: Revert "ia64: kprobes: Fix to pass correct trampoline address to the handler" To: stable@xxxxxxxxxxxxxxx, Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> Cc: mhiramat@xxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx, Ingo Molnar <mingo@xxxxxxxxxx>, Sasha Levin <sashal@xxxxxxxxxx> Message-ID: <165098316441.1366179.4768446584587876237.stgit@devnote2> From: Masami Hiramatsu <mhiramat@xxxxxxxxxx> This reverts commit f5f96e3643dc33d6117cf7047e73512046e4858b. The commit f5f96e3643dc ("ia64: kprobes: Fix to pass correct trampoline address to the handler") was wrongly backported. It involves another commit which is a part of another bigger series, so it should not be backported to the stable tree. Signed-off-by: Masami Hiramatsu <mhiramat@xxxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- arch/ia64/kernel/kprobes.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) --- a/arch/ia64/kernel/kprobes.c +++ b/arch/ia64/kernel/kprobes.c @@ -411,8 +411,7 @@ static void kretprobe_trampoline(void) int __kprobes trampoline_probe_handler(struct kprobe *p, struct pt_regs *regs) { - regs->cr_iip = __kretprobe_trampoline_handler(regs, - dereference_function_descriptor(kretprobe_trampoline), NULL); + regs->cr_iip = __kretprobe_trampoline_handler(regs, kretprobe_trampoline, NULL); /* * By returning a non-zero value, we are telling * kprobe_handler() that we don't want the post_handler @@ -428,7 +427,7 @@ void __kprobes arch_prepare_kretprobe(st ri->fp = NULL; /* Replace the return addr with trampoline addr */ - regs->b0 = (unsigned long)dereference_function_descriptor(kretprobe_trampoline); + regs->b0 = ((struct fnptr *)kretprobe_trampoline)->ip; } /* Check the instruction in the slot is break */ @@ -958,14 +957,14 @@ static struct kprobe trampoline_p = { int __init arch_init_kprobes(void) { trampoline_p.addr = - dereference_function_descriptor(kretprobe_trampoline); + (kprobe_opcode_t *)((struct fnptr *)kretprobe_trampoline)->ip; return register_kprobe(&trampoline_p); } int __kprobes arch_trampoline_kprobe(struct kprobe *p) { if (p->addr == - dereference_function_descriptor(kretprobe_trampoline)) + (kprobe_opcode_t *)((struct fnptr *)kretprobe_trampoline)->ip) return 1; return 0; Patches currently in stable-queue which might be from mhiramat@xxxxxxxxxx are queue-4.19/ia64-kprobes-fix-to-pass-correct-trampoline-address-to-the-handler.patch queue-4.19/revert-ia64-kprobes-fix-to-pass-correct-trampoline-address-to-the-handler.patch queue-4.19/revert-ia64-kprobes-use-generic-kretprobe-trampoline-handler.patch