On Fri, Jan 29, 2021 at 12:35:07PM +0800, Huang Pei wrote: > MIPS always save kernel stack pointer in regs[29] > > Signed-off-by: Huang Pei <huangpei@xxxxxxxxxxx> > --- > arch/mips/include/asm/ptrace.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/arch/mips/include/asm/ptrace.h b/arch/mips/include/asm/ptrace.h > index 1e76774b36dd..daf3cf244ea9 100644 > --- a/arch/mips/include/asm/ptrace.h > +++ b/arch/mips/include/asm/ptrace.h > @@ -53,7 +53,7 @@ struct pt_regs { > > static inline unsigned long kernel_stack_pointer(struct pt_regs *regs) > { > - return regs->regs[31]; > + return regs->regs[29]; hmm, I'm still wondering where the trick is... looks like this is used for uprobes, so nobody has ever used uprobes or I'm missing something. How did you find that ? Thomas. -- Crap can work. Given enough thrust pigs will fly, but it's not necessarily a good idea. [ RFC1925, 2.3 ]