linux-api.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Catalin Marinas <catalin.marinas@arm.com>
To: Peter Collingbourne <pcc@google.com>
Cc: Evgenii Stepanov <eugenis@google.com>,
	Kostya Serebryany <kcc@google.com>,
	Vincenzo Frascino <vincenzo.frascino@arm.com>,
	Dave Martin <Dave.Martin@arm.com>, Will Deacon <will@kernel.org>,
	Oleg Nesterov <oleg@redhat.com>,
	"Eric W. Biederman" <ebiederm@xmission.com>,
	"James E.J. Bottomley" <James.Bottomley@hansenpartnership.com>,
	Linux ARM <linux-arm-kernel@lists.infradead.org>,
	Kevin Brodsky <kevin.brodsky@arm.com>,
	Andrey Konovalov <andreyknvl@google.com>,
	Richard Henderson <rth@twiddle.net>,
	Linux API <linux-api@vger.kernel.org>,
	Helge Deller <deller@gmx.de>,
	David Spickett <david.spickett@linaro.org>
Subject: Re: [PATCH v13 8/8] arm64: expose FAR_EL1 tag bits in siginfo
Date: Wed, 4 Nov 2020 17:45:50 +0000	[thread overview]
Message-ID: <20201104174549.GG28902@gaia> (raw)
In-Reply-To: <CAMn1gO4q-7dEnCeF-PaL6K48jcpV-sJwnOSbT6JdL9NAd0XBWA@mail.gmail.com>

On Tue, Nov 03, 2020 at 11:16:53AM -0800, Peter Collingbourne wrote:
> On Tue, Nov 3, 2020 at 10:33 AM Catalin Marinas <catalin.marinas@arm.com> wrote:
> > That said, I wonder whether we could solve this for MTE without new
> > fields by always setting the tag in si_addr when si_code is SEGV_MTE*.
> 
> This wouldn't solve the problem for MTE in the case where there is a
> non-linear buffer overflow that extends into an unmapped page, in
> which case we would get a SEGV_MAPERR that we would still need the tag
> bits for.

What I was thinking of is to only present the tags for SEGV_MTE* faults
(tag check faults). Is the tag relevant for a SEGV_MAPERR fault?

> > Alternatively, we could add a prctl() bit to require tagged si_addr.
> 
> It's an option that we considered but I would be concerned about the
> compatibility implications of this. In practice, on Android we would
> always have this bit set, so applications would be exposed to the tag
> bits in si_addr. If applications have previously relied on the
> documented behavior that the tag bits are unset, they may get confused
> by them now being set. It also wouldn't provide a way for the kernel
> to communicate which tag bits are valid.

It depends what you mean by application. If the MTE enabling and signal
handling is done from zygote, I suspect the rest of the app won't
install its own signal handlers, so they can't get confused.

For standard Linux processes and glibc, the feature wouldn't be enabled
by default even if MTE was turned on (we'd add a new prctl() bit).

Anyway, I'm not saying we should go for this approach, just making sure
that we explored all the options (sorry, should have read the previous
12 series ;)).

-- 
Catalin

  reply	other threads:[~2020-11-04 17:45 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-03  4:09 [PATCH v13 0/8] arm64: expose FAR_EL1 tag bits in siginfo Peter Collingbourne
2020-11-03  4:09 ` [PATCH v13 1/8] parisc: Drop parisc special case for __sighandler_t Peter Collingbourne
2020-11-04 16:54   ` Eric W. Biederman
2020-11-04 17:24     ` Catalin Marinas
2020-11-04 17:36       ` Eric W. Biederman
2020-11-04 18:00       ` Dave Martin
2020-11-04 20:46       ` Peter Collingbourne
2020-11-03  4:09 ` [PATCH v13 2/8] parisc: start using signal-defs.h Peter Collingbourne
2020-11-04 18:05   ` Eric W. Biederman
2020-11-03  4:09 ` [PATCH v13 3/8] arch: move SA_* definitions to generic headers Peter Collingbourne
2020-11-04 18:47   ` Eric W. Biederman
2020-11-04 20:48     ` Peter Collingbourne
2020-11-03  4:09 ` [PATCH v13 4/8] signal: clear non-uapi flag bits when passing/returning sa_flags Peter Collingbourne
2020-11-03  4:09 ` [PATCH v13 5/8] signal: define the SA_UNSUPPORTED bit in sa_flags Peter Collingbourne
2020-11-03  4:09 ` [PATCH v13 6/8] signal: deduplicate code dealing with common _sigfault fields Peter Collingbourne
2020-11-03  4:09 ` [PATCH v13 7/8] signal: define the field siginfo.si_faultflags Peter Collingbourne
2020-11-03 17:53   ` Catalin Marinas
2020-11-03 18:39     ` Peter Collingbourne
2020-11-04 10:57       ` Dave Martin
2020-11-04 18:23       ` Catalin Marinas
2020-11-04 19:57         ` Peter Collingbourne
2020-11-03  4:09 ` [PATCH v13 8/8] arm64: expose FAR_EL1 tag bits in siginfo Peter Collingbourne
2020-11-03 18:33   ` Catalin Marinas
2020-11-03 19:16     ` Peter Collingbourne
2020-11-04 17:45       ` Catalin Marinas [this message]
2020-11-04 18:27         ` Peter Collingbourne

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=20201104174549.GG28902@gaia \
    --to=catalin.marinas@arm.com \
    --cc=Dave.Martin@arm.com \
    --cc=James.Bottomley@hansenpartnership.com \
    --cc=andreyknvl@google.com \
    --cc=david.spickett@linaro.org \
    --cc=deller@gmx.de \
    --cc=ebiederm@xmission.com \
    --cc=eugenis@google.com \
    --cc=kcc@google.com \
    --cc=kevin.brodsky@arm.com \
    --cc=linux-api@vger.kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=oleg@redhat.com \
    --cc=pcc@google.com \
    --cc=rth@twiddle.net \
    --cc=vincenzo.frascino@arm.com \
    --cc=will@kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).