[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Yd+dVmATnfdMfQVN@casper.infradead.org>
Date: Thu, 13 Jan 2022 03:32:38 +0000
From: Matthew Wilcox <willy@...radead.org>
To: Peter Collingbourne <pcc@...gle.com>
Cc: Andrey Konovalov <andreyknvl@...il.com>,
Andrew Morton <akpm@...ux-foundation.org>, linux-mm@...ck.org,
linux-kernel@...r.kernel.org, stable@...r.kernel.org
Subject: Re: [PATCH] mm: use compare-exchange operation to set KASAN page tag
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.
Powered by blists - more mailing lists