Re: [PATCH v2 2/3] fortify: Add KUnit test for FORTIFY_SOURCE internals

From: Kees Cook
Date: Sat Sep 03 2022 - 01:17:43 EST


On Sat, Sep 03, 2022 at 10:59:24AM +0800, David Gow wrote:
> On Sat, Sep 3, 2022 at 4:43 AM Kees Cook <keescook@xxxxxxxxxxxx> wrote:
> >
> > Add lib/fortify_kunit.c KUnit test for checking the expected behavioral
> > characteristics of FORTIFY_SOURCE internals.
> > [...]
>
> Overall, this looks good. It's a bit of a shame FORTIFY_SOURCE doesn't
> work under UML, but I tested it on everything else I had to hand and
> it looked good.

It looks like this was never picked up:
https://lore.kernel.org/lkml/20220210003224.773957-1-keescook@xxxxxxxxxxxx/

I suppose I could take it via the kernel hardening tree?

> One tiny typo in a comment below, but otherwise this is:
>
> Reviewed-by: David Gow <davidgow@xxxxxxxxxx>
>
> [...]
> > +/*
> > + * Runtime test cases for CONFIG_FORTIFY_SOURCE that aren't expected to
> > + * Oops th kernel on success. (For those, see drivers/misc/lkdtm/fortify.c)
>
> Nit: Oops _the_ kernel

Thanks! I'll get that updated. :)

--
Kees Cook