Re: [PATCH] kunit: kasan_test: disable fortify string checker on kmalloc_oob_memset

From: Andrey Konovalov
Date: Wed Dec 13 2023 - 19:27:02 EST


On Wed, Dec 13, 2023 at 10:42 PM Nico Pache <npache@xxxxxxxxxx> wrote:
>
> > > diff --git a/mm/kasan/kasan_test.c b/mm/kasan/kasan_test.c
> > > index 8281eb42464b..5aeba810ba70 100644
> > > --- a/mm/kasan/kasan_test.c
> > > +++ b/mm/kasan/kasan_test.c
> > > @@ -493,14 +493,17 @@ static void kmalloc_oob_memset_2(struct kunit *test)
> > > {
> > > char *ptr;
> > > size_t size = 128 - KASAN_GRANULE_SIZE;
> > > + size_t size2 = 2;
> >
> > Let's name this variable access_size or memset_size. Here and in the
> > other changed tests.
>
> Hi Andrey,
>
> I agree that is a better variable name, but I chose size2 because
> other kasan tests follow the same pattern.

These other tests use size1 and size2 to refer to different sizes of
krealloc allocations, which seems reasonable.

> Please let me know if you still want me to update it given that info
> and I'll send a V2.

Yes, please update the name.

Thank you!