[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CA+fCnZfi_o6QbfDamUjsPXjtnEwKyBn8y+T8=zxV2mEpA=DUyQ@mail.gmail.com>
Date: Tue, 20 Jun 2023 18:32:50 +0200
From: Andrey Konovalov <andreyknvl@...il.com>
To: Marco Elver <elver@...gle.com>, Chanho Min <chanho.min@....com>
Cc: Dmitry Vyukov <dvyukov@...gle.com>,
Andrey Ryabinin <ryabinin.a.a@...il.com>,
Alexander Potapenko <glider@...gle.com>,
Vincenzo Frascino <vincenzo.frascino@....com>,
kasan-dev@...glegroups.com, linux-mm@...ck.org,
linux-kernel@...r.kernel.org, gunho.lee@....com
Subject: Re: [PATCH] kasan: fix mention for KASAN_HW_TAGS
On Mon, Jun 19, 2023 at 1:36 PM Marco Elver <elver@...gle.com> wrote:
>
> On Mon, 19 Jun 2023 at 12:15, Dmitry Vyukov <dvyukov@...gle.com> wrote:
> > On Mon, 19 Jun 2023 at 12:12, Chanho Min <chanho.min@....com> wrote:
> > >
> > > This patch removes description of the KASAN_HW_TAGS's memory consumption.
> > > KASAN_HW_TAGS does not set 1/32nd shadow memory.
> >
> > The hardware still allocates/uses shadow in MTE.
> > Though, it may be 1/16-th, not sure.
1/32 is correct: 4 bits for every 16 bytes.
> I think the point is that it depends on the hardware implementation of
> MTE. There are a range of possibilities, but enabling KASAN_HW_TAGS
> doesn't consume any extra memory for tags itself if the hardware has
> to enable MTE and provision tag space via firmware to begin with.
Yeah, saying that HW_TAGS consumes memory is wrong.
But it might reasonable to spell out what happens with memory in the
config options description. Something like:
"Does not consume memory by itself but relies on the 1/32nd of
available memory being reserved by the firmware when MTE is enabled."
Powered by blists - more mailing lists