From: Willy Tarreau <w@1wt.eu>
To: "Thomas Weißschuh" <linux@weissschuh.net>
Cc: Shuah Khan <shuah@kernel.org>,
linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org
Subject: Re: [PATCH 1/2] tools/nolibc: define time_t in terms of __kernel_old_time_t
Date: Sun, 13 Jul 2025 15:42:19 +0200 [thread overview]
Message-ID: <20250713134219.GA25665@1wt.eu> (raw)
In-Reply-To: <20250712-nolibc-x32-v1-1-6d81cb798710@weissschuh.net>
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@weissschuh.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@1wt.eu>
Thanks!
Willy
next prev parent reply other threads:[~2025-07-13 13:42 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-12 9:00 [PATCH 0/2] tools/nolibc: add x32 support Thomas Weißschuh
2025-07-12 9:00 ` [PATCH 1/2] tools/nolibc: define time_t in terms of __kernel_old_time_t Thomas Weißschuh
2025-07-13 13:42 ` Willy Tarreau [this message]
2025-07-12 9:00 ` [PATCH 2/2] selftests/nolibc: add x32 test configuration Thomas Weißschuh
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250713134219.GA25665@1wt.eu \
--to=w@1wt.eu \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=linux@weissschuh.net \
--cc=shuah@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.