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] [day] [month] [year] [list]
Date:   Sun, 28 May 2023 09:37:31 +0200
From:   Willy Tarreau <w@....eu>
To:     Thomas Weißschuh <linux@...ssschuh.net>
Cc:     Shuah Khan <shuah@...nel.org>, linux-kernel@...r.kernel.org,
        linux-kselftest@...r.kernel.org
Subject: Re: [PATCH] tools/nolibc: support nanoseconds in stat()

On Sat, May 27, 2023 at 02:56:42PM +0200, Thomas Weißschuh wrote:
> Keep backwards compatibility through unions.
> 
> The compatibility macros like
> 
>  #define st_atime st_atim.tv_sec
> 
> as documented in stat(3type) don't work for nolibc because it would
> break with other stat-like structures that contain the field st_atime.

Ah, good idea, I like this approach. Generally speaking I hate defining
macros to access some struct members, even though it has been done for
decades in various places of standard libs. Your solution making use of
anonymous unions is an elegant alternative to this.

Thanks!
Willy

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ