Re: [PATCH 2/2] lib/test_kasan: Add stack overflow test

From: Mark Rutland
Date: Wed Jul 24 2019 - 07:23:25 EST


On Tue, Jul 23, 2019 at 06:49:03PM +0200, Marco Elver wrote:
> On Tue, 23 Jul 2019 at 18:24, Mark Rutland <mark.rutland@xxxxxxx> wrote:
> >
> > On Fri, Jul 19, 2019 at 03:28:18PM +0200, Marco Elver wrote:
> > > Adds a simple stack overflow test, to check the error being reported on
> > > an overflow. Without CONFIG_STACK_GUARD_PAGE, the result is typically
> > > some seemingly unrelated KASAN error message due to accessing random
> > > other memory.
> >
> > Can't we use the LKDTM_EXHAUST_STACK case to check this?
> >
> > I was also under the impression that the other KASAN self-tests weren't
> > fatal, and IIUC this will kill the kernel.
> >
> > Given that, and given this is testing non-KASAN functionality, I'm not
> > sure it makes sense to bundle this with the KASAN tests.
>
> Thanks for pointing out LKDTM_EXHAUST_STACK.
>
> This patch can be dropped!

Cool; it's always nice to find the work has already been done! :)

Thanks,
Mark.