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]
Date:   Thu,  2 Nov 2017 19:06:55 +0800
From:   Baolin Wang <baolin.wang@...aro.org>
To:     perex@...ex.cz, tiwai@...e.com, arnd@...db.de
Cc:     lgirdwood@...il.com, broonie@...nel.org, o-takashi@...amocchi.jp,
        mingo@...nel.org, elfring@...rs.sourceforge.net,
        dan.carpenter@...cle.com, jeeja.kp@...el.com, vinod.koul@...el.com,
        guneshwor.o.singh@...el.com, subhransu.s.prusty@...el.com,
        bhumirks@...il.com, gudishax.kranthikumar@...el.com,
        naveen.m@...el.com, hardik.t.shah@...el.com,
        arvind.yadav.cs@...il.com, fabf@...net.be,
        alsa-devel@...a-project.org, linux-kernel@...r.kernel.org,
        baolin.wang@...aro.org
Subject: [RFC PATCH v2 5/7] uapi: sound: Avoid using timespec for struct snd_ctl_elem_value

The struct snd_ctl_elem_value will use 'timespec' type variables to record
timestamp, which is not year 2038 safe on 32bits system.

Since there are no drivers will implemented the tstamp member of the
struct snd_ctl_elem_value, and also the stucture size will not be changed
if we change timespec to s64 for tstamp member of struct snd_ctl_elem_value.

Thus we can simply change timespec to s64 for tstamp member to avoid
using the type which is not year 2038 safe on 32bits system.

Signed-off-by: Baolin Wang <baolin.wang@...aro.org>
---
 include/uapi/sound/asound.h |    8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/include/uapi/sound/asound.h b/include/uapi/sound/asound.h
index 1949923..fabb283 100644
--- a/include/uapi/sound/asound.h
+++ b/include/uapi/sound/asound.h
@@ -943,8 +943,12 @@ struct snd_ctl_elem_value {
 		} bytes;
 		struct snd_aes_iec958 iec958;
 	} value;		/* RO */
-	struct timespec tstamp;
-	unsigned char reserved[128-sizeof(struct timespec)];
+#ifndef __KERNEL__
+	struct { s64 tv_sec; s64 tv_nsec; } tstamp;
+	unsigned char reserved[128-sizeof(struct { s64 tv_sec; s64 tv_nsec; })];
+#else
+	unsigned char reserved[128];
+#endif
 };
 
 struct snd_ctl_tlv {
-- 
1.7.9.5

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ