|To:||Franck Bui-Huu <firstname.lastname@example.org>|
|Subject:||Re: Question about signal syscalls !|
|From:||David Daney <email@example.com>|
|Date:||Thu, 01 Feb 2007 09:01:50 -0800|
|Cc:||Ralf Baechle <firstname.lastname@example.org>, linux-mips <email@example.com>|
|References:||<firstname.lastname@example.org> <20070201135734.GB12728@linux-mips.org> <email@example.com>|
|User-agent:||Thunderbird 22.214.171.124 (X11/20061219)|
Franck Bui-Huu wrote:
Hi Ralf, On 2/1/07, Ralf Baechle <firstname.lastname@example.org> wrote:The values of those registers need to be preserved so they can later be copied into the signal frame.Let's take for example sys_sigreturn(). In my understanding this syscall is used automatically when the signal handler returns. At this time, I don't see the point to save the static registers since they have been already saved by setup_sigcontext(). Actually I don't see why they need to be saved/restored at all... Let's say that process P1 sends a signal X to process P2 which has a handler defined for signal X and assume that the static registers are not saved at all. Signal X is received by P2. The signal handler is now executed in user mode. At this point what are the values of the static registers ? I would say they have the same values (let's call this state S) when P2 got interrupted. Once the signal handler returns into the kernel mode by executing 'syscall __NR_sigreturn' instructions, static registers still have state S and this state is normally preserved during sys_sigreturn syscall execution. So when resuming the normal execution of P2, the static registers have the correct values. What am I missing ?
I don't think *any* registers *need* to be saved on sys_sigreturn(). The values in sigcontext on the user stack associated with the system call are all used instead of the actual register values.
|<Prev in Thread]||Current Thread||[Next in Thread>|
|Previous by Date:||Re: RFC: Sentosa boot fix, Franck Bui-Huu|
|Next by Date:||Re: Question about signal syscalls !, Ralf Baechle|
|Previous by Thread:||Re: Question about signal syscalls !, Franck Bui-Huu|
|Next by Thread:||Re: Question about signal syscalls !, Franck Bui-Huu|
|Indexes:||[Date] [Thread] [Top] [All Lists]|