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-next>] [day] [month] [year] [list]
Message-ID: <20160413095214.GA101605@localhost>
Date:	Wed, 13 Apr 2016 02:52:14 -0700
From:	Tina Ruchandani <ruchandani.tina@...il.com>
To:	Arnd Bergmann <arnd@...db.de>
Cc:	y2038@...ts.linaro.org, dri-devel@...ts.freedesktop.org,
	linux-kernel@...r.kernel.org, Wentao Xu <wentaox@...eaurora.org>,
	Thierry Reding <treding@...dia.com>,
	Hai Li <hali@...eaurora.org>
Subject: [PATCH v2] drm/msm: Use 64-bit timekeeping

'struct timespec' uses a 32-bit seconds which will overflow in year
2038 and beyond. This patch replaces timespec with timespec64. The
code is correct as is - the patch is merely part of a larger attempt
to remove all 32-bit timekeeping variables (timespec, timeval, time_t)
from the kernel.

Signed-off-by: Tina Ruchandani <ruchandani.tina@...il.com>
-- 
Changes in v2:
 Fix checkpatch warning
---
 drivers/gpu/drm/msm/msm_drv.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/msm/msm_drv.c b/drivers/gpu/drm/msm/msm_drv.c
index c03b967..59c1948 100644
--- a/drivers/gpu/drm/msm/msm_drv.c
+++ b/drivers/gpu/drm/msm/msm_drv.c
@@ -717,8 +717,9 @@ int msm_wait_fence(struct drm_device *dev, uint32_t fence,
 			remaining_jiffies = 0;
 		} else {
 			ktime_t rem = ktime_sub(*timeout, now);
-			struct timespec ts = ktime_to_timespec(rem);
-			remaining_jiffies = timespec_to_jiffies(&ts);
+			struct timespec64 ts = ktime_to_timespec64(rem);
+
+			remaining_jiffies = timespec64_to_jiffies(&ts);
 		}

 		if (interruptible)
--
2.8.0.rc3.226.g39d4020

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ