[lkml]   [2022]   [May]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH v3 27/46] kmsan: instrumentation.h: add instrumentation_begin_with_regs()
On Wed, Apr 27, 2022 at 3:28 PM Thomas Gleixner <> wrote:
> On Tue, Apr 26 2022 at 18:42, Alexander Potapenko wrote:
> > +void kmsan_instrumentation_begin(struct pt_regs *regs)
> > +{
> > + struct kmsan_context_state *state = &kmsan_get_context()->cstate;
> > +
> > + if (state)
> > + __memset(state, 0, sizeof(struct kmsan_context_state));
> sizeof(*state) please
> > + if (!kmsan_enabled || !regs)
> > + return;
> Why has state to be cleared when kmsan is not enabled and how do you end up
> with regs == NULL here?
> Thanks,
> tglx
> --
> 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
> To view this discussion on the web visit

As discussed in another thread, I'll be dropping this patch in favor
of the new kmsan_unpoison_entry_regs().

I'll also ensure I consistently use sizeof(*pointer) where applicable.

Regarding regs==NULL, this is actually not a thing.

Alexander Potapenko
Software Engineer

Google Germany GmbH
Erika-Mann-Straße, 33
80636 München

Geschäftsführer: Paul Manicle, Liana Sebastian
Registergericht und -nummer: Hamburg, HRB 86891
Sitz der Gesellschaft: Hamburg

Diese E-Mail ist vertraulich. Falls Sie diese fälschlicherweise
erhalten haben sollten, leiten Sie diese bitte nicht an jemand anderes
weiter, löschen Sie alle Kopien und Anhänge davon und lassen Sie mich
bitte wissen, dass die E-Mail an die falsche Person gesendet wurde.

This e-mail is confidential. If you received this communication by
mistake, please don't forward it to anyone else, please erase all
copies and attachments, and please let me know that it has gone to the
wrong person.

 \ /
  Last update: 2022-05-16 13:50    [W:0.118 / U:0.180 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site