Re: [PATCH 1/2] exec: Add KUnit test for bprm_stack_limits()

From: Kees Cook

Date: Wed Mar 18 2026 - 14:33:41 EST


On Mon, Mar 16, 2026 at 12:16:58PM -0700, Guenter Roeck wrote:
> Hi,
>
> On Sun, May 19, 2024 at 07:16:11PM -0700, Kees Cook wrote:
> > Since bprm_stack_limits() operates with very limited side-effects, add
> > it as the first exec.c KUnit test. Add to Kconfig and adjust MAINTAINERS
> > file to include it.
> >
> > Tested on 64-bit UML:
> > $ tools/testing/kunit/kunit.py run exec
> >
> > Signed-off-by: Kees Cook <keescook@xxxxxxxxxxxx>
> > ---
> > Cc: Eric Biederman <ebiederm@xxxxxxxxxxxx>
> > Cc: Justin Stitt <justinstitt@xxxxxxxxxx>
> > Cc: Alexander Viro <viro@xxxxxxxxxxxxxxxxxx>
> > Cc: Christian Brauner <brauner@xxxxxxxxxx>
> > Cc: Jan Kara <jack@xxxxxxx>
> > Cc: linux-fsdevel@xxxxxxxxxxxxxxx
> > Cc: linux-mm@xxxxxxxxx
> > ---
> ...
> > +++ b/fs/exec.c
> ...
> > + .expected_argmin = ULONG_MAX - (_STK_LIM / 4 * 3) + sizeof(void *) },
> > + { { .p = ULONG_MAX, .rlim_stack.rlim_cur = 4 * (_STK_LIM / 4 * + sizeof(void *)),
> ^^^^^^
>
> Google's experimental AI review agent tagged the above change as syntactically wrong.
> How does this even compile ?

Wow. I have no idea how this ever built either. I will get it fixed.

--
Kees Cook