On Tue, Jun 23, 2026 at 02:52:32PM +0200, Oleg Nesterov wrote:
> On 06/22, David Windsor wrote:
> >
> > --- a/arch/x86/kernel/uprobes.c
> > +++ b/arch/x86/kernel/uprobes.c
> > @@ -1246,8 +1246,12 @@ static int default_post_xol_op(struct arch_uprobe 
> > *auprobe, struct pt_regs *regs
> >             long correction = utask->vaddr - utask->xol_vaddr;
> >             regs->ip += correction;
> >     } else if (auprobe->defparam.fixups & UPROBE_FIX_CALL) {
> > +           unsigned long retaddr = utask->vaddr + auprobe->defparam.ilen;
> > +
> >             regs->sp += sizeof_long(regs); /* Pop incorrect return address 
> > */
> > -           if (emulate_push_stack(regs, utask->vaddr + 
> > auprobe->defparam.ilen))
> > +           if (emulate_push_stack(regs, retaddr))
> > +                   return -ERESTART;
> > +           if (shstk_update_last_frame(retaddr))
> >                     return -ERESTART;
> 
> Well, if shstk_update_last_frame() fails after emulate_push_stack(), we should
> probably return another error, so that the caller handle_singlestep() will 
> kill
> this task?

Makes sense, the other user has a force_sig(SIGSEGV) on failure.

Reply via email to