lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAK8P3a0SKAAJMUDOJBjHKCnvprqOTjTnX9Ju3W_q1avzdU7EnA@mail.gmail.com>
Date:   Tue, 24 Apr 2018 15:37:28 +0200
From:   Arnd Bergmann <arnd@...db.de>
To:     Jaroslav Kysela <perex@...ex.cz>
Cc:     Baolin Wang <baolin.wang@...aro.org>,
        Takashi Iwai <tiwai@...e.com>,
        Liam Girdwood <lgirdwood@...il.com>,
        Mark Brown <broonie@...nel.org>,
        Takashi Sakamoto <o-takashi@...amocchi.jp>,
        Ingo Molnar <mingo@...nel.org>,
        SF Markus Elfring <elfring@...rs.sourceforge.net>,
        Dan Carpenter <dan.carpenter@...cle.com>, jeeja.kp@...el.com,
        Vinod Koul <vinod.koul@...el.com>,
        Guneshwor Singh <guneshwor.o.singh@...el.com>,
        subhransu.s.prusty@...el.com, Bhumika Goyal <bhumirks@...il.com>,
        gudishax.kranthikumar@...el.com, Naveen M <naveen.m@...el.com>,
        hardik.t.shah@...el.com, Arvind Yadav <arvind.yadav.cs@...il.com>,
        Fabian Frederick <fabf@...net.be>, alsa-devel@...a-project.org,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 0/8] Fix year 2038 issue for sound subsystem

On Tue, Apr 24, 2018 at 3:29 PM, Jaroslav Kysela <perex@...ex.cz> wrote:
> Dne 24.4.2018 v 14:06 Baolin Wang napsal(a):
>> Since many structures will use timespec type variables to record time stamp
>> in uapi/asound.h, which are not year 2038 safe on 32bit system. This patchset
>> tries to introduce new structures removing timespec type to compatible native
>> mode and compat mode.
>>
>> Moreover this patchset also converts the internal structrures to use timespec64
>> type and related APIs.
>
> Thanks for your patchset. A few comments:
>
> It might be more nice to reuse the existing structures and put
> timespec64 to the reserved field and duplicate information (with the
> 32-bit wrapping for the old fields). It means that we do not need new
> ioctls and old libraries will be fine.

The current approach is intended to make any user space work
without source-level changes, i.e. you can still build an old alsa-lib
package against a new glibc as long as you have the latest kernel
headers (which the glibc requires for using 64-bit time_t).

If we try to extend the structures in a different way, that requires
user space changes, and existing source code would silently
break on a future glibc.
IMHO changing the source-level interface should only be done
as a last resort for y2038.

Note that most of the work is not required to keep working beyond
2038, but actually is required just to keep working with an
updated glibc that redefines time_t to 64 bit. The audio timestamps
should be in CLOCK_MONOTONIC for new user space anyway,
and that doesn't overflow a 32-bit type.

> It may make sense to define private snd_timespec32 and snd_timespec64
> with s32/s64 types instead separate sec/usec fields.

Right, I have some ideas there as well as I saw one remaining issue
in my patch for the status mmap: when building a program with
64-bit time_t, we still see a copy of the old structure but with an\
impossible layout.

       ARnd

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ