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:	Wed,  6 May 2015 18:30:25 +0200
From:	Arnd Bergmann <arnd@...db.de>
To:	y2038@...ts.linaro.org
Cc:	baolin.wang@...aro.org, tglx@...utronix.de,
	albert.aribaud@...ev.fr, john.stultz@...aro.org,
	bamvor.zhangjian@...aro.org, ruchandani.tina@...il.com,
	linux-api@...r.kernel.org, linux-kernel@...r.kernel.org,
	libc-alpha@...rceware.org, Arnd Bergmann <arnd@...db.de>
Subject: [PATCH 18/19] y2038: introduce jiffies_to_timespec64

Needed for converting sys_sched_rr_get_interval

Signed-off-by: Arnd Bergmann <arnd@...db.de>
---
 include/linux/jiffies.h | 12 +++++++++---
 kernel/time/time.c      |  2 +-
 2 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/include/linux/jiffies.h b/include/linux/jiffies.h
index 2aeb872f5547..6647257fa3da 100644
--- a/include/linux/jiffies.h
+++ b/include/linux/jiffies.h
@@ -301,9 +301,15 @@ static inline unsigned long timespec64_to_jiffies(const struct timespec64 *value
 	return __timespec_to_jiffies(value->tv_sec, value->tv_nsec);
 }
 
-
-extern void jiffies_to_timespec(const unsigned long jiffies,
-				struct timespec *value);
+extern void jiffies_to_timespec64(const unsigned long jiffies,
+				  struct timespec64 *value);
+static inline void jiffies_to_timespec(const unsigned long jiffies,
+				       struct timespec *value)
+{
+	struct timespec64 ts64;
+	jiffies_to_timespec64(jiffies, &ts64);
+	*value = timespec64_to_timespec(ts64);
+}
 extern unsigned long timeval_to_jiffies(const struct timeval *value);
 extern void jiffies_to_timeval(const unsigned long jiffies,
 			       struct timeval *value);
diff --git a/kernel/time/time.c b/kernel/time/time.c
index 4d96236c07b0..5e71dbd36fff 100644
--- a/kernel/time/time.c
+++ b/kernel/time/time.c
@@ -588,7 +588,7 @@ __timespec_to_jiffies(unsigned long sec, long nsec)
 EXPORT_SYMBOL(__timespec_to_jiffies);
 
 void
-jiffies_to_timespec(const unsigned long jiffies, struct timespec *value)
+jiffies_to_timespec64(const unsigned long jiffies, struct timespec64 *value)
 {
 	/*
 	 * Convert jiffies to nanoseconds and separate with
-- 
2.1.0.rc2

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ