[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAG48ez0-DYzYP4pWgJF-bT4EbQcNmt08F-7zM+twa0bjjVRFLQ@mail.gmail.com>
Date: Fri, 2 Aug 2024 10:16:01 +0200
From: Jann Horn <jannh@...gle.com>
To: Marco Elver <elver@...gle.com>
Cc: Andrey Ryabinin <ryabinin.a.a@...il.com>, Alexander Potapenko <glider@...gle.com>,
Andrey Konovalov <andreyknvl@...il.com>, Dmitry Vyukov <dvyukov@...gle.com>,
Vincenzo Frascino <vincenzo.frascino@....com>, Andrew Morton <akpm@...ux-foundation.org>,
Christoph Lameter <cl@...ux.com>, Pekka Enberg <penberg@...nel.org>, David Rientjes <rientjes@...gle.com>,
Joonsoo Kim <iamjoonsoo.kim@....com>, Vlastimil Babka <vbabka@...e.cz>,
Roman Gushchin <roman.gushchin@...ux.dev>, Hyeonggon Yoo <42.hyeyoo@...il.com>,
kasan-dev@...glegroups.com, linux-kernel@...r.kernel.org, linux-mm@...ck.org
Subject: Re: [PATCH v5 2/2] slub: Introduce CONFIG_SLUB_RCU_DEBUG
On Fri, Aug 2, 2024 at 10:06 AM Marco Elver <elver@...gle.com> wrote:
>
> On Tue, Jul 30, 2024 at 01:06PM +0200, Jann Horn wrote:
> [...]
> > +#ifdef CONFIG_SLUB_RCU_DEBUG
> > + if ((s->flags & SLAB_TYPESAFE_BY_RCU) && !after_rcu_delay) {
> > + struct rcu_delayed_free *delayed_free;
> > +
> > + delayed_free = kmalloc(sizeof(*delayed_free), GFP_NOWAIT);
>
> This may well be allocated by KFENCE.
>
> [...]
> > +#ifdef CONFIG_SLUB_RCU_DEBUG
> > +static void slab_free_after_rcu_debug(struct rcu_head *rcu_head)
> > +{
> > + struct rcu_delayed_free *delayed_free =
> > + container_of(rcu_head, struct rcu_delayed_free, head);
> > + void *object = delayed_free->object;
> > + struct slab *slab = virt_to_slab(object);
> > + struct kmem_cache *s;
> > +
> > + if (WARN_ON(is_kfence_address(rcu_head)))
> > + return;
>
> syzbot found this warning to trigger (because see above comment):
> https://lore.kernel.org/all/00000000000052aa15061eaeb1fd@google.com/
>
> Should this have been `is_kfence_address(object)`?
Whoops, indeed... thanks, will fix in v6.
Powered by blists - more mailing lists