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]
Date:   Wed, 20 Nov 2019 20:30:22 +0000
From:   Ben Hutchings <ben.hutchings@...ethink.co.uk>
To:     Arnd Bergmann <arnd@...db.de>, y2038@...ts.linaro.org,
        Jeff Dike <jdike@...toit.com>,
        Richard Weinberger <richard@....at>,
        Anton Ivanov <anton.ivanov@...bridgegreys.com>
Cc:     Colin Ian King <colin.king@...onical.com>,
        linux-um@...ts.infradead.org, linux-kernel@...r.kernel.org,
        Al Viro <viro@...iv.linux.org.uk>
Subject: Re: [Y2038] [PATCH 12/16] hostfs: pass 64-bit timestamps to/from
 user space

On Fri, 2019-11-08 at 22:32 +0100, Arnd Bergmann wrote:
> The use of 'struct timespec' is deprecated in the kernel, so we
> want to avoid the conversions from/to the proper timespec64
> structure.
> 
> On the user space side, we have a 'struct timespec' that is defined
> by the C library and that will be incompatible with the kernel's
> view on 32-bit architectures once they move to a 64-bit time_t,
> breaking the shared binary layout of hostfs_iattr and hostfs_stat.
> 
> This changes the two structures to use a new hostfs_timespec structure
> with fixed 64-bit seconds/nanoseconds for passing the timestamps
> between hostfs_kern.c and hostfs_user.c. With a new enough user
> space side, this will allow timestamps beyond year 2038.
[...]

The "user-space" side has a structure assignment in set_attr():

	if (attrs->ia_valid & (HOSTFS_ATTR_ATIME | HOSTFS_ATTR_MTIME)) {
		err = stat_file(file, &st, fd);
		attrs->ia_atime = st.atime;
		attrs->ia_mtime = st.mtime;
		if (err != 0)
			return err;
	}

which will also need to be updated for this type change.

Ben.

-- 
Ben Hutchings, Software Developer                         Codethink Ltd
https://www.codethink.co.uk/                 Dale House, 35 Dale Street
                                     Manchester, M1 2HF, United Kingdom

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ