Re: [LSF/MM/BPF TOPIC] faster uprobes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Mar 11, 2024 at 06:02:31PM +0100, Oleg Nesterov wrote:
> On 03/11, Jiri Olsa wrote:
> >
> > On Mon, Mar 11, 2024 at 04:06:59PM +0100, Oleg Nesterov wrote:
> > > I forgot everything about the low-level x86_64 code, but...
> > >
> > > On 03/11, Jiri Olsa wrote:
> > > >
> > > >  #ifdef CONFIG_X86_64
> > > > +
> > > > +asm (
> > > > +       ".pushsection .rodata\n"
> > > > +       ".global uretprobe_syscall_entry\n"
> > > > +       "uretprobe_syscall_entry:\n"
> > > > +       "push %rax\n"
> > > > +       "mov $462, %rax\n"
> > > > +       "syscall\n"
> > >
> > > Hmm... I think you need to save/restore more registers clobbered by
> > > syscall/entry_SYSCALL_64 ?
> >
> > hum, so the call happens on the function call return, so I thought
> > we should just preserve callee saved registers which seems to be
> > taken care of by the entry_SYSCALL_64 path..
> 
> Yes, but we do not know if the (ret)probed function obeys the C-calling
> convention, perhaps it is low level asm code or not a C function.

ah right.. I think we need to make sure all is saved/restored

thanks,
jirka

> 
> > I will double check
> 
> but I won't insist if you think we do not care.
> 
> > > > +
> > > > +	regs->ax = ax;
> > >
> > > probably not strictly needed, we are going to return ax...
> >
> > it needs to be there for the bpf program to read proper return
> > value from regs
> 
> OK, I see, thanks.
> 
> Oleg.
> 




[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux