On 03/20, Jiri Olsa wrote: > > are you ok if I squash the patches together Yes, thanks, I am fine. But lets discuss this change a bit more. So, with this poc we have the (intentionally) oversimplified SYSCALL_DEFINE0(uretprobe) { struct pt_regs *regs = task_pt_regs(current); unsigned long __user *ax_and_ret = (unsigned long __user *)regs->sp + 2; unsigned long ip, err; ip = regs->ip; regs->orig_ax = -1; err = get_user(regs->ax, ax_and_ret); WARN_ON_ONCE(err); uprobe_handle_trampoline(regs); err = put_user(regs->ip, ax_and_ret); WARN_ON_ONCE(err); regs->ip = ip; return regs->ax; } I have no idea what uprobe consumers / bpf programs can do, so let me ask: - uprobe_consumer's will see the "wrong" values of regs->cx/r11/sp Is it OK? If not - easy to fix. - can uprobe_consumer change regs->cx/r11 ? If yes - easy to fix. - can uprobe_consumer change regs->sp ? If yes - easy to fix too, but needs a separate check/code. Oleg.