[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CA+fCnZeXEi1=fpNxUKLhwWJ=yeTFWLteKzDnLfwKFFC-uDbcHw@mail.gmail.com>
Date: Mon, 5 Sep 2022 22:34:38 +0200
From: Andrey Konovalov <andreyknvl@...il.com>
To: Marco Elver <elver@...gle.com>
Cc: andrey.konovalov@...ux.dev,
Alexander Potapenko <glider@...gle.com>,
Dmitry Vyukov <dvyukov@...gle.com>,
Andrey Ryabinin <ryabinin.a.a@...il.com>,
kasan-dev <kasan-dev@...glegroups.com>,
Peter Collingbourne <pcc@...gle.com>,
Evgenii Stepanov <eugenis@...gle.com>,
Florian Mayer <fmayer@...gle.com>,
Andrew Morton <akpm@...ux-foundation.org>,
Linux Memory Management List <linux-mm@...ck.org>,
LKML <linux-kernel@...r.kernel.org>,
Andrey Konovalov <andreyknvl@...gle.com>
Subject: Re: [PATCH mm v2 32/33] kasan: dynamically allocate stack ring entries
On Wed, Aug 3, 2022 at 10:09 PM Marco Elver <elver@...gle.com> wrote:
>
> > -#define KASAN_STACK_RING_SIZE (32 << 10)
> > +#define KASAN_STACK_RING_SIZE_DEFAULT (32 << 10)
> >
>
> This could be moved to tags.c, as there are no other users elsewhere.
Will fix in v3.
> > +/* kasan.stack_ring_size=32768 */
>
> What does that comment say? Is it "kasan.stack_ring_size=<entries>"?
Yes, will clarify in v3.
> Is it already in the documentation?
Will add in v3.
> > + if (kasan_stack_collection_enabled()) {
> > + if (!stack_ring.size)
> > + stack_ring.size = KASAN_STACK_RING_SIZE_DEFAULT;
> > + stack_ring.entries = memblock_alloc(
> > + sizeof(stack_ring.entries[0]) *
> > + stack_ring.size,
> > + SMP_CACHE_BYTES);
>
> memblock_alloc() can fail. Because unlikely, stack collection should
> probably just be disabled.
>
> (minor: excessive line breaks makes the above unreadable.)
Will fix both in v3.
Thanks!
Powered by blists - more mailing lists