From: "Arnd Bergmann" <arnd@arndb.de>
To: "Adhemerval Zanella Netto" <adhemerval.zanella@linaro.org>,
"Florian Weimer" <fweimer@redhat.com>
Cc: "YunQiang Su" <yunqiang.su@cipunited.com>,
"Xi Ruoyao" <libc-alpha@sourceware.org>,
aurelien@aurel32.net, "Jiaxun Yang" <jiaxun.yang@flygoat.com>,
"Maciej W. Rozycki" <macro@orcam.me.uk>,
"YunQiang Su" <syq@debian.org>
Subject: Re: [PATCH v3] Define in_int32_t_range to check if the 64 bit time_t syscall should be used
Date: Tue, 08 Nov 2022 14:27:12 +0100 [thread overview]
Message-ID: <eadadfd4-397b-4aef-8061-7fa22303766f@app.fastmail.com> (raw)
In-Reply-To: <0e823c53-a93f-8ecf-6e83-84b1b78057c8@linaro.org>
On Tue, Nov 8, 2022, at 13:51, Adhemerval Zanella Netto wrote:
> On 08/11/22 09:28, Arnd Bergmann wrote:
>
> Sigh, I have added the use of 64 bit syscall if required for some
> sysmbols because I assumed that 32 bit time_t syscall would be always
> available. This is small optimization to avoid issuing a lot of
> 64 bit syscall, specially for syscall like futex.
>
> But if kernel does indeed assume that COMPAT_32BIT_TIME is a supported
> configuration I think we will need to roll out the optimization and
> always issue the 64 bit time_t syscalls anyway. From a glibc point of
> view it should not matter much besides some small overhead for newer
> glibc running on older kernels (we might add a global to disable the
> 64-bit call if kernel does not support, as we do for some specific
> syscalls).
It's possible that I have misread what glibc does at the moment,
as I see there are checks for __ASSUME_TIME64_SYSCALLS in the
same code path.
To clarify: I think an important configuration is one where
an embedded system assumes both kernel and userspace are
always modern and only support time64. This means
CONFIG_COMPAT_32BIT_TIME is disabled in the kernel, and glibc
is built to only support a modern enough kernel to assume
time64 support is always available. I have not tested whether
this works at the moment, but it probably does not require
a large rework if there is something still missing. Sorry
for having hijacked this thread if this is already supported.
If glibc is configured to support older linux-3.2 and includes
the time32 fallbacks for that, it's not unreasonable to require
CONFIG_COMPAT_32BIT_TIME=y for those. It would be
good to document this dependency, or even have an early
runtime check similar to the "kernel too old" error that
glibc produces when there is a version mismatch.
Arnd
next prev parent reply other threads:[~2022-11-08 13:27 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-04 1:39 [PATCH] Use in_int32_t_range to check need 64bit syscall YunQiang Su
2022-11-08 4:49 ` [PATCH v3] Define in_int32_t_range to check if the 64 bit time_t syscall should be used YunQiang Su
2022-11-08 10:39 ` Arnd Bergmann
2022-11-08 11:17 ` Florian Weimer via Libc-alpha
2022-11-08 11:33 ` Arnd Bergmann
2022-11-08 11:39 ` Florian Weimer via Libc-alpha
2022-11-08 11:55 ` Adhemerval Zanella Netto via Libc-alpha
2022-11-08 12:28 ` Arnd Bergmann
2022-11-08 12:51 ` Adhemerval Zanella Netto via Libc-alpha
2022-11-08 13:27 ` Arnd Bergmann [this message]
2022-11-08 13:49 ` Adhemerval Zanella Netto via Libc-alpha
2022-11-08 14:07 ` Arnd Bergmann
2022-11-08 14:27 ` Adhemerval Zanella Netto via Libc-alpha
2022-11-08 19:47 ` Adhemerval Zanella Netto via Libc-alpha
2022-11-08 23:29 ` Rich Felker
2022-11-17 17:35 ` Adhemerval Zanella Netto via Libc-alpha
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
List information: https://www.gnu.org/software/libc/involved.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=eadadfd4-397b-4aef-8061-7fa22303766f@app.fastmail.com \
--to=arnd@arndb.de \
--cc=adhemerval.zanella@linaro.org \
--cc=aurelien@aurel32.net \
--cc=fweimer@redhat.com \
--cc=jiaxun.yang@flygoat.com \
--cc=libc-alpha@sourceware.org \
--cc=macro@orcam.me.uk \
--cc=syq@debian.org \
--cc=yunqiang.su@cipunited.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).