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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <3612929.btSLWR6eWu@wuerfel>
Date:	Wed, 24 Feb 2016 16:08:23 +0100
From:	Arnd Bergmann <arnd@...db.de>
To:	y2038@...ts.linaro.org
Cc:	Trond Myklebust <trond.myklebust@...marydata.com>,
	Deepa Dinamani <deepa.kernel@...il.com>,
	Linux NFS Mailing List <linux-nfs@...r.kernel.org>,
	Linux Network Devel Mailing List <netdev@...r.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	"David S. Miller" <davem@...emloft.net>,
	"J. Bruce Fields" <bfields@...ldses.org>,
	Linux FS-devel Mailing List <linux-fsdevel@...r.kernel.org>,
	Jeff Layton <jlayton@...chiereds.net>,
	Anna Schumaker <anna.schumaker@...app.com>
Subject: Re: [Y2038] [PATCH 8/8] net: sunrpc: Replace CURRENT_TIME by current_fs_time()

On Monday 22 February 2016 10:34:31 Trond Myklebust wrote:
> > diff --git a/net/sunrpc/rpc_pipe.c b/net/sunrpc/rpc_pipe.c
> > index 31789ef..bab3187 100644
> > --- a/net/sunrpc/rpc_pipe.c
> > +++ b/net/sunrpc/rpc_pipe.c
> > @@ -477,7 +477,9 @@ rpc_get_inode(struct super_block *sb, umode_t mode)
> >                 return NULL;
> >         inode->i_ino = get_next_ino();
> >         inode->i_mode = mode;
> > -       inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME;
> > +       inode->i_atime = current_fs_time(sb);
> > +       inode->i_mtime = inode->i_atime;
> > +       inode->i_ctime = inode->i_atime;
> >         switch (mode & S_IFMT) {
> >         case S_IFDIR:
> >                 inode->i_fop = &simple_dir_operations;
> 
> Why would we care? This is a pseudo-fs. There is no expectation w.r.t.
> timestamp accuracy or resolution.

As Deepa said, the primary goal is to unify the interface, so we have only
one place function that handles setting the time in an inode, and we want
to avoid CURRENT_TIME, as that is currently used in a couple of places
for things other than inode timestamps that we don't want to convert to
64-bit times at the same time.

current_fs_time() has a very small overhead compared to CURRENT_TIME,
if you think it's worth avoiding that, we could introduce a
current_pseudo_fs_time() function that does not take a superblock
argument but is more tied to inode timestamps than CURRENT_TIME is.

	Arnd

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ