Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp2336802ybc; Wed, 20 Nov 2019 12:32:15 -0800 (PST) X-Google-Smtp-Source: APXvYqzCNlBeLitbgEuYIrlfJmtFYZ3KlydjwsBzBxEGSVhGNWvGLl7XDuINyZpOHu87/ccjahC4 X-Received: by 2002:a1c:2344:: with SMTP id j65mr5916972wmj.38.1574281935702; Wed, 20 Nov 2019 12:32:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574281935; cv=none; d=google.com; s=arc-20160816; b=dHU2F0QVwMaw9rjStXkSgGNdrnNdjEAq9vZ/CbapYhcVDX4g3CaATx0/048uihWWa4 MO3YF8Q9P0G59dez0uWempUVe2qPXtXMs5AphU15ex8x2HJaGXS9mRbPMDX579hYNcOL Cnzr9oNYYqZKq7XTqo3Sy7vkFLcc75pew8HTFBUmV/+hzQ9gZ5u3jz4bFekC7/n5kxNI iwwdjVzhujybC9l9+GvEOIoIgYUEfJvaq4jZzHr7W+UQmqXImYAfpinD2udZSeOtYTbZ 1bGLitC9cUY+X9mbObyXGjofwTZcNnqYDJOzEAn0rf1ku1+bIsJCeMg2EURzKgZIyFnS dS7g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:organization:references:in-reply-to:date:cc:to:from :subject:message-id; bh=VCTjTzQhJT36nRZmwNShWWBB+Oj+95f+kkx9kAkagUU=; b=yz/3oMiV17dLL+Z00WzVC8c0pF1XHaoor/x8kTLuNH0jj8A2ahPP1dGUAkXeIp1BCC MTEAEoMVhKC6P3HHlt6Fr92Z8XrdzuLTNB8msSwa6Voste1ceQlkEuF9BjRYWBqWA4fS xC/iKu4KG9nESPhX4OXsaZbYfHA2nuM+4KtLkKJgFj1SCHBQzJDwYiUN4PrGu2NCHs0x Ja9VwIhm/HezavmP99sWXaMsZfb66nZE/e96mIelWJXG7XeJMNoCJHtnBNJcspEQjpc1 psQkJWrXWocJeMo8yqu2G7TnpBFS+cH6F74u/k/3XWwJYUyF3Uacad32OJJl9xUH3bbg 9r6A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=codethink.co.uk Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b29si414889ede.118.2019.11.20.12.31.47; Wed, 20 Nov 2019 12:32:15 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=codethink.co.uk Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726406AbfKTUaf (ORCPT + 99 others); Wed, 20 Nov 2019 15:30:35 -0500 Received: from imap1.codethink.co.uk ([176.9.8.82]:35217 "EHLO imap1.codethink.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725306AbfKTUaf (ORCPT ); Wed, 20 Nov 2019 15:30:35 -0500 Received: from [167.98.27.226] (helo=xylophone) by imap1.codethink.co.uk with esmtpsa (Exim 4.84_2 #1 (Debian)) id 1iXWcJ-0003fs-EL; Wed, 20 Nov 2019 20:30:23 +0000 Message-ID: Subject: Re: [Y2038] [PATCH 12/16] hostfs: pass 64-bit timestamps to/from user space From: Ben Hutchings To: Arnd Bergmann , y2038@lists.linaro.org, Jeff Dike , Richard Weinberger , Anton Ivanov Cc: Colin Ian King , linux-um@lists.infradead.org, linux-kernel@vger.kernel.org, Al Viro Date: Wed, 20 Nov 2019 20:30:22 +0000 In-Reply-To: <20191108213257.3097633-13-arnd@arndb.de> References: <20191108213257.3097633-1-arnd@arndb.de> <20191108213257.3097633-13-arnd@arndb.de> Organization: Codethink Ltd. Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.30.5-1.1 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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