From: "Arnd Bergmann" <arnd@arndb.de>
To: "Thomas Weißschuh" <thomas.weissschuh@linutronix.de>
Cc: "Andy Lutomirski" <luto@kernel.org>,
"Thomas Gleixner" <tglx@linutronix.de>,
"Vincenzo Frascino" <vincenzo.frascino@arm.com>,
shuah <shuah@kernel.org>,
linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org
Subject: Re: [PATCH v2 03/14] selftests: vDSO: Introduce vdso_syscalls.h
Date: Tue, 18 Nov 2025 22:40:03 +0100 [thread overview]
Message-ID: <6fbb952c-0119-4be7-8f65-9198330013e7@app.fastmail.com> (raw)
In-Reply-To: <20251118145635-16c14d65-cc62-4c0f-bb2c-2cf7eb30b63c@linutronix.de>
On Tue, Nov 18, 2025, at 15:22, Thomas Weißschuh wrote:
> On Fri, Nov 14, 2025 at 11:40:31AM +0100, Arnd Bergmann wrote:
>> On Fri, Nov 14, 2025, at 11:02, Thomas Weißschuh wrote:
>> > On Fri, Nov 14, 2025 at 10:16:01AM +0100, Arnd Bergmann wrote:
>> >
>> > I don't think it is important. For my SPARC vDSO series I even
>> > dropped the regular clock_getres() after your request. But because it
>> > doesn't exist we need to handle the presence of vdso_clock_getres() and
>> > the simultaneous absence of sys_clock_getres() in the test.
>>
>> But that is the other way round, right? On sparc32 we have
>> (optionally) sys_clock_getres() but never vdso_clock_getres().
>
> Here SPARC was just an example to show that I don't really care about
> clock_getres() in the vDSO in general.
> But if it was present before for an architecture and we now drop it without a
> replacement, userspace developers might complain. Manually caching the value
> in userspace sounds ugly and brittle, as it could even change at some point.
> Introducing a time64 replacement on the other hand wouldn't make much
> difference as the values never would exceed the 32-bit range anyways.
>
> So I would keep vdso_clock_getres() where it exists today even with
> CONFIG_COMPAT_32BIT_TIME=n.
It is rather inconsistent with all the other interfaces though:
when we originally did the time64 conversion, there were a number
of interfaces that didn't really need a replacement, but we
deliberately made new interfaces wherever possible. For architectures
without time32 support, and for validating the time64 support,
it should be possible to build both kernel and userspace without
even defining the __kernel_old_time{_t,spec,val} types.
>> Right, but then I would make it return 'struct timespec', not
>> 'struct __kernel_timespec', because it's no longer the kernel
>> interface.
>
> 'struct timespec' might be only 32-bit, breaking the tests after y2038.
> While that shouldn't happen in actual y2038 it would be nice if we can
> validate the future behavior today without reconfiguring libc.
> Given that this is also no longer a libc interface, can't we just use
> the UAPI type?
It clearly works, it just feels a bit wrong to me as mixing up
the types and the interfaces is what caused the problem
originally.
> What is the general expectation for userspace using 32-bit interfaces
> after y2038 from the kernel's perspective?
I would hope that we'll end up turning off the fallback path
and eventually remove that code entirely as we get closer to
y2038, but not everyone agrees with that. An important
open question is whether we'd want to still support running
a 32-bit kernel from 2038+ with time32 userland but the RTC
backdated to 1970.
Arnd
next prev parent reply other threads:[~2025-11-18 21:40 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-13 15:30 [PATCH v2 00/14] selftests: vDSO: Stop using libc types for vDSO calls Thomas Weißschuh
2025-11-13 15:30 ` [PATCH v2 01/14] Revert "selftests: vDSO: parse_vdso: Use UAPI headers instead of libc headers" Thomas Weißschuh
2025-11-13 15:30 ` [PATCH v2 02/14] selftests: vDSO: Introduce vdso_types.h Thomas Weißschuh
2025-11-13 15:30 ` [PATCH v2 03/14] selftests: vDSO: Introduce vdso_syscalls.h Thomas Weißschuh
2025-11-14 8:13 ` Arnd Bergmann
2025-11-14 8:48 ` Thomas Weißschuh
2025-11-14 9:16 ` Arnd Bergmann
2025-11-14 10:02 ` Thomas Weißschuh
2025-11-14 10:40 ` Arnd Bergmann
2025-11-18 14:22 ` Thomas Weißschuh
2025-11-18 21:40 ` Arnd Bergmann [this message]
2025-11-20 13:27 ` Thomas Weißschuh
2025-11-13 15:30 ` [PATCH v2 04/14] selftests: vDSO: vdso_test_gettimeofday: Remove nolibc checks Thomas Weißschuh
2025-11-13 15:30 ` [PATCH v2 05/14] selftests: vDSO: vdso_test_gettimeofday: Use types from vdso_types.h Thomas Weißschuh
2025-11-13 15:30 ` [PATCH v2 06/14] selftests: vDSO: vdso_test_abi: " Thomas Weißschuh
2025-11-13 15:30 ` [PATCH v2 07/14] selftests: vDSO: vdso_test_abi: Validate return value of syscall(clock_getres) Thomas Weißschuh
2025-11-13 15:30 ` [PATCH v2 08/14] selftests: vDSO: vdso_test_abi: Use system call wrappers from vdso_syscalls.h Thomas Weißschuh
2025-11-13 15:30 ` [PATCH v2 09/14] selftests: vDSO: vdso_test_correctness: Drop SYS_getcpu fallbacks Thomas Weißschuh
2025-11-13 15:30 ` [PATCH v2 10/14] selftests: vDSO: vdso_test_correctness: Make ts_leq() and tv_leq() more generic Thomas Weißschuh
2025-11-13 15:30 ` [PATCH v2 11/14] selftests: vDSO: vdso_test_correctness: Use types from vdso_types.h Thomas Weißschuh
2025-11-13 15:30 ` [PATCH v2 12/14] selftests: vDSO: vdso_test_correctness: Use system call wrappers from vdso_syscalls.h Thomas Weißschuh
2025-11-14 8:01 ` Arnd Bergmann
2025-11-13 15:30 ` [PATCH v2 13/14] selftests: vDSO: vdso_test_correctness: Use facilities from parse_vdso.c Thomas Weißschuh
2025-11-13 15:30 ` [PATCH v2 14/14] selftests: vDSO: vdso_test_correctness: Add a test for time() 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=6fbb952c-0119-4be7-8f65-9198330013e7@app.fastmail.com \
--to=arnd@arndb.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=luto@kernel.org \
--cc=shuah@kernel.org \
--cc=tglx@linutronix.de \
--cc=thomas.weissschuh@linutronix.de \
--cc=vincenzo.frascino@arm.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