Re: Question about [PATCH] [RFC] rtc: y2038: remove broken RTC_HCTOSYS workaround

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Jun 28, 2024, at 08:33, Stefan Müller-Klieser wrote:
> Am Freitag, dem 28.06.2024 um 08:01 +0200 schrieb Arnd Bergmann:
>> On Fri, Jun 28, 2024, at 00:43, Alexandre Belloni wrote:
>> > On 24/06/2024 11:41:41+0000, Leonard Anderweit wrote:
>> > > Hi,
>> > > 
>> > > I found this patch [1] which is necessary for a project I'm currently
>> > > working on. I'm using phyboard-wega [2] with an am335 ARM SoC which I
>> > > want to make y2038 proof.
>> > > Is there any reason it was never accepted?
>> 
>> Sorry for not having replied earlier. I'm definitely interested
>> in helping to make this work better, having spent a lot of time
>> on the kernel side of the y2038 work.
>> 
>> Which combination of distro, libc and init system are you using
>> in your work?
>
> We have a Yocto scarthgap with glibc 2.39 and systemd 255.4.

Ok

>> Are you running with COMPAT_32BIT_TIME disabled? This is something
>> you probably want in order to better test for corner cases that
>> still use time32 kernel ABIs somewhere, but it still requires
>> adding a few more workarounds in libc and other userspace
>> sources.
>
> We wanted to, but this still keeps systemd from booting. We are
> debugging this currently.

My guess is that this is still an issue with glibc still relying
on time32 system calls to be present. I have not looked at it
in a while, but the most common time32 syscall that everyone
relies on is futex(). With COMPAT_32BIT_TIME disabled, you
need to call futex_time64() instead even if there is a NULL
timeout. There may also be other time32 syscalls in use here.

The way I would debug this is to run a 32-bit scarthgap
userspace in a chroot on a 64-bit kernel with COMPAT_32BIT_TIME=n,
to see what kernel interfaces are missing while still being
able to run normal 64-bit debugging tools.
You can do this either on an arm64 or x86_64 host, whichever is
easier for you to get set up.

I don't see anything in systemd itself that relies on time32
syscalls, it does not appear to directly call futex or any
of the other ones, and the seccomp filters in there look like
they take time64 syscalls into account correctly.

       Arnd





[Index of Archives]     [Linux Sound]     [ALSA Users]     [ALSA Devel]     [Linux Audio Users]     [Linux Media]     [Kernel]     [Gimp]     [Yosemite News]     [Linux Media]

  Powered by Linux