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:52:46 -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 v2c 1/8] vfs: Add vfs_time abstractions

Add vfs_time accessors to help convert vfs timestamps to use
64 bit times. These create an abstraction layer so that
vfs inode times can be switched to struct timespec64 from
struct timespec without breaking the individual filesystems
after they have incorporated these.

Add vfs_time data type aliases to help convert vfs timestamps
to use 64 bit times. These create an abstraction layer so that
vfs inode times can be switched to struct timespec64 instead
of struct timespec.

Use uapi exposed data types, timespec and timespec64 here to keep
minimal timestamp data type conversions in API's interfacing with
vfs.

Signed-off-by: Deepa Dinamani <deepa.kernel@...il.com>
---
 include/linux/fs.h | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

diff --git a/include/linux/fs.h b/include/linux/fs.h
index 4af612f..56e6373 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -1412,6 +1412,27 @@ static inline struct timespec current_fs_time_sec(struct super_block *sb)
 	return (struct timespec) { get_seconds(), 0 };
 }
 
+/* Place holder defines until it is safe to use timespec64
+ * in the vfs layer.
+ * timespec64 data type and functions will be used at that
+ * time directly by all filesystems and these defines will be deleted.
+ */
+static inline struct timespec64 vfs_time_to_timespec64(struct timespec inode_ts)
+{
+	return timespec_to_timespec64(inode_ts);
+}
+
+static inline struct timespec timespec64_to_vfs_time(struct timespec64 ts)
+{
+	return timespec64_to_timespec(ts);
+}
+
+
+#define vfs_time timespec
+
+#define vfs_time_compare timespec_compare
+#define vfs_time_equal   timespec_equal
+
 /*
  * Snapshotting support.
  */
-- 
1.9.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ