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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <s5hlgl7dqqa.wl-tiwai@suse.de>
Date:   Fri, 22 Sep 2017 11:31:25 +0200
From:   Takashi Iwai <tiwai@...e.de>
To:     "Baolin Wang" <baolin.wang@...aro.org>
Cc:     <perex@...ex.cz>, <alsa-devel@...a-project.org>, <arnd@...db.de>,
        <arvind.yadav.cs@...il.com>, <bhumirks@...il.com>,
        <deepa.kernel@...il.com>, <lgirdwood@...il.com>,
        <dharageswari.r@...el.com>, <gudishax.kranthikumar@...el.com>,
        <guneshwor.o.singh@...el.com>, <hardik.t.shah@...el.com>,
        <jeeja.kp@...el.com>, <naveen.m@...el.com>, <vinod.koul@...el.com>,
        <broonie@...nel.org>, <mingo@...nel.org>,
        <dan.carpenter@...cle.com>, <o-takashi@...amocchi.jp>,
        <fabf@...net.be>, <elfring@...rs.sourceforge.net>,
        <linux-kernel@...r.kernel.org>
Subject: Re: [RFC PATCH 2/7] sound: core: Avoid using timespec for struct snd_pcm_status

On Thu, 21 Sep 2017 08:18:04 +0200,
Baolin Wang wrote:
> 
> The struct snd_pcm_status will use 'timespec' type variables to record
> timestamp, which is not year 2038 safe on 32bits system.
> 
> Userspace will use SNDRV_PCM_IOCTL_STATUS and SNDRV_PCM_IOCTL_STATUS_EXT
> as commands to issue ioctl() to fill the 'snd_pcm_status' structure in
> userspace. The command number is always defined through _IOR/_IOW/IORW,
> so when userspace changes the definition of 'struct timespec' to use
> 64-bit types, the command number also changes.
> 
> Thus in the kernel, we now need to define two versions of each such ioctl
> and corresponding ioctl commands to handle 32bit time_t and 64bit time_t
> in native mode:
> struct snd_pcm_status32 {
> 	......
> 	struct { s32 tv_sec; s32 tv_nsec; } trigger_tstamp;
> 	struct { s32 tv_sec; s32 tv_nsec; } tstamp;
> 	......
> }
> 
> struct snd_pcm_status64 {
> 	......
> 	struct { s64 tv_sec; s64 tv_nsec; } trigger_tstamp;
> 	struct { s64 tv_sec; s64 tv_nsec; } tstamp;
> 	......
> }

I'm confused.  It's different from timespec64?  So 32bit user-space
would need to use a new own-type timespec instead of the standard
timespec that is compliant with y2038?


thanks,

Takashi

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ