archive mirror
 help / color / mirror / Atom feed
From: Andrey Konovalov <>
To: Jann Horn <>
Cc: Dmitry Vyukov <>,
	Andrey Ryabinin <>,
	 Christoph Lameter <>,
	Pekka Enberg <>,
	David Rientjes <>,
	 Joonsoo Kim <>,
	Vlastimil Babka <>,
	 Alexander Potapenko <>,
	Vincenzo Frascino <>,
	 Andrew Morton <>,
	Roman Gushchin <>,
	 Hyeonggon Yoo <>,,,,,
Subject: Re: [PATCH] slub: Introduce CONFIG_SLUB_RCU_DEBUG
Date: Sat, 16 Sep 2023 18:18:54 +0200	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <>

On Mon, Aug 28, 2023 at 4:40 PM Jann Horn <> wrote:
> > Can't we unpoision this rcu_head right before call_rcu() and repoison
> > after receiving the callback?
> Yeah, I think that should work. It looks like currently
> kasan_unpoison() is exposed in include/linux/kasan.h but
> kasan_poison() is not, and its inline definition probably means I
> can't just move it out of mm/kasan/kasan.h into include/linux/kasan.h;
> do you have a preference for how I should handle this? Hmm, and it
> also looks like code outside of mm/kasan/ anyway wouldn't know what
> are valid values for the "value" argument to kasan_poison().
> I also have another feature idea that would also benefit from having
> something like kasan_poison() available in include/linux/kasan.h, so I
> would prefer that over adding another special-case function inside
> KASAN for poisoning this piece of slab metadata...

This is a problem only for the Generic mode, right? You already call
kasan_reset_tag on the rcu_head, which should suppress the reporting
for the tag-based modes.

If so, would it be possible to reuse metadata_access_enable/disable?
They are used for accessing slub_debug metadata and seem to fit nicely
with this case as well.

I also second Macro's comment to add a test for the new functionality.

Thanks for working on this!

  parent reply	other threads:[~2023-09-16 16:31 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-25 21:14 [PATCH] slub: Introduce CONFIG_SLUB_RCU_DEBUG Jann Horn
2023-08-26  3:32 ` Dmitry Vyukov
2023-08-28 14:39   ` Jann Horn
2023-09-11  9:50     ` Dmitry Vyukov
2023-09-16 16:18     ` Andrey Konovalov [this message]
2023-09-05  7:57 ` kernel test robot
2023-09-11 11:51 ` Marco Elver

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:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='' \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \

* 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).