linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Andrey Konovalov <andreyknvl@gmail.com>
To: Marco Elver <elver@google.com>, Chanho Min <chanho.min@lge.com>
Cc: Dmitry Vyukov <dvyukov@google.com>,
	Andrey Ryabinin <ryabinin.a.a@gmail.com>,
	 Alexander Potapenko <glider@google.com>,
	Vincenzo Frascino <vincenzo.frascino@arm.com>,
	 kasan-dev@googlegroups.com, linux-mm@kvack.org,
	linux-kernel@vger.kernel.org,  gunho.lee@lge.com
Subject: Re: [PATCH] kasan: fix mention for KASAN_HW_TAGS
Date: Tue, 20 Jun 2023 18:32:50 +0200	[thread overview]
Message-ID: <CA+fCnZfi_o6QbfDamUjsPXjtnEwKyBn8y+T8=zxV2mEpA=DUyQ@mail.gmail.com> (raw)
In-Reply-To: <CANpmjNMSfVeDa-YC-RQcZ-V=wvHGi43xvXSvaR0GQkEP0OOmOQ@mail.gmail.com>

On Mon, Jun 19, 2023 at 1:36 PM Marco Elver <elver@google.com> wrote:
>
> On Mon, 19 Jun 2023 at 12:15, Dmitry Vyukov <dvyukov@google.com> wrote:
> > On Mon, 19 Jun 2023 at 12:12, Chanho Min <chanho.min@lge.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."


  reply	other threads:[~2023-06-20 16:33 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-19 10:12 Chanho Min
2023-06-19 10:14 ` Dmitry Vyukov
2023-06-19 11:36   ` Marco Elver
2023-06-20 16:32     ` Andrey Konovalov [this message]
2023-06-23  7:58       ` [PATCH v2] " Chanho Min
2023-06-23 12:40         ` Andrey Konovalov

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='CA+fCnZfi_o6QbfDamUjsPXjtnEwKyBn8y+T8=zxV2mEpA=DUyQ@mail.gmail.com' \
    --to=andreyknvl@gmail.com \
    --cc=chanho.min@lge.com \
    --cc=dvyukov@google.com \
    --cc=elver@google.com \
    --cc=glider@google.com \
    --cc=gunho.lee@lge.com \
    --cc=kasan-dev@googlegroups.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=ryabinin.a.a@gmail.com \
    --cc=vincenzo.frascino@arm.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