linux-doc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Yeoreum Yun <yeoreum.yun@arm.com>
To: Peter Collingbourne <pcc@google.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>,
	will@kernel.org, broonie@kernel.org, anshuman.khandual@arm.com,
	joey.gouly@arm.com, yury.khrustalev@arm.com, maz@kernel.org,
	oliver.upton@linux.dev, frederic@kernel.org,
	shmeerali.kolothum.thodi@huawei.com, james.morse@arm.com,
	mark.rutland@arm.com, huangxiaojia2@huawei.com,
	akpm@linux-foundation.org, surenb@google.com,
	robin.murphy@arm.com, linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org,
	nd@arm.com
Subject: Re: [PATCH v3 2/3] arm64/mm/fault: use original FAR_EL1 value when ARM64_MTE_FAR is supported
Date: Tue, 6 May 2025 15:33:48 +0100	[thread overview]
Message-ID: <aBodzNRLzLK8shA+@e129823.arm.com> (raw)
In-Reply-To: <CAMn1gO4Ft2R+_CN+XdTsO0YpUQZN7zShMSg-XT90U698Rnifjw@mail.gmail.com>

Hi Peter,

> On Fri, May 2, 2025 at 10:08 AM Catalin Marinas <catalin.marinas@arm.com> wrote:
> >
> > + Peter Collingbourne as he added the SA_EXPOSE_TAGBITS flag.
> >
> > On Thu, Apr 10, 2025 at 08:47:20AM +0100, Yeoreum Yun wrote:
> > > Use the original FAR_EL1 value when an MTE tag check fault occurs,
> > > if ARM64_MTE_FAR is supported.
> > > This allows reports to include not only the logical tag (memory tag)
> > > but also the address tag information.
> > >
> > > Applications that require this information should install a signal handler with
> > > the SA_EXPOSE_TAGBITS flag.
> > > While this introduces a minor ABI change,
> > > most applications do not set this flag and therefore will not be affected.
> >
> > It is indeed a minor ABI in that a tag check fault resulting in a
> > signal will report the bits 63:60 as well, not just 59:56 of the address
> > (if the signal handler was registered with SA_EXPOSE_TAGBITS).
> >
> > I don't think user-space would notice but asking Peter.
>
> On Android we don't set bits 63:60 on heap addresses when MTE is
> enabled (and userspace programs aren't allowed to modify them in
> addresses they get back from the heap allocator either) so the fault
> handler should continue to see them as 0. Of course, a userspace
> program could be breaking the rules and setting those bits anyway, but
> in that case it looks like the only consequence would be that the
> error reports from the heap allocator would sometimes be missing some
> information (and this could already happen if the access results in a
> non-MTE fault) which I think is acceptable.
>
> Peter

Thanks for your confirmation :)

--
Sincerely,
Yeoreum Yun

  reply	other threads:[~2025-05-06 14:34 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-10  7:47 [PATCH v3 0/3] support FEAT_MTE_TAGGED_FAR feature Yeoreum Yun
2025-04-10  7:47 ` [PATCH v3 1/3] arm64: add " Yeoreum Yun
2025-05-02 17:12   ` Catalin Marinas
2025-05-06 23:54     ` Yeoreum Yun
2025-04-10  7:47 ` [PATCH v3 2/3] arm64/mm/fault: use original FAR_EL1 value when ARM64_MTE_FAR is supported Yeoreum Yun
2025-05-02 17:08   ` Catalin Marinas
2025-05-02 18:25     ` Peter Collingbourne
2025-05-06 14:33       ` Yeoreum Yun [this message]
2025-04-10  7:47 ` [PATCH v3 3/3] tools/kselftest: add MTE_FAR hwcap test Yeoreum Yun
2025-05-02 17:15   ` Catalin Marinas
2025-05-06 23:56     ` Yeoreum Yun
2025-04-24 13:49 ` [PATCH v3 0/3] support FEAT_MTE_TAGGED_FAR feature Yeoreum Yun

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=aBodzNRLzLK8shA+@e129823.arm.com \
    --to=yeoreum.yun@arm.com \
    --cc=akpm@linux-foundation.org \
    --cc=anshuman.khandual@arm.com \
    --cc=broonie@kernel.org \
    --cc=catalin.marinas@arm.com \
    --cc=frederic@kernel.org \
    --cc=huangxiaojia2@huawei.com \
    --cc=james.morse@arm.com \
    --cc=joey.gouly@arm.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=maz@kernel.org \
    --cc=nd@arm.com \
    --cc=oliver.upton@linux.dev \
    --cc=pcc@google.com \
    --cc=robin.murphy@arm.com \
    --cc=shmeerali.kolothum.thodi@huawei.com \
    --cc=surenb@google.com \
    --cc=will@kernel.org \
    --cc=yury.khrustalev@arm.com \
    /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).