[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CA+fCnZdk1gksiMMJVMe-fb56_4ZFUaaOLa4EZx0RCSR-3xd4AQ@mail.gmail.com>
Date: Thu, 30 Dec 2021 20:11:35 +0100
From: Andrey Konovalov <andreyknvl@...il.com>
To: Marco Elver <elver@...gle.com>
Cc: andrey.konovalov@...ux.dev,
Alexander Potapenko <glider@...gle.com>,
Andrew Morton <akpm@...ux-foundation.org>,
Dmitry Vyukov <dvyukov@...gle.com>,
Andrey Ryabinin <ryabinin.a.a@...il.com>,
kasan-dev <kasan-dev@...glegroups.com>,
Linux Memory Management List <linux-mm@...ck.org>,
Vincenzo Frascino <vincenzo.frascino@....com>,
Catalin Marinas <catalin.marinas@....com>,
Will Deacon <will@...nel.org>,
Mark Rutland <mark.rutland@....com>,
Linux ARM <linux-arm-kernel@...ts.infradead.org>,
Peter Collingbourne <pcc@...gle.com>,
Evgenii Stepanov <eugenis@...gle.com>,
LKML <linux-kernel@...r.kernel.org>,
Andrey Konovalov <andreyknvl@...gle.com>
Subject: Re: [PATCH mm v4 29/39] kasan, page_alloc: allow skipping memory init
for HW_TAGS
On Tue, Dec 21, 2021 at 1:12 PM Marco Elver <elver@...gle.com> wrote:
>
> On Mon, Dec 20, 2021 at 11:02PM +0100, andrey.konovalov@...ux.dev wrote:
> > From: Andrey Konovalov <andreyknvl@...gle.com>
> [...]
> > +static inline bool should_skip_init(gfp_t flags)
> > +{
> > + /* Don't skip if a software KASAN mode is enabled. */
> > + if (IS_ENABLED(CONFIG_KASAN_GENERIC) ||
> > + IS_ENABLED(CONFIG_KASAN_SW_TAGS))
> > + return false;
> > +
> > + /* Don't skip, if hardware tag-based KASAN is not enabled. */
> > + if (!kasan_hw_tags_enabled())
> > + return false;
>
> Why is the IS_ENABLED(CONFIG_KASAN_{GENERIC,SW_TAGS}) check above
> required? Isn't kasan_hw_tags_enabled() always false if one of those is
> configured?
It is. I wanted to include those checks for completeness, but maybe
they just cause confusion instead. Will drop them in v5. Thanks!
Powered by blists - more mailing lists