[PATCH RFC v2 12/21] kasan: inline and rename kasan_unpoison_memory

Dmitry Vyukov dvyukov at google.com
Fri Oct 30 13:46:33 EDT 2020


On Fri, Oct 30, 2020 at 5:35 PM 'Andrey Konovalov' via kasan-dev
<kasan-dev at googlegroups.com> wrote:
> > On Thu, Oct 22, 2020 at 3:19 PM Andrey Konovalov <andreyknvl at google.com> wrote:
> > >
> > > Currently kasan_unpoison_memory() is used as both an external annotation
> > > and as internal memory poisoning helper. Rename external annotation to
> > > kasan_unpoison_data() and inline the internal helper for for hardware
> > > tag-based mode to avoid undeeded function calls.
> > >
> > > There's the external annotation kasan_unpoison_slab() that is currently
> > > defined as static inline and uses kasan_unpoison_memory(). With this
> > > change it's turned into a function call. Overall, this results in the
> > > same number of calls for hardware tag-based mode as
> > > kasan_unpoison_memory() is now inlined.
> >
> > Can't we leave kasan_unpoison_slab as is? Or there are other reasons
> > to uninline it?
>
> Just to have cleaner kasan.h callbacks definitions.
>
> > It seems that uninling it is orthogonal to the rest of this patch.
>
> I can split it out into a separate patch if you think this makes sense?

I don't have a strong opinion either way.



More information about the linux-arm-kernel mailing list