Re: [linus:master] [kasan] a414d4286f: INFO:trying_to_register_non-static_key

From: Marco Elver
Date: Thu Jan 11 2024 - 10:02:46 EST


On Thu, 11 Jan 2024 at 16:00, Tetsuo Handa
<penguin-kernel@xxxxxxxxxxxxxxxxxxx> wrote:
>
> Commit a414d4286f34 ("kasan: handle concurrent kasan_record_aux_stack calls")
> calls raw_spin_lock_init(&alloc_meta->aux_lock) after __memset() in
> kasan_init_object_meta(), but does not call raw_spin_lock_init() after __memset()
> in release_alloc_meta(), resulting in lock map information being zeroed out?
>
> We should not zero out the whole sizeof(struct kasan_alloc_meta) bytes from
> release_alloc_meta() in order not to undo raw_spin_lock_init() from
> kasan_init_object_meta() ?

Does this fix it:
https://lore.kernel.org/all/20240109221234.90929-1-andrey.konovalov@xxxxxxxxx/

> On 2024/01/11 16:29, kernel test robot wrote:
> > [ 1.582812][ T0] INFO: trying to register non-static key.
> > [ 1.583305][ T0] The code is fine but needs lockdep annotation, or maybe
> > [ 1.583887][ T0] you didn't initialize this object before use?
> > [ 1.584409][ T0] turning off the locking correctness validator.
>
> --
> You received this message because you are subscribed to the Google Groups "kasan-dev" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to kasan-dev+unsubscribe@xxxxxxxxxxxxxxxx.
> To view this discussion on the web visit https://groups.google.com/d/msgid/kasan-dev/b1adbb1c-62b7-459f-a1bb-63774895fbb3%40I-love.SAKURA.ne.jp.