Re: [PATCH mm v2 30/33] kasan: implement stack ring for tag-based modes
From: Andrey Konovalov
Date: Mon Sep 05 2022 - 16:40:37 EST
On Wed, Aug 3, 2022 at 10:29 PM Marco Elver <elver@xxxxxxxxxx> wrote:
>
> > Does your "The rest looks fine now" comment refer only to this patch
> > or to the whole series? If it's the former, could you PTAL at the
> > other patches?
>
> I just looked again. Apart from the comments I just sent, overall it
> looks fine (whole series).
Great, thanks! I'll put your Reviewed-by on all patches except the
ones I will change in v3.
> Does test_kasan exercise the ring wrapping around? One thing that
> might be worth doing is adding a multi-threaded stress test, where you
> have 2+ threads doing lots of allocations, frees, and generating
> reports.
There's probably not a lot of sense in adding this test: this part is
tested during kernel boot. Even with defconfig, the stack ring
overflows multiple times.
I will, however, add a test for a complicated use-after-free scenario
to make sure that KASAN points at the right kmalloc/kfree calls.
Before I get to implementing [1], the report contents will have to be
checked manually though.
Thanks!
[1] https://bugzilla.kernel.org/show_bug.cgi?id=212203