Stas, I probably missed something, but I don't understand your concerns,That's likely the reason for EPERM: restore_sigaltstack()
On 02/01, Stas Sergeev wrote:
01.02.2016 21:04, Oleg Nesterov ÐÐÑÐÑ:Nothing? restore_sigaltstack() should work as expected?
Yes, and SS_FORCE means "I know what I do", looks very simple.But to me its not because I don't know what to do with
uc_stack after SS_FORCE is applied.
Yes, that's what I do in my app already.Yes, orI won't argue, but to me it would be better to keep this EPERM if !force.Ok then. Lets implement SS_FORCE.
Just because we should avoid the incompatible changes if possible.
What semantic should it have wrt uc_stack?
sigaltstack(SS_DISABLE | SS_FORCE);
swapcontext();
sigaltstack(set up new_sas);
rt_sigreturn();
sigaltstack({ DISABLE | FORCE}, &old_ss);
swapcontext();
sigaltstack(&old_ss, NULL);
rt_sigreturn();
and if you are going to return from sighandler you do not even need the 2nd
sigaltstack(), you can rely on sigreturn.
Allowing the modifications that were previously EPERMedWhat's at the end? Do we want a surprise for the userCan't understand.... do you mean "set up new_sas" will be ignored because
that he's new_sas got ignored?
rt_sigreturn() does restore_sigaltstack() ? I see no problem here...