On Mon, 11 May 2020 20:19:52 +1000, Nicholas Piggin wrote: > Returning from an interrupt or syscall to a signal handler currently > begins execution directly at the handler's entry point, with LR set to > the address of the sigreturn trampoline. When the signal handler > function returns, it runs the trampoline. It looks like this: > > # interrupt at user address xyz > # kernel stuff... signal is raised > rfid > # void handler(int sig) > addis 2,12,.TOC.-.LCF0@ha > addi 2,2,.TOC.-.LCF0@l > mflr 0 > std 0,16(1) > stdu 1,-96(1) > # handler stuff > ld 0,16(1) > mtlr 0 > blr > # __kernel_sigtramp_rt64 > addi r1,r1,__SIGNAL_FRAMESIZE > li r0,__NR_rt_sigreturn > sc > # kernel executes rt_sigreturn > rfid > # back to user address xyz > > [...]
Applied to powerpc/next. [1/1] powerpc/64/signal: Balance return predictor stack in signal trampoline https://git.kernel.org/powerpc/c/0138ba5783ae0dcc799ad401a1e8ac8333790df9 cheers