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: <ZO25u3crGixkGKWe@1wt.eu>
Date:   Tue, 29 Aug 2023 11:26:19 +0200
From:   Willy Tarreau <w@....eu>
To:     Thomas Weißschuh <linux@...ssschuh.net>
Cc:     Shuah Khan <shuah@...nel.org>, Zhangjin Wu <falcon@...ylab.org>,
        Yuan Tan <tanyuan@...ylab.org>, linux-kernel@...r.kernel.org,
        linux-kselftest@...r.kernel.org
Subject: Re: [PATCH 1/2] tools/nolibc: add stdarg.h header

On Tue, Aug 29, 2023 at 11:14:09AM +0200, Thomas Weißschuh wrote:
> Hi Willy!
> 
> On 2023-08-29 08:28:27+0200, Willy Tarreau wrote:
> > On Sun, Aug 27, 2023 at 10:00:15AM +0200, Thomas Weißschuh wrote:
> > > This allows nolic to work with `-nostdinc` avoiding any reliance on
> > > system headers.
> > > 
> > > The implementation has been lifted from musl libc 1.2.4.
> > > There is already an implementation of stdarg.h in include/linux/stdarg.h
> > > but that is GPL licensed and therefore not suitable for nolibc.
> > 
> > I'm a bit confused because for me, stdarg was normally provided by the
> > compiler, but I could be mistaken. It's just that it reminds me not so
> > old memories. Therefore maybe we just need to include or define
> > "something" to use it.
> 
> It is indeed provided by the compiler.

OK. But then, doesn't it mean that if we don't provide our stdarg.h,
the compilers' will be used ? I'm asking because we're already using
va_list and va_args, for example in vfprintf() in stdio.h, which
precisely includes <stdarg.h> so it must indeed come from the compiler.

> I could not find anybody doing this differently.
> Using builtins seems to me to be the normal way to expose compiler
> implementation specifics.

OK but it's already what the compiler does itself in its own stdarg that
is provided. That's why I don't understand what specific case we're trying
to cover here, I feel like we're providing an alternate stdarg in case the
compiler doesn't provide one except that I've not seen a compiler not
provide it (even tcc comes with it), it's like stddef.

Thanks,
Willy

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ