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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5320.1529492016@warthog.procyon.org.uk>
Date:   Wed, 20 Jun 2018 11:53:36 +0100
From:   David Howells <dhowells@...hat.com>
To:     Arnd Bergmann <arnd@...db.de>
Cc:     dhowells@...hat.com, y2038@...ts.linaro.org,
        Anna Schumaker <anna.schumaker@...app.com>,
        linux-afs@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] afs: use a consistent interpretation of time values

Arnd Bergmann <arnd@...db.de> wrote:

> which avoids the y2038 overflow

No it doesn't.  The AFS protocol is limited.

> +	time64_t		mtime_client;	/* last time client changed data */
> +	time64_t		mtime_server;	/* last time server changed data */
> ...
> -	time_t			creation;	/* volume creation time */
> +	time64_t		creation;	/* volume creation time */

Unless you can change the AFS protocol, this is a waste of memory.  It might
be better to change them to u32 as they are protocol values rather than system
values.

> -	inode->i_ctime.tv_sec	= get_seconds();
> -	inode->i_ctime.tv_nsec	= 0;
> -	inode->i_atime		= inode->i_mtime = inode->i_ctime;
> +	inode->i_ctime = inode->i_atime = inode->i_mtime = current_time(inode);

Surely, the tv_nsec should be zero since anything else cannot be represented
in the AFS protocol.

I will grant, however, I should be consistently using them as unsigned values.

Note that the answers to the above may change if and when I start supporting
the YFS protocol extensions, but for the AFS protocol, this is simply not
there.

David

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ