From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-io0-f193.google.com ([209.85.223.193]:38857 "EHLO mail-io0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751387AbeENEF7 (ORCPT ); Mon, 14 May 2018 00:05:59 -0400 MIME-Version: 1.0 In-Reply-To: References: <20180512045921.18311-1-deepa.kernel@gmail.com> <20180512045921.18311-7-deepa.kernel@gmail.com> From: Deepa Dinamani Date: Sun, 13 May 2018 21:05:58 -0700 Message-ID: Subject: Re: [PATCH 6/6] vfs: change inode times to use struct timespec64 To: Kees Cook Cc: Al Viro , Thomas Gleixner , Arnd Bergmann , LKML , "linux-fsdevel@vger.kernel.org" , y2038 Mailman List , anton@tuxera.com, Felipe Balbi , "J. Bruce Fields" , "Darrick J. Wong" , David Howells , David Sterba , David Woodhouse , Christoph Hellwig , OGAWA Hirofumi , Mike Marshall , Jan Kara , Jaegeuk Kim , Jan Harkes , Jiri Slaby , Mark Fasheh , Miklos Szeredi , Nicolas Pitre , reiserfs-devel@vger.kernel.org, Richard Weinberger , Sage Weil , Steve French , Steven Whitehouse , Tejun Heo , Trond Myklebust , "Ted Ts'o" Content-Type: text/plain; charset="UTF-8" Sender: linux-fsdevel-owner@vger.kernel.org List-ID: Al, Are you ok with this approach to changing vfs timestamps? Kees mentioned that he wants to merge a patch to pstore that changes it to use timespec64 internally for 4.17: https://lkml.org/lkml/2018/5/13/3 I'm not sure how we usually merge such flag day patches. Should this be targeted for 4.17 or 4.18? The above might or might not be a problem based on when this series is merged. If you are ok with this approach, I could post a v2 with a couple of requested fix-ups. -Deepa On Fri, May 11, 2018 at 11:44 PM, Kees Cook wrote: > On Fri, May 11, 2018 at 9:59 PM, Deepa Dinamani wrote: >> diff --git a/fs/pstore/inode.c b/fs/pstore/inode.c >> index 5fcb845b9fec..fb681d302bb3 100644 >> --- a/fs/pstore/inode.c >> +++ b/fs/pstore/inode.c >> @@ -392,7 +392,7 @@ int pstore_mkfile(struct dentry *root, struct pstore_record *record) >> inode->i_private = private; >> >> if (record->time.tv_sec) >> - inode->i_mtime = inode->i_ctime = record->time; >> + inode->i_mtime = inode->i_ctime = timespec_to_timespec64(record->time); >> >> d_add(dentry, inode); > > I'm fine to just convert pstore internally to timespec64 right now. Is > it correct to say that I should use timespec64_to_timespec() here > until this flag day patch? And I'd need to do this as well, yes? > > fs/pstore/platform.c: record->time = > ns_to_timespec64(ktime_get_real_fast_ns()); > > Thanks! > > -Kees > > -- > Kees Cook > Pixel Security