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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZKxDP3YrIdKxWaIN@1wt.eu>
Date:   Mon, 10 Jul 2023 19:43:27 +0200
From:   Willy Tarreau <w@....eu>
To:     Thomas Weißschuh <linux@...ssschuh.net>
Cc:     linux-kernel@...r.kernel.org, Zhangjin Wu <falcon@...ylab.org>
Subject: Re: [PATCH] tools/nolibc: completely remove optional environ support

Hi Thomas,

On Mon, Jul 10, 2023 at 07:22:53PM +0200, Thomas Weißschuh wrote:
> In commit 52e423f5b93e ("tools/nolibc: export environ as a weak symbol on i386")
> and friends the asm startup logic was extended to directly populate the
> "environ" array.
> 
> This makes it impossible for "environ" to be dropped by the linker.
> Therefore also drop the other logic to handle non-present "environ".

Hmmm OK but at least I'd like that we continue to reference it from
nolibc-test to make sure it's still visible. Maybe we could just check
that it's always equal to envp ? If we drop its reference from there,
sooner or later someone will find it interesting to rename it and some
programs referencing it will break.

> Note:
> 
> Given that nowadays both _auxv and environ are mandatory symbols imposed
> by nolibc of pointer size does it make sense to keep the code to make
> int-sized errno optional?

While it indeed used to be related to having a data segment or not
initially, it still has an impact on our ability to completely drop
the errno setting code from all syscalls. Given the SET_ERRNO() macro
now I guess it's very cheap to keep it, don't you think ?

Thanks,
Willy

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ