Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp2341709ybc; Wed, 20 Nov 2019 12:37:23 -0800 (PST) X-Google-Smtp-Source: APXvYqyenCcYzCCyCQFube7MyFBctpcpXYecDsksHs89bw/eqWcIn4F9SouqXXVIrMxz6/HSHGUx X-Received: by 2002:a5d:60c5:: with SMTP id x5mr5561732wrt.189.1574282242897; Wed, 20 Nov 2019 12:37:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574282242; cv=none; d=google.com; s=arc-20160816; b=EgkHGj7A87rbzZmtzlmT+E3UhDsxaLhVAbd0rOFWDmq0YErQfecOmry5cJwMb131gi 2KqIzWdfkTB4ArEDR23wlO6BAXI1qsPjoGpLePU/snV3B3fwNw9rHIphZ8hpbImFz9mp W+TgAkRwJJiVO+OwUZdqMEs8HS4s+ggxXt+gRZYUhBhmwjGK9FzwH/xmxTGtTyvBjgE3 NVZJ1t731jX4/OhLORlUQkGL8ix/FlHlfa+zszBDzv68KmXob0iBCe2oz9Ux5nn6SuIp jYGLRBSdynZrm6w7ro2iCUmkT7DfSEl2U+fvNLBQ5LUTSt8tgCJ0HHjzki1g9MS7JN22 gkRg== 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=TecWzXxG2sEfCVUH4Po/0JGI793/m9I7iB/ZRBnpgas=; b=o9o5ucpybcdrtHMxLXvc7rJAu3gGSUAluGoi5/N4o9DyvrZv2PbDxTLmRlTZ3Sug55 UFNuh3ENcPEvHucE3mj73a8mn8k8pWGStQZCjtkRAOjOazwBunHcZlAXLPOpDjCFa+pT +tyuFuNjjCMpnCZxwRATUTU+NS7/3xB0bgXTG30nYOJ8McG1OT//zAcBOwNQvyYIOEFI wLj+iYyX47YneATazAJAHhgtr6kiNMCHK4KBywUTTAxTb51TFstcHLC8kwbK1ymb33f3 j3qaMiK/OAuqBlSyqQmtMVvSnZNSyvPtA7WDGWy+MWdwGUterPP1zDjcVK8WqVfSWWfI JRng== 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 q30si453306edb.372.2019.11.20.12.36.57; Wed, 20 Nov 2019 12:37:22 -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 S1726270AbfKTUft (ORCPT + 99 others); Wed, 20 Nov 2019 15:35:49 -0500 Received: from imap1.codethink.co.uk ([176.9.8.82]:35312 "EHLO imap1.codethink.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725787AbfKTUft (ORCPT ); Wed, 20 Nov 2019 15:35:49 -0500 Received: from [167.98.27.226] (helo=xylophone) by imap1.codethink.co.uk with esmtpsa (Exim 4.84_2 #1 (Debian)) id 1iXWhV-0003lv-28; Wed, 20 Nov 2019 20:35:45 +0000 Message-ID: <1eb03d47afc38cd01d17988cf170b14066569bde.camel@codethink.co.uk> 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:35:44 +0000 In-Reply-To: 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 Wed, 2019-11-20 at 20:30 +0000, Ben Hutchings wrote: > 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. Sorry, I'm confused, this looks fine. Ben. -- Ben Hutchings, Software Developer Codethink Ltd https://www.codethink.co.uk/ Dale House, 35 Dale Street Manchester, M1 2HF, United Kingdom