[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20250713134219.GA25665@1wt.eu>
Date: Sun, 13 Jul 2025 15:42:19 +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 1/2] tools/nolibc: define time_t in terms of
__kernel_old_time_t
On Sat, Jul 12, 2025 at 11:00:55AM +0200, Thomas Weißschuh wrote:
> Nolibc assumes that the kernel ABI is using a time values that are as
> large as a long integer. For most ABIs this holds true.
> But for x32 this is not correct, as it uses 32bit longs but 64bit times.
>
> Also the 'struct stat' implementation of nolibc relies on timespec::tv_sec
> and time_t being the same type. While timespec::tv_sec comes from the
> kernel and is of type __kernel_old_time_t, time_t is defined within nolibc.
>
> Switch to the __kernel_old_time_t to always get the correct type.
>
> Signed-off-by: Thomas Weißschuh <linux@...ssschuh.net>
Great! I didn't know we could support x32 and thought it was phased out.
But if it works it can be convenient for those seeking smaller binaries.
Both patches look good to me, for the whole series:
Acked-by: Willy Tarreau <w@....eu>
Thanks!
Willy
Powered by blists - more mailing lists