[Y2038] [PATCH v8 08/20] adfs: Fill in max and min timestamps in sb

2019-08-18 Thread Deepa Dinamani
(). Signed-off-by: Deepa Dinamani --- fs/adfs/adfs.h | 13 + fs/adfs/inode.c | 8 ++-- fs/adfs/super.c | 2 ++ 3 files changed, 17 insertions(+), 6 deletions(-) diff --git a/fs/adfs/adfs.h b/fs/adfs/adfs.h index b7e844d2f321..dca8b23aa43f 100644 --- a/fs/adfs/adfs.h +++ b/fs/adfs

[Y2038] [PATCH v8 09/20] ext4: Initialize timestamps limits

2019-08-18 Thread Deepa Dinamani
-by: Deepa Dinamani Reviewed-by: Andreas Dilger Cc: ty...@mit.edu Cc: adilger.ker...@dilger.ca Cc: linux-e...@vger.kernel.org --- fs/ext4/ext4.h | 10 +- fs/ext4/super.c | 17 +++-- 2 files changed, 24 insertions(+), 3 deletions(-) diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h

[Y2038] [PATCH v8 15/20] fs: ceph: Initialize filesystem timestamp ranges

2019-08-18 Thread Deepa Dinamani
. Signed-off-by: Deepa Dinamani Cc: z...@redhat.com Cc: s...@redhat.com Cc: idryo...@gmail.com Cc: ceph-de...@vger.kernel.org --- fs/ceph/super.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fs/ceph/super.c b/fs/ceph/super.c index 4406ec7018bb..2aa052b7bda7 100644 --- a/fs/ceph/super.c +++ b

[Y2038] [PATCH v8 02/20] vfs: Add timestamp_truncate() api

2019-08-18 Thread Deepa Dinamani
to accommodate filesystem timestamp clamping according to flesystem limits. Note that the tv_nsec part is set to 0 if tv_sec is not within the range supported for the filesystem. Signed-off-by: Deepa Dinamani --- fs/inode.c | 33 - include/linux/fs.h | 2 ++ 2

[Y2038] [PATCH v8 01/20] vfs: Add file timestamp range support

2019-08-18 Thread Deepa Dinamani
to always support the min and max allowable values for the fields. Signed-off-by: Deepa Dinamani --- fs/super.c | 2 ++ include/linux/fs.h | 3 +++ include/linux/time64.h | 2 ++ 3 files changed, 7 insertions(+) diff --git a/fs/super.c b/fs/super.c index 36cb5aaf6f08..620c1911bb36

[Y2038] [PATCH v8 03/20] timestamp_truncate: Replace users of timespec64_trunc

2019-08-18 Thread Deepa Dinamani
pression e; @@ inode->i_xtime = - timespec64_trunc( + timestamp_truncate( ..., - e); + inode); Signed-off-by: Deepa Dinamani Cc: adrian.hun...@intel.com Cc: dedeki...@gmail.com Cc: gre...@linuxfoundation.org Cc: h...@lst.de Cc: jaeg...@kernel.org Cc: jl...@evilplan.org Cc: rich...@nod.at Cc: t.

[Y2038] [PATCH v8 07/20] 9p: Fill min and max timestamps in sb

2019-08-18 Thread Deepa Dinamani
is retained as S64_MAX. This is because that is the upper bound supported by vfs. Signed-off-by: Deepa Dinamani Cc: eri...@gmail.com Cc: lu...@ionkov.net Cc: asmad...@codewreck.org Cc: v9fs-develo...@lists.sourceforge.net --- fs/9p/vfs_super.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion

[Y2038] [PATCH v8 17/20] fs: hpfs: Initialize filesystem timestamp ranges

2019-08-18 Thread Deepa Dinamani
Fill in the appropriate limits to avoid inconsistencies in the vfs cached inode times when timestamps are outside the permitted range. Also change the local_to_gmt() to use time64_t instead of time32_t. Signed-off-by: Deepa Dinamani Cc: miku...@artax.karlin.mff.cuni.cz --- fs/hpfs/hpfs_fn.h

[Y2038] [PATCH v8 16/20] fs: orangefs: Initialize filesystem timestamp ranges

2019-08-18 Thread Deepa Dinamani
n/orangefs Author: Neill Miller Date: Thu Sep 2 15:00:38 2004 + Signed-off-by: Deepa Dinamani Cc: hub...@omnibond.com Cc: mar...@omnibond.com Cc: de...@lists.orangefs.org --- fs/orangefs/super.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fs/orangefs/super.c b/fs/orangefs/sup

[Y2038] [PATCH v8 18/20] fs: omfs: Initialize filesystem timestamp ranges

2019-08-18 Thread Deepa Dinamani
Fill in the appropriate limits to avoid inconsistencies in the vfs cached inode times when timestamps are outside the permitted range. Signed-off-by: Deepa Dinamani Acked-by: Bob Copeland Cc: m...@bobcopeland.com Cc: linux-karma-de...@lists.sourceforge.net --- fs/omfs/inode.c | 4 1 file

[Y2038] [PATCH v8 20/20] isofs: Initialize filesystem timestamp ranges

2019-08-18 Thread Deepa Dinamani
Fill in the appropriate limits to avoid inconsistencies in the vfs cached inode times when timestamps are outside the permitted range. Reference: http://www.ecma-international.org/publications/standards/Ecma-119.htm Signed-off-by: Deepa Dinamani --- fs/isofs/inode.c | 7 +++ 1 file changed

[Y2038] [PATCH v8 19/20] pstore: fs superblock limits

2019-08-18 Thread Deepa Dinamani
Read and write to the 'compressed' flag of pstore"). Signed-off-by: Deepa Dinamani Acked-by: Kees Cook Cc: an...@enomsg.org Cc: ccr...@android.com Cc: keesc...@chromium.org Cc: tony.l...@intel.com --- fs/pstore/ram.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fs/pstore/ram.c b/fs/ps

[Y2038] [PATCH v8 14/20] fs: sysv: Initialize filesystem timestamp ranges

2019-08-18 Thread Deepa Dinamani
Fill in the appropriate limits to avoid inconsistencies in the vfs cached inode times when timestamps are outside the permitted range. Signed-off-by: Deepa Dinamani Cc: h...@infradead.org --- fs/sysv/super.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/fs/sysv/super.c

[Y2038] [PATCH v8 12/20] fs: fat: Initialize filesystem timestamp ranges

2019-08-18 Thread Deepa Dinamani
we support the full range of years that can be represented, up to 2107. Signed-off-by: Deepa Dinamani Cc: hirof...@mail.parknet.co.jp --- fs/fat/inode.c | 12 1 file changed, 12 insertions(+) diff --git a/fs/fat/inode.c b/fs/fat/inode.c index 0bc2abc5d453..f27f84e2103f 100644 --- a/fs/f

[Y2038] [PATCH v8 10/20] fs: nfs: Initialize filesystem timestamp ranges

2019-08-18 Thread Deepa Dinamani
struct nfstime3 { uint32 seconds; uint32 nseconds; }; Use the limits as per the RFC. Signed-off-by: Deepa Dinamani Cc: trond.mykleb...@hammerspace.com Cc: anna.schuma...@netapp.com Cc: linux-...@vger.kernel.org --- fs/nfs/super.c | 20 +++- 1 file

Re: [Y2038] [PATCH 04/20] mount: Add mount warning for impending timestamp expiry

2019-08-10 Thread Deepa Dinamani
On Mon, Aug 5, 2019 at 7:14 AM Ben Hutchings wrote: > > On Mon, 2019-07-29 at 18:49 -0700, Deepa Dinamani wrote: > > The warning reuses the uptime max of 30 years used by the > > setitimeofday(). > > > > Note that the warning is only added for new filesystem mounts

Re: [Y2038] [PATCH 04/20] mount: Add mount warning for impending timestamp expiry

2019-08-10 Thread Deepa Dinamani
> This doesn't seem like a helpful way to log the time. Maybe use > time64_to_tm() to convert to "broken down" time and then print it with > "%ptR"... but that wants struct rtc_time. If you apply the attached > patch, however, you should then be able to print struct tm with > "%ptT". OK. Will

[Y2038] [PATCH 00/20] vfs: Add support for timestamp limits

2019-08-14 Thread Deepa Dinamani
: * No change in mount behavior because of expiry of timestamps. * Included limits for more filesystems. Deepa Dinamani (20): vfs: Add file timestamp range support vfs: Add timestamp_truncate() api timestamp_truncate: Replace users of timespec64_trunc mount: Add mount warning for impending timestamp

Re: [Y2038] [PATCH v8 08/20] adfs: Fill in max and min timestamps in sb

2019-08-20 Thread Deepa Dinamani
On Tue, Aug 20, 2019 at 9:28 AM Matthew Wilcox wrote: > > On Sun, Aug 18, 2019 at 09:58:05AM -0700, Deepa Dinamani wrote: > > Note that the min timestamp is assumed to be > > 01 Jan 1970 00:00:00 (Unix epoch). This is consistent > > with the way we convert timestamp

Re: [Y2038] [PATCH v8 19/20] pstore: fs superblock limits

2019-08-20 Thread Deepa Dinamani
On Tue, Aug 20, 2019 at 12:20 AM Kees Cook wrote: > > On Sun, Aug 18, 2019 at 09:58:16AM -0700, Deepa Dinamani wrote: > > Leaving granularity at 1ns because it is dependent on the specific > > attached backing pstore module. ramoops has microsecond resolution. > > > &g

[Y2038] [PATCH v8 00/20] vfs: Add support for timestamp limits

2019-08-25 Thread Deepa Dinamani
since v2: * Introduce early boot param override for checks. * Drop afs patch for timestamp limits. Changes since v1: * return EROFS on mount errors * fix mtime copy/paste error in utimes Deepa Dinamani (20): vfs: Add file timestamp range support vfs: Add timestamp_truncate() api

[Y2038] [GIT PULL RESEND] vfs: Add support for timestamp limits

2019-08-30 Thread Deepa Dinamani
to 5ad32b3acded06183f40806f76b030c3143017bb: isofs: Initialize filesystem timestamp ranges (2019-08-30 08:11:25 -0700) - Deepa Deepa Dinamani (18): vfs: Add file timestamp range support vfs: Add timestamp_truncate() api

Re: [Y2038] [GIT PULL] vfs: Add support for timestamp limits

2019-08-30 Thread Deepa Dinamani
On Thu, Aug 29, 2019 at 6:20 PM Mike Marshall wrote: > > Hi Deepa... > > I installed this patch series on top of Linux 5.3-rc6 and ran xfstests > on orangefs and got a regression... generic/258 failed > with: "Timestamp wrapped"... > > # cat results/generic/258.out.bad > QA output created by 258

Re: [Y2038] [GIT PULL] vfs: Add support for timestamp limits

2019-08-30 Thread Deepa Dinamani
Adding the others who were on original cc, just in case. - Deepa On Wed, Aug 28, 2019 at 9:12 PM Deepa Dinamani wrote: > > Hi Al, Arnd, > > This is a pull request for filling in min and max timestamps for filesystems. > I've added all the acks, and dropped the adfs patch. That

[Y2038] [PATCH] adfs: Fill in max and min timestamps in sb

2019-09-02 Thread Deepa Dinamani
(). Signed-off-by: Deepa Dinamani --- This depends on the following patch in Arnd's y2038 tree: https://git.kernel.org/pub/scm/linux/kernel/git/arnd/playground y2038 188d20bcd1eb ("vfs: Add file timestamp range support") fs/adfs/adfs.h | 13 + fs/adfs/inode.c | 8 ---

[Y2038] [GIT PULL] vfs: Add support for timestamp limits

2019-08-28 Thread Deepa Dinamani
) Deepa Dinamani (19): vfs: Add file timestamp range support vfs: Add timestamp_truncate() api timestamp_truncate: Replace users of timespec64_trunc mount: Add mount warning for impending timestamp expiry utimes

Re: [Y2038] [PATCH 03/20] timestamp_truncate: Replace users of timespec64_trunc

2019-07-30 Thread Deepa Dinamani
On Tue, Jul 30, 2019 at 1:27 AM OGAWA Hirofumi wrote: > > Deepa Dinamani writes: > > > diff --git a/fs/fat/misc.c b/fs/fat/misc.c > > index 1e08bd54c5fb..53bb7c6bf993 100644 > > --- a/fs/fat/misc.c > > +++ b/fs/fat/misc.c > > @@ -307,8 +307,9 @@ int fat_tr

Re: [Y2038] [PATCH 12/20] fs: fat: Initialize filesystem timestamp ranges

2019-07-30 Thread Deepa Dinamani
On Tue, Jul 30, 2019 at 2:31 AM OGAWA Hirofumi wrote: > > Deepa Dinamani writes: > > > +/* DOS dates from 1980/1/1 through 2107/12/31 */ > > +#define FAT_DATE_MIN (0<<9 | 1<<5 | 1) > > +#define FAT_DATE_MAX (127<<9 | 12<<5 |

Re: [Y2038] [PATCH 09/20] ext4: Initialize timestamps limits

2019-08-01 Thread Deepa Dinamani
On Wed, Jul 31, 2019 at 8:26 AM Darrick J. Wong wrote: > > On Mon, Jul 29, 2019 at 06:49:13PM -0700, Deepa Dinamani wrote: > > ext4 has different overflow limits for max filesystem > > timestamps based on the extra bytes available. > > > > The timestamp l

Re: [Y2038] [PATCH 19/20] pstore: fs superblock limits

2019-08-01 Thread Deepa Dinamani
On Tue, Jul 30, 2019 at 12:36 AM Arnd Bergmann wrote: > > On Tue, Jul 30, 2019 at 6:31 AM Kees Cook wrote: > > > > On Mon, Jul 29, 2019 at 06:49:23PM -0700, Deepa Dinamani wrote: > > > Also update the gran since pstore has microsecond granularity. > > > >

Re: [Y2038] [PATCH 09/20] ext4: Initialize timestamps limits

2019-08-08 Thread Deepa Dinamani
> Rather than printing a warning at mount time (which may be confusing > to users for a problem they may never see), it makes sense to only > print such a warning in the vanishingly small case that someone actually > tries to modify the inode timestamp but it doesn't fit, rather than on > the

[Y2038] [PATCH] generic/402: fix for updated behavior of timestamp limits

2019-07-18 Thread Deepa Dinamani
The mount behavior will not be altered because of the unsupported timestamps on the filesystems. Adjust the test accordingly. An updated series to be posted after the merge window is hosted at <https://github.com/deepa-hub/vfs/tree/limits> Signed-off-by: Deepa Dinamani --- com

Re: [Y2038] [PATCH] generic/402: fix for updated behavior of timestamp limits

2019-10-02 Thread Deepa Dinamani
On Sun, Jul 21, 2019 at 9:47 AM Eryu Guan wrote: > > On Thu, Jul 18, 2019 at 09:12:31PM -0700, Deepa Dinamani wrote: > > The mount behavior will not be altered because of the unsupported > > timestamps on the filesystems. > > It'd be better to provide more details in t

Re: [Y2038] [PATCH 03/16] net: sock: use __kernel_old_timespec instead of timespec

2019-11-09 Thread Deepa Dinamani
Acked-by: Deepa Dinamani ___ Y2038 mailing list Y2038@lists.linaro.org https://lists.linaro.org/mailman/listinfo/y2038

Re: [Y2038] [PATCH 13/23] y2038: socket: remove timespec reference in timestamping

2019-11-09 Thread Deepa Dinamani
Acked-by: Deepa Dinamani ___ Y2038 mailing list Y2038@lists.linaro.org https://lists.linaro.org/mailman/listinfo/y2038

Re: [Y2038] [PATCH 02/23] y2038: add __kernel_old_timespec and __kernel_old_time_t

2019-11-09 Thread Deepa Dinamani
Acked-by: Deepa Dinamani ___ Y2038 mailing list Y2038@lists.linaro.org https://lists.linaro.org/mailman/listinfo/y2038

Re: [Y2038] [PATCH 10/23] y2038: uapi: change __kernel_time_t to __kernel_old_time_t

2019-11-09 Thread Deepa Dinamani
Acked-by: Deepa Dinamani ___ Y2038 mailing list Y2038@lists.linaro.org https://lists.linaro.org/mailman/listinfo/y2038

Re: [Y2038] [PATCH 04/16] dlm: use SO_SNDTIMEO_NEW instead of SO_SNDTIMEO_OLD

2019-11-09 Thread Deepa Dinamani
Acked-by: Deepa Dinamani ___ Y2038 mailing list Y2038@lists.linaro.org https://lists.linaro.org/mailman/listinfo/y2038

Re: [Y2038] [PATCH] generic/402: fix for updated behavior of timestamp limits

2019-12-12 Thread Deepa Dinamani
> > { > > local device=${1:-$TEST_DEV} > > - local sysfsdir=/proc/sys/fs/fs-timestamp-check-on > > - > > - if [ ! -e $sysfsdir ]; then > > - _notrun "no kernel support for y2038 sysfs switch" > > - fi > > > > Deepa, > > This change, which is already merged

Re: [Y2038] [PATCH] generic/402: fix for updated behavior of timestamp limits

2019-10-23 Thread Deepa Dinamani
On Sat, Oct 5, 2019 at 11:35 AM Eryu Guan wrote: > We already print error message on test failure, which will break the > golden image, so there's no need to return 0 or 1. All similar checks > and returns are not needed in other functions. I removed the status checks and associated returns.

[Y2038] [PATCH] generic/402: update test script style

2019-10-23 Thread Deepa Dinamani
Removed test result checking, as test result already depends on output diff comparison with the golden output. Signed-off-by: Deepa Dinamani --- tests/generic/402 | 33 +++-- tests/generic/402.out | 2 +- 2 files changed, 8 insertions(+), 27 deletions(-) diff

Re: [Y2038] [PATCH] utimes: Clamp the timestamps in notify_change()

2019-11-24 Thread Deepa Dinamani
On Sun, Nov 24, 2019 at 11:49 AM Al Viro wrote: > > On Sun, Nov 24, 2019 at 09:31:45PM +0200, Amir Goldstein wrote: > > Push clamping timestamps down the call stack into notify_change(), so > > in-kernel callers like nfsd and overlayfs will get similar timestamp > > set behavior as utimes. > >

Re: [Y2038] [PATCH] utimes: Clamp the timestamps in notify_change()

2019-11-29 Thread Deepa Dinamani
On Sun, Nov 24, 2019 at 1:34 PM Al Viro wrote: > > On Sun, Nov 24, 2019 at 01:13:50PM -0800, Deepa Dinamani wrote: > > > We also want to replace all uses of timespec64_trunc() with > > timestamp_truncate() for all fs cases. > > > > In that case we have a few m

Re: [Y2038] [PATCH] utimes: Clamp the timestamps in notify_change()

2019-11-24 Thread Deepa Dinamani
On Sun, Nov 24, 2019 at 12:50 PM Amir Goldstein wrote: > > On Sun, Nov 24, 2019 at 9:49 PM Al Viro wrote: > > > > On Sun, Nov 24, 2019 at 09:31:45PM +0200, Amir Goldstein wrote: > > > Push clamping timestamps down the call stack into notify_change(), so > > > in-kernel callers like nfsd and

Re: [Y2038] [PATCH] utimes: Clamp the timestamps in notify_change()

2019-11-25 Thread Deepa Dinamani
On Mon, Nov 25, 2019 at 8:46 AM J . Bruce Fields wrote: > > On Sun, Nov 24, 2019 at 09:31:45PM +0200, Amir Goldstein wrote: > > Push clamping timestamps down the call stack into notify_change(), so > > in-kernel callers like nfsd and overlayfs will get similar timestamp > > set behavior as

[Y2038] [PATCH] generic/402: Make timestamp range check conditional

2019-12-22 Thread Deepa Dinamani
Addition of fs-specific timestamp range checking was added in 188d20bcd1eb ("vfs: Add file timestamp range support"). Add a check for whether the kernel supports the limits check before running the associated test. Signed-off-by: Deepa Dinamani --- common/rc | 11

Re: [Y2038] [PATCH] generic/402: fix for updated behavior of timestamp limits

2019-12-18 Thread Deepa Dinamani
I looked at this more closely. Here is the patch that added the sysctl to the kernel previously: https://lkml.org/lkml/2016/11/2/300. This was meant to be configurable earlier. That is why this made sense. But, now it is not. We unconditionally clamp to the fs limits. I looked around to see if we

Re: [Y2038] [PATCH] generic/402: fix for updated behavior of timestamp limits

2019-12-20 Thread Deepa Dinamani
> Deepa, > > You added this warning: > pr_warn("Mounted %s file system at %s supports timestamps until ... > along with timestamp clamping > > I suggest that you implement kernel support check based on grepping > for this warning after loop mounting an ext2 test image. > A bit over the top and

Re: [Y2038] [PATCH v2] generic/402: Make timestamp range check conditional

2020-01-17 Thread Deepa Dinamani
On Fri, Jan 17, 2020 at 10:23 AM Deepa Dinamani wrote: > > On Fri, Jan 17, 2020 at 1:09 AM Amir Goldstein wrote: > > > > > > I understand why you dislike the ext2+loop test, but please hear me out. > > > > > > > > From all the fs types that are sup

[Y2038] [PATCH v3 1/1] generic/402: Make timestamp range check conditional

2020-01-18 Thread Deepa Dinamani
til fsinfo syscall would provide fs timestamp limits info. This isn't perfect, but works for filesystems expiring in 2038. Suggested-by: Amir Goldstein Signed-off-by: Deepa Dinamani --- common/rc | 7 +++ tests/generic/402 | 13 ++--- 2 files changed, 17 insertions(+), 3

Re: [Y2038] [PATCH v2] generic/402: Make timestamp range check conditional

2020-01-17 Thread Deepa Dinamani
On Fri, Jan 17, 2020 at 1:09 AM Amir Goldstein wrote: > > > > I understand why you dislike the ext2+loop test, but please hear me out. > > > > > > From all the fs types that are supported by the test, only btrfs and ext4 > > > with > > > large inode size are y2038 ready. > > > For the rest of

Re: [Y2038] [PATCH v2] generic/402: Make timestamp range check conditional

2020-01-02 Thread Deepa Dinamani
able to xfstests maintainers. Let me know and I can post it as a V3. -Deepa From f539005511f3ad83563cabc6d185b2c76ae37dea Mon Sep 17 00:00:00 2001 From: Deepa Dinamani Date: Sun, 22 Dec 2019 19:18:14 -0800 Subject: [PATCH v3 1/1] generic/402: Make timestamp range check conditional Addition of fs-

Re: [Y2038] [PATCH] generic/402: Make timestamp range check conditional

2019-12-23 Thread Deepa Dinamani
On Sun, Dec 22, 2019 at 10:36 PM Amir Goldstein wrote: > > On Mon, Dec 23, 2019 at 7:16 AM Deepa Dinamani wrote: > > > > Addition of fs-specific timestamp range checking was added > > in 188d20bcd1eb ("vfs: Add file timestamp range support"). > > > &g

[Y2038] [PATCH v2] generic/402: Make timestamp range check conditional

2019-12-28 Thread Deepa Dinamani
is feature. If there is a concern that ext4 could be built out of the kernel, I can include a _require_ext4() along the lines of _require_ext2(). Suggested-by: Amir Goldstein Signed-off-by: Deepa Dinamani --- * Changes since v1: used loopback device instead of mkfs scratch dev common/rc

<    2   3   4   5   6   7