Re: [Y2038] [RFC 0/6] vfs: Add timestamp range check support

2016-11-02 Thread Dave Chinner
On Wed, Nov 02, 2016 at 08:04:50AM -0700, Deepa Dinamani wrote: > The series is aimed at adding timestamp checking and policy > related to it to vfs. > > The series was developed with discussions and guidance from > Arnd Bergmann. > > The original idea for the series was the discussion: >

[Y2038] [RFC 2/6] vfs: Add checks for filesystem timestamp limits

2016-11-02 Thread Deepa Dinamani
Allow read only mounts for filesystems that do not have maximum timestamps beyond the y2038 expiry timestamp. Also, allow a sysctl override to all such filesystems to be mounted with write permissions. Alternatively, a mount option can be created to allow or disallow range check based clamps and

[Y2038] [RFC 6/6] utimes: Clamp the timestamps before update

2016-11-02 Thread Deepa Dinamani
POSIX.1 section for futimens, utimensat and utimes says: The file's relevant timestamp shall be set to the greatest value supported by the file system that is not greater than the specified time. Clamp the timestamps accordingly before assignment. Note that clamp_t macro is used for clamping

[Y2038] [RFC 4/6] ext4: Initialize timestamps limits

2016-11-02 Thread Deepa Dinamani
ext4 has different overflow limits for max filesystem timestamps based on the extra bytes available. Signed-off-by: Deepa Dinamani Cc: "Theodore Ts'o" Cc: Andreas Dilger Cc: linux-e...@vger.kernel.org --- fs/ext4/ext4.h | 4

[Y2038] [RFC 5/6] vfs: Add timestamp_truncate() api

2016-11-02 Thread Deepa Dinamani
timespec_trunc() function is used to truncate a filesystem timestamp to the right granularity. But, the function does not clamp tv_sec part of the timestamps according to the filesystem timestamp limits. Also, timespec_trunc() is exclusively used for filesystem timestamps. Move the api to be part

[Y2038] [RFC 0/6] vfs: Add timestamp range check support

2016-11-02 Thread Deepa Dinamani
The series is aimed at adding timestamp checking and policy related to it to vfs. The series was developed with discussions and guidance from Arnd Bergmann. The original idea for the series was the discussion: https://lkml.org/lkml/2014/5/30/551 Patches 5 and 6 can be merged only after vfs is