From: Mikael Pettersson <mikpelinux@gmail.com>
To: Andy Lutomirski <luto@amacapital.net>
Cc: Kees Cook <keescook@chromium.org>,
"linux-kernel\@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: SIGSYS annoyance
Date: Fri, 10 Jun 2016 11:08:56 +0200 [thread overview]
Message-ID: <22362.33704.293079.558345@gargle.gargle.HOWL> (raw)
In-Reply-To: <CALCETrWm+-=6D1ABUNUkHHmcscm9Er+BbdUuW6bG8us+veAiNQ@mail.gmail.com>
Andy Lutomirski writes:
> On Mon, Jun 6, 2016 at 9:03 AM, Kees Cook <keescook@chromium.org> wrote:
> > On Fri, Jun 3, 2016 at 10:16 PM, Andy Lutomirski <luto@amacapital.net> wrote:
> >> https://bugzilla.mozilla.org/show_bug.cgi?id=1176099
> >>
> >> Should SIGSYS be delivered to the handler even if blocked? What, if
> >> anything, does POSIX say? All I can find is in pthread_sigmask(3p):
> >>
> >> If any of the SIGFPE, SIGILL, SIGSEGV, or SIGBUS signals are generated
> >> while they are blocked, the result is undefined, unless the signal was
> >> generated by the action of another process, or by one of the functions
> >> kill(), pthread_kill(), raise(), or sigqueue().
> >>
> >> It would be easy enough to change our behavior so that we deliver the
> >> signal even if it's blocked or to at least add a flag so that users
> >> can request that behavior.
> >
> > I had trouble following that bug. It sounded like glib just needed a
> > way to define its signal mask, and that's what they ended up
> > implementing?
> >
> > I think the current behavior is correct. SIGSYS is being generated by
> > the running process (i.e. the seccomp filter) and if it has a handler
> > but the signal is blocked, we should treat it as uncaught and kill. On
> > the other hand, it could be seen like "raise", in which case the
> > blocking should be ignored? Is there an active problem somewhere here?
> > It seems like the referenced bug has been fixed already.
>
> Agreed.
>
> It could make sense to have a new sigaction flag SA_FORCE: when set,
> if a non-default handler is installed, the signal is blocked, and the
> signal is triggered synchronously (forced), then the handler will be
> called. But that isn't specific to seccomp.
Blocking a signal is a very deliberate act. If some piece of code wants
to force-deliver it, it can unblock it first. IOW, I don't see the need
for this SA_FORCE thing.
prev parent reply other threads:[~2016-06-10 9:09 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-04 5:16 Andy Lutomirski
2016-06-06 16:03 ` Kees Cook
2016-06-09 17:21 ` Andy Lutomirski
2016-06-10 9:08 ` Mikael Pettersson [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=22362.33704.293079.558345@gargle.gargle.HOWL \
--to=mikpelinux@gmail.com \
--cc=keescook@chromium.org \
--cc=linux-kernel@vger.kernel.org \
--cc=luto@amacapital.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®