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: <5489.1529492311@warthog.procyon.org.uk>
Date:   Wed, 20 Jun 2018 11:58:31 +0100
From:   David Howells <dhowells@...hat.com>
To:     Arnd Bergmann <arnd@...db.de>
Cc:     dhowells@...hat.com, y2038@...ts.linaro.org,
        linux-cachefs@...hat.com, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] cachefiles: avoid deprecated get_seconds()

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

> -	sprintf(nbuffer, "%08x%08x",
> -		(uint32_t) get_seconds(),
> +	sprintf(nbuffer, "%08llx%08x",
> +		(uint64_t) ktime_get_real_seconds(),

It's not necessary to expand the 'time' field of the name.  It's not
interpreted by userspace, it's just there to prevent collisions when moving
directories about.  If your cache goes weird in the future because there was a
collision with an object that was moved to the graveyard 68 years ago and not
cleaned up, then that's probably a bug in cachefilesd.

But I've no objection to using ktime_get_real_seconds() and truncating the
value.

David

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ