lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202202241714.DC112086@keescook>
Date:   Thu, 24 Feb 2022 17:17:03 -0800
From:   Kees Cook <keescook@...omium.org>
To:     Daniel Latypov <dlatypov@...gle.com>
Cc:     David Gow <davidgow@...gle.com>, Arnd Bergmann <arnd@...db.de>,
        Nathan Chancellor <nathan@...nel.org>,
        Nick Desaulniers <ndesaulniers@...gle.com>,
        linux-kernel@...r.kernel.org,
        KUnit Development <kunit-dev@...glegroups.com>,
        llvm@...ts.linux.dev, linux-hardening@...r.kernel.org
Subject: Re: [PATCH] lib: stackinit: Convert to KUnit

On Thu, Feb 24, 2022 at 11:43:40AM -0800, Daniel Latypov wrote:
> On Wed, Feb 23, 2022 at 9:51 PM Kees Cook <keescook@...omium.org> wrote:
> >
> 
> <snip>
> 
> 
> >  /* Userspace headers. */
> > +#define _GNU_SOURCE
> >  #include <stdio.h>
> >  #include <stdint.h>
> > +#include <stdlib.h>
> >  #include <string.h>
> >  #include <stdbool.h>
> >  #include <errno.h>
> >  #include <sys/types.h>
> >
> >  /* Linux kernel-ism stubs for stand-alone userspace build. */
> 
> This is neat and esp. so that it works.
> But may I ask, what's the value of using this vs UML?

Mainly it's been for giving a single stand-alone file for testing to
compiler devs, packagers, and distro maintainers instead of asking them
to pull down the entire kernel, etc, etc. :)

> Given this has changed into mainly just a KUnit-compatibility layer,
> it feels like it can maybe live as a standalone file, if there's ever
> interest in doing this for other tests.

That's a terrifying and lovely idea!

> It feels like something that will never quite be "supported", but I
> find it neat enough I'd have fun sending some patches to make it more
> realistic.

Right, and as you found, I took some short-cuts that were specific to
how this code used KUnit. :P

I'll ponder this and go through your other suggestions. Thanks!

-Kees

-- 
Kees Cook

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ