lkml.org 
[lkml]   [2015]   [May]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 07/10] uprobes/x86: Introduce arch_uretprobe_is_alive()
Hi Pratyush,

sorry for delay, vacation.

On 05/18, Pratyush Anand wrote:
> Hi Oleg,
>
> On Monday 04 May 2015 06:19 PM, Oleg Nesterov wrote:
>> +bool __weak arch_uretprobe_is_alive(struct arch_uretprobe *auret, struct pt_regs *regs)
>> +{
>> + return true;
>> +}
>
> IIUC, then this function should return false when both auret and regs
> are corresponding to same retprobe, else we need to return true, right?

Not sure I understand what you mean...

This function should return false when we know that this return_instance
was invalidated by longjmp().

> If that is the case, then should n't following work for all the cases:
>
> return sp != auret->sp;

No, this can't work.

On x86 "sp == auret->sp" only right after the "call" insn, the stack
can grow after that but this does not mean that this instance is no
longer valid.

Oleg.



\
 
 \ /
  Last update: 2015-05-20 18:21    [W:0.461 / U:0.072 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site