[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20160201185223.GA21136@redhat.com>
Date: Mon, 1 Feb 2016 19:52:23 +0100
From: Oleg Nesterov <oleg@...hat.com>
To: Stas Sergeev <stsp@...t.ru>
Cc: Linux kernel <linux-kernel@...r.kernel.org>,
linux-api@...r.kernel.org, Andy Lutomirski <luto@...capital.net>,
Ingo Molnar <mingo@...hat.com>,
Peter Zijlstra <peterz@...radead.org>,
Andrew Morton <akpm@...ux-foundation.org>,
"Amanieu d'Antras" <amanieu@...il.com>,
Richard Weinberger <richard@....at>, Tejun Heo <tj@...nel.org>,
"Kirill A. Shutemov" <kirill.shutemov@...ux.intel.com>,
Jason Low <jason.low2@...com>,
Heinrich Schuchardt <xypron.glpk@....de>,
Andrea Arcangeli <aarcange@...hat.com>,
Konstantin Khlebnikov <khlebnikov@...dex-team.ru>,
Josh Triplett <josh@...htriplett.org>,
"Eric W. Biederman" <ebiederm@...ssion.com>,
Aleksa Sarai <cyphar@...har.com>,
Paul Moore <pmoore@...hat.com>,
Palmer Dabbelt <palmer@...belt.com>,
Vladimir Davydov <vdavydov@...allels.com>
Subject: Re: [PATCH 4/4] sigaltstack: allow disabling and re-enabling sas
within sighandler
Stas, I probably missed something, but I don't understand your concerns,
On 02/01, Stas Sergeev wrote:
>
> 01.02.2016 21:04, Oleg Nesterov пишет:
> > 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.
Nothing? restore_sigaltstack() should work as expected?
> >I won't argue, but to me it would be better to keep this EPERM if !force.
> >Just because we should avoid the incompatible changes if possible.
> Ok then. Lets implement SS_FORCE.
> What semantic should it have wrt uc_stack?
>
> sigaltstack(SS_DISABLE | SS_FORCE);
> swapcontext();
> sigaltstack(set up new_sas);
> rt_sigreturn();
Yes, or
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.
> What's at the end? Do we want a surprise for the user
> that he's new_sas got ignored?
Can't understand.... do you mean "set up new_sas" will be ignored because
rt_sigreturn() does restore_sigaltstack() ? I see no problem here...
Oleg.
Powered by blists - more mailing lists