LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Mikael Pettersson <mikpelinux@gmail.com>
To: Andy Lutomirski <luto@amacapital.net>
Cc: Mikael Pettersson <mikpelinux@gmail.com>,
Jann Horn <jann@thejh.net>, Linux API <linux-api@vger.kernel.org>,
"linux-kernel\@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Michael Kerrisk <mtk.manpages@gmail.com>,
Russell King <linux@arm.linux.org.uk>,
Catalin Marinas <catalin.marinas@arm.com>,
Will Deacon <will.deacon@arm.com>,
Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>, "H. Peter Anvin" <hpa@zytor.com>,
X86 ML <x86@kernel.org>, Jeff Dike <jdike@addtoit.com>,
Richard Weinberger <richard@nod.at>,
Kees Cook <keescook@chromium.org>, Will Drewry <wad@chromium.org>
Subject: Re: [PATCH] Don't allow blocking of signals using sigreturn.
Date: Thu, 12 Mar 2015 08:22:18 +0100 [thread overview]
Message-ID: <21761.16042.371226.277890@gargle.gargle.HOWL> (raw)
In-Reply-To: <CALCETrXy=ftik5U7nD9D+u8z-jLBOG_xX20QTDoP-CkV3=U2Vg@mail.gmail.com>
Andy Lutomirski writes:
> On Wed, Mar 11, 2015 at 2:43 PM, Mikael Pettersson <mikpelinux@gmail.com> wrote:
> > Jann Horn writes:
> > > Or should I throw this patch away and write a patch
> > > for the prctl() manpage instead that documents that
> > > being able to call sigreturn() implies being able to
> > > effectively call sigprocmask(), at least on some
> > > architectures like X86?
> >
> > Well, that is the semantics of sigreturn(). It is essentially
> > setcontext() [which includes the actions of sigprocmask()], but
> > with restrictions on parameter placement (at least on x86).
> >
> > You could introduce some setting to restrict that aspect for
> > seccomp processes, but you can't change this for normal processes
> > without breaking things.
>
> Which leads to the interesting question: does anyone ever call
> sigreturn with a different signal mask than the kernel put there
> during signal delivery
Yes. Either a sigfillset();sigdelset(SIGSEGV), or a copy of the
thread's sigmask from a previous sigframe.
> or, even more strangely, with a totally made up
> context?
Not "totally made up", but certainly with adjustments(*) made to
both GPRs and PC. In a different piece of SW: FPU controls.
(*) Rolling back or force-committing a micro-transaction until
PC+GPRs represent the state at an original instruction boundary.
This was in a product using dynamic binary instrumentation.
next prev parent reply other threads:[~2015-03-12 7:22 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-11 17:42 Jann Horn
2015-03-11 21:43 ` Mikael Pettersson
2015-03-11 22:26 ` Andy Lutomirski
2015-03-12 7:22 ` Mikael Pettersson [this message]
2015-03-12 13:07 ` [PATCH] seccomp.2: Add note about alarm(2) not being sufficient to limit runtime Jann Horn
2015-03-12 17:30 ` Andy Lutomirski
2015-03-12 17:33 ` Kees Cook
2015-03-12 20:01 ` Mikael Pettersson
2015-03-22 19:28 ` Michael Kerrisk (man-pages)
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=21761.16042.371226.277890@gargle.gargle.HOWL \
--to=mikpelinux@gmail.com \
--cc=catalin.marinas@arm.com \
--cc=hpa@zytor.com \
--cc=jann@thejh.net \
--cc=jdike@addtoit.com \
--cc=keescook@chromium.org \
--cc=linux-api@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@arm.linux.org.uk \
--cc=luto@amacapital.net \
--cc=mingo@redhat.com \
--cc=mtk.manpages@gmail.com \
--cc=richard@nod.at \
--cc=tglx@linutronix.de \
--cc=wad@chromium.org \
--cc=will.deacon@arm.com \
--cc=x86@kernel.org \
--subject='Re: [PATCH] Don'\''t allow blocking of signals using sigreturn.' \
/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
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).