The patch titled Subject: fs/jffs2/os-linux.h: use unsigned 32-bit timstamps consistently has been removed from the -mm tree. Its filename was jffs2-use-unsigned-32-bit-timstamps-consistently.patch This patch was dropped because it was merged into mainline or a subsystem tree ------------------------------------------------------ From: Arnd Bergmann <arnd@xxxxxxxx> Subject: fs/jffs2/os-linux.h: use unsigned 32-bit timstamps consistently Most users of jffs2 are 32-bit systems that traditionally only support timestamps using a 32-bit signed time_t, in the range from years 1902 to 2038. On 64-bit systems, jffs2 however interpreted the same timestamps as unsigned values, reading back negative times (before 1970) as times between 2038 and 2106. Now that Linux supports 64-bit inode timestamps even on 32-bit systems, let's use the second interpretation everywhere to allow jffs2 to be used on 32-bit systems beyond 2038 without a fundamental change to the inode format. This has a slight risk of regressions, when existing files with timestamps before 1970 are present in file system images and are now interpreted as future time stamps. I considered moving the wraparound point a bit, e.g. to 1960, in order to deal with timestamps that ended up on Dec 31, 1969 due to incorrect timezone handling. However, this would complicate the implementation unnecessarily, so I went with the simplest possible method of extending the timestamps. Writing files with timestamps before 1970 or after 2106 now results in those times being clamped in the file system. Link: http://lkml.kernel.org/r/20180713144739.3150217-2-arnd@xxxxxxxx Signed-off-by: Arnd Bergmann <arnd@xxxxxxxx> Cc: Alexander Viro <viro@xxxxxxxxxxxxxxxxxx> Cc: David Woodhouse <dwmw2@xxxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- fs/jffs2/os-linux.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff -puN fs/jffs2/os-linux.h~jffs2-use-unsigned-32-bit-timstamps-consistently fs/jffs2/os-linux.h --- a/fs/jffs2/os-linux.h~jffs2-use-unsigned-32-bit-timstamps-consistently +++ a/fs/jffs2/os-linux.h @@ -31,13 +31,13 @@ struct kvec; #define JFFS2_F_I_GID(f) (i_gid_read(OFNI_EDONI_2SFFJ(f))) #define JFFS2_F_I_RDEV(f) (OFNI_EDONI_2SFFJ(f)->i_rdev) -#define ITIME(sec) ((struct timespec64){(int32_t)sec, 0}) -#define JFFS2_NOW() (ktime_get_real_seconds()) -#define I_SEC(tv) ((tv).tv_sec) -#define JFFS2_F_I_CTIME(f) (OFNI_EDONI_2SFFJ(f)->i_ctime.tv_sec) -#define JFFS2_F_I_MTIME(f) (OFNI_EDONI_2SFFJ(f)->i_mtime.tv_sec) -#define JFFS2_F_I_ATIME(f) (OFNI_EDONI_2SFFJ(f)->i_atime.tv_sec) - +#define JFFS2_CLAMP_TIME(t) ((uint32_t)clamp_t(time64_t, (t), 0, U32_MAX)) +#define ITIME(sec) ((struct timespec64){sec, 0}) +#define JFFS2_NOW() JFFS2_CLAMP_TIME(ktime_get_real_seconds()) +#define I_SEC(tv) JFFS2_CLAMP_TIME((tv).tv_sec) +#define JFFS2_F_I_CTIME(f) I_SEC(OFNI_EDONI_2SFFJ(f)->i_ctime) +#define JFFS2_F_I_MTIME(f) I_SEC(OFNI_EDONI_2SFFJ(f)->i_mtime) +#define JFFS2_F_I_ATIME(f) I_SEC(OFNI_EDONI_2SFFJ(f)->i_atime) #define sleep_on_spinunlock(wq, s) \ do { \ DECLARE_WAITQUEUE(__wait, current); \ _ Patches currently in -mm which might be from arnd@xxxxxxxx are kasan-only-select-slub_debug-with-sysfs=y.patch firewire-use-64-bit-time_t-based-interfaces.patch ufs-use-ktime_get_real_seconds-for-sb-and-cg-timestamps.patch ntfs-use-timespec64-directly-for-timestamp-conversion.patch hpfs-extend-gmt_to_local-conversion-to-64-bit-times.patch ocfs2-dlmglue-clean-up-timestamp-handling.patch shmem-use-monotonic-time-for-i_generation.patch mm-zsmalloc-make-several-functions-and-a-struct-static-fix.patch procfs-uptime-use-ktime_get_boottime_ts64.patch crash-print-timestamp-using-time64_t.patch nilfs2-use-64-bit-superblock-timstamps.patch hfs-hfsplus-follow-macos-time-behavior.patch hfs-hfsplus-stop-using-timespec-based-interfaces.patch reiserfs-use-monotonic-time-for-j_trans_start_time.patch reiserfs-remove-obsolete-print_time-function.patch reiserfs-change-j_timestamp-type-to-time64_t.patch fat-propagate-64-bit-inode-timestamps.patch adfs-use-timespec64-for-time-conversion.patch sysvfs-use-ktime_get_real_seconds-for-superblock-stamp.patch vmcore-hide-vmcoredd_mmap_dumps-for-nommu-builds.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html