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:	Fri, 12 Feb 2016 01:36:03 -0800
From:	Deepa Dinamani <deepa.kernel@...il.com>
To:	linux-fsdevel@...r.kernel.org, y2038@...ts.linaro.org
Cc:	Arnd Bergmann <arnd@...db.de>, Dave Chinner <david@...morbit.com>,
	"Theodore Ts'o" <tytso@....edu>, linux-kernel@...r.kernel.org
Subject: [RFC v2a 09/12] fs: ceph: Change encode and decode functions to use vfs_time

Encode is used for iattr times, inode times and current
filesystem times.
Decode is mostly used for inode times.
Hence, these need to use vfs_time to switch to 64 bit times
along with vfs.

Decode is also used for keepalive times and processing
authentication tickets. Since inode times also use same functions
it is necessary to use vfs_time here as well.

Signed-off-by: Deepa Dinamani <deepa.kernel@...il.com>
---
 include/linux/ceph/decode.h | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/include/linux/ceph/decode.h b/include/linux/ceph/decode.h
index 633a130..8139ed9 100644
--- a/include/linux/ceph/decode.h
+++ b/include/linux/ceph/decode.h
@@ -4,6 +4,7 @@
 #include <linux/err.h>
 #include <linux/bug.h>
 #include <linux/time.h>
+#include <linux/fs.h>
 #include <asm/unaligned.h>
 
 #include <linux/ceph/types.h>
@@ -132,16 +133,16 @@ bad:
 }
 
 /*
- * struct ceph_timespec <-> struct timespec
+ * struct ceph_timespec <-> struct vfs_time
  */
-static inline void ceph_decode_timespec(struct timespec *ts,
+static inline void ceph_decode_timespec(struct vfs_time *ts,
 					const struct ceph_timespec *tv)
 {
-	ts->tv_sec = (__kernel_time_t)le32_to_cpu(tv->tv_sec);
-	ts->tv_nsec = (long)le32_to_cpu(tv->tv_nsec);
+	ts->tv_sec = (s64)(u32)le32_to_cpu(tv->tv_sec);
+	ts->tv_nsec = (long)(u32)le32_to_cpu(tv->tv_nsec);
 }
 static inline void ceph_encode_timespec(struct ceph_timespec *tv,
-					const struct timespec *ts)
+					const struct vfs_time *ts)
 {
 	tv->tv_sec = cpu_to_le32((u32)ts->tv_sec);
 	tv->tv_nsec = cpu_to_le32((u32)ts->tv_nsec);
-- 
1.9.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ