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>] [day] [month] [year] [list]
Message-Id: <c42b5f610064b37551b155cc8ddebda3cd094f2b.1519800122.git.baolin.wang@linaro.org>
Date:   Wed, 28 Feb 2018 14:44:51 +0800
From:   Baolin Wang <baolin.wang@...aro.org>
To:     lftan@...era.com, arnd@...db.de
Cc:     heiko@...ech.de, daniel.lezcano@...aro.org,
        linus.walleij@...aro.org, viresh.kumar@...aro.org,
        linux@...ck-us.net, nios2-dev@...ts.rocketboards.org,
        linux-kernel@...r.kernel.org, broonie@...nel.org,
        baolin.wang@...aro.org
Subject: [PATCH] nios2: Use read_persistent_clock64() instead of read_persistent_clock()

Since struct timespec is not y2038 safe on 32bit machines, this patch
converts read_persistent_clock() to read_persistent_clock64() using
struct timespec64, as well as converting mktime() to mktime64().

Signed-off-by: Baolin Wang <baolin.wang@...aro.org>
---
 arch/nios2/kernel/time.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/nios2/kernel/time.c b/arch/nios2/kernel/time.c
index 20e8620..ab88b6d 100644
--- a/arch/nios2/kernel/time.c
+++ b/arch/nios2/kernel/time.c
@@ -336,9 +336,9 @@ static int __init nios2_time_init(struct device_node *timer)
 	return ret;
 }
 
-void read_persistent_clock(struct timespec *ts)
+void read_persistent_clock64(struct timespec64 *ts)
 {
-	ts->tv_sec = mktime(2007, 1, 1, 0, 0, 0);
+	ts->tv_sec = mktime64(2007, 1, 1, 0, 0, 0);
 	ts->tv_nsec = 0;
 }
 
-- 
1.7.9.5

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ