Hi Andi, Please find the updated patch including your suggestions below. Please let me know your comments. Thanks Prasanna > +void jprobe_return(void) > +{ > + preempt_enable_no_resched(); > + asm volatile (" xchgl %%ebx,%%esp \n" > + " int3 \n"::"b" > + (jprobe_saved_esp):"memory"); > +} > > whatever the preempt disable is protecting against, why isn't it a > problem during the xchgl ? > > > +#define MAX_STACK_SIZE 64 > > +#define MIN_STACK_SIZE(ADDR) ((((ADDR) + MAX_STACK_SIZE) < \ > > + (((ADDR) & PAGE_MASK) + PAGE_SIZE) ? ((ADDR) + MAX_STACK_SIZE) \ > > + : (((ADDR) & PAGE_MASK) + PAGE_SIZE )) - (ADDR)) > > What is this macro doing exactly? > > If it is an attempt to not read beyond the kernel stack top i think > it is wrong. It will also randomly fail on 8k stacks at top-4K > > Use something like > > max_t(unsigned long,MAX_STACK_SIZE, current_thread_info() + THREAD_SIZE - addr) > > > The rest looks ok. > > -Andi > -- Prasanna S Panchamukhi Linux Technology Center India Software Labs, IBM Bangalore Ph: 91-80-25044636