linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Matthew Wilcox <willy@infradead.org>
To: Peter Collingbourne <pcc@google.com>
Cc: Andrey Konovalov <andreyknvl@gmail.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org,
	stable@vger.kernel.org
Subject: Re: [PATCH] mm: use compare-exchange operation to set KASAN page tag
Date: Thu, 13 Jan 2022 03:32:38 +0000	[thread overview]
Message-ID: <Yd+dVmATnfdMfQVN@casper.infradead.org> (raw)
In-Reply-To: <20220113031434.464992-1-pcc@google.com>

On Wed, Jan 12, 2022 at 07:14:34PM -0800, Peter Collingbourne wrote:
> It has been reported that the tag setting operation on newly-allocated
> pages can cause the page flags to be corrupted when performed
> concurrently with other flag updates as a result of the use of
> non-atomic operations. Fix the problem by using a compare-exchange
> loop to update the tag.

I really dislike it that kasan has taken some page flags for its use.
I would much prefer it if kasan used some page_ext_flags.  It's somewhat
slower to access them, and they take up a bit of extra space (unless
you already have CONFIG_PAGE_EXTENSION enabled).  But page flags are a
really scarce resource and kasan has taken 9.


  reply	other threads:[~2022-01-13  3:32 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-13  3:14 [PATCH] mm: use compare-exchange operation to set KASAN page tag Peter Collingbourne
2022-01-13  3:32 ` Matthew Wilcox [this message]
2022-01-14 21:58 ` Andrey Konovalov
2022-01-18 22:38   ` 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=Yd+dVmATnfdMfQVN@casper.infradead.org \
    --to=willy@infradead.org \
    --cc=akpm@linux-foundation.org \
    --cc=andreyknvl@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=pcc@google.com \
    --cc=stable@vger.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).