From: Andrew Morton <akpm@linux-foundation.org>
To: Andrey Konovalov <andreyknvl@gmail.com>
Cc: andrey.konovalov@linux.dev, Marco Elver <elver@google.com>,
Alexander Potapenko <glider@google.com>,
Dmitry Vyukov <dvyukov@google.com>,
Andrey Ryabinin <ryabinin.a.a@gmail.com>,
kasan-dev@googlegroups.com, linux-mm@kvack.org,
linux-kernel@vger.kernel.org,
Andrey Konovalov <andreyknvl@google.com>,
Peter Collingbourne <pcc@google.com>
Subject: Re: [PATCH mm] kasan: reset page tags properly with sampling
Date: Tue, 24 Jan 2023 13:11:22 -0800 [thread overview]
Message-ID: <20230124131122.fdbf6ae3069e6b0d05d14361@linux-foundation.org> (raw)
In-Reply-To: <CA+fCnZeDWxFB0BgUy_tEybtagth=bcGcqqu9LPSOEjKr5j-o8A@mail.gmail.com>
On Tue, 24 Jan 2023 21:46:51 +0100 Andrey Konovalov <andreyknvl@gmail.com> wrote:
> On Tue, Jan 24, 2023 at 9:45 PM Andrew Morton <akpm@linux-foundation.org> wrote:
> >
> > On Tue, 24 Jan 2023 21:35:26 +0100 andrey.konovalov@linux.dev wrote:
> >
> > > The implementation of page_alloc poisoning sampling assumed that
> > > tag_clear_highpage resets page tags for __GFP_ZEROTAGS allocations.
> > > However, this is no longer the case since commit 70c248aca9e7
> > > ("mm: kasan: Skip unpoisoning of user pages").
> > >
> > > This leads to kernel crashes when MTE-enabled userspace mappings are
> > > used with Hardware Tag-Based KASAN enabled.
> > >
> > > Reset page tags for __GFP_ZEROTAGS allocations in post_alloc_hook().
> > >
> > > Also clarify and fix related comments.
> >
> > I assume this is a fix against 44383cef54c0 ("kasan: allow sampling
> > page_alloc allocations for HW_TAGS") which is presently in mm-stable,
> > yes?
>
> Correct. I assumed I shouldn't include a Fixes tag, as the patch is
> not in the mainline.
I think it's best to add the Fixes: if it's known. If the patch was in
mm-unstable then I'd just fold the fix into the base patch, but a
Fixes: is still helpful because it tells people (especially me) which
patch needs the fix.
If the patch is in mm-stable then the SHA is stable and the Fixes: is
desirable for people who are backporting the base patch into earlier
kernels - hopefully when doing this they know to search the tree for
other patches which fix the patch which they are backporting.
prev parent reply other threads:[~2023-01-24 21:11 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-24 20:35 andrey.konovalov
2023-01-24 20:45 ` Andrew Morton
2023-01-24 20:46 ` Andrey Konovalov
2023-01-24 21:11 ` Andrew Morton [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=20230124131122.fdbf6ae3069e6b0d05d14361@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=andrey.konovalov@linux.dev \
--cc=andreyknvl@gmail.com \
--cc=andreyknvl@google.com \
--cc=dvyukov@google.com \
--cc=elver@google.com \
--cc=glider@google.com \
--cc=kasan-dev@googlegroups.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=pcc@google.com \
--cc=ryabinin.a.a@gmail.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