From patchwork Mon Aug 27 19:45:26 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 145196 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp332356ljw; Mon, 27 Aug 2018 12:45:51 -0700 (PDT) X-Google-Smtp-Source: ANB0VdbX3YQBerLqxA3/ZdR6O6RKX7hrtUGmeVFwVBOntPt0SAugzrXJ/y5RjbSyD4HavMFQIRfw X-Received: by 2002:a63:225f:: with SMTP id t31-v6mr6704289pgm.275.1535399150912; Mon, 27 Aug 2018 12:45:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535399150; cv=none; d=google.com; s=arc-20160816; b=Hh61BgwAixGEM3CxWw3FOtbxivNM7FyfJPdeIy90zhESBqY0w7yiBNxgPc+oGXm/bq yZX0y8eLBYHo6kEokieieU9XPiw8BX7Z2OME05KkMLnWD2D0FZ/9Zq4blSNH3ScbcWVJ +idAJ7ZYzh2fCqfJ/WfZsS2VTlSY2j5yzWq/9lwROsuPARNqUaOMntih8uv6L5Uv1pAG sEwtgEEDiRqdRMpBjcx1hm4THEpFQB99KjRyYHOLJmUSThAUkZzKm82OOgUNMqgLA12s XEFJvNiBrBhcMx8y6Gda5hAVUaqadOMJoN2DcQb3bmkuQ5l1QTyCDE9JZXMHFVj4UffT Gfjg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=xbWxJWd6+Bo4pEk7wGwmuG20eatk6ib81q2Lm6I27Ao=; b=hCRDefIlpolcbMOGeUWz7nwoijv4VSopGAvagJZD0HoA0ArYnEdtMEbWfDf+nVNUEA boCCqd9GOdqZO/z/XXvtRMaxUKonG7r39By+if0MB2ruFDO0M9jzSjFv7+V4wr82CPh9 HzaJ8ekc2tYMfQ5ZOZPL+2Zu1OlQFRWpsyw6pVG8F7Uu7FT8nM2k3ItvaZXc0KA7U5f7 M8qOVO8FCtYwvAhCDJ6sG9NNzYggeGCNepCzJOrs3G+b8t9/dgz4pz0vwXIi07lpWT2+ 4oGd9vCWRktGrNyFX64XtOM3+7KdMZ5pJuHI0a24cIQPuBf5tmSj0Y64g7/vjxjT32iw UPsw== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x66-v6si117946pfx.129.2018.08.27.12.45.50; Mon, 27 Aug 2018 12:45:50 -0700 (PDT) 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727616AbeH0Xds (ORCPT + 32 others); Mon, 27 Aug 2018 19:33:48 -0400 Received: from mout.kundenserver.de ([212.227.17.24]:45741 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727559AbeH0Xdr (ORCPT ); Mon, 27 Aug 2018 19:33:47 -0400 Received: from wuerfel.lan ([109.193.40.16]) by mrelayeu.kundenserver.de (mreue101 [212.227.15.145]) with ESMTPA (Nemesis) id 0LrsLe-1fnKv649vS-013fan; Mon, 27 Aug 2018 21:45:39 +0200 From: Arnd Bergmann To: tglx@linutronix.de Cc: y2038@lists.linaro.org, linux-api@vger.kernel.org, Christoph Hellwig , linux-kernel@vger.kernel.org, torvalds@linux-foundation.org, deepa.kernel@gmail.com, linux-arch@vger.kernel.org, Arnd Bergmann Subject: [PATCH 09/14] y2038: Change sys_utimensat() to use __kernel_timespec Date: Mon, 27 Aug 2018 21:45:26 +0200 Message-Id: <20180827194531.3796559-10-arnd@arndb.de> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180827194531.3796559-1-arnd@arndb.de> References: <20180827194531.3796559-1-arnd@arndb.de> X-Provags-ID: V03:K1:1qFKP/S7PvEA3HGD/4Qil6EAAqGJOKrgU2K9WNFrsWxBv9b6Q0D yYM7i59XcgAykwlLnhg08OtGr1cj409eIHpZMBTy0E7PgCktsEx6ZrD+e1PgXyCPr77haTj K5GGYfJLeo+g7ahQpTBdteZmDgAwyXZqtzTiIRf8M754nT8GRk4MEZzZGeaJnUBxjnEwDEl vkT7XDbZHei0fnN8oCI/g== X-UI-Out-Filterresults: notjunk:1; V01:K0:HZsGQAdmNqU=:Xig2Cyx/76WH5+gacDPcEs 1qOjGEr+CkA3fQ3xBS1Cq0cyTrNvmqvJVXcRObhCFLQjWDwuEOmTo2HbIVUOM0hnnEjzYaXsI eyZEJNOs4msPq9C64ypqRN30fmhcsD5EkbXt8kOOjD/ONME10+4I4XDHzO1ASUKZu0RSWx3Uq m/DZxWvZZXfV/LGQT2kIVTDvRB2Z/knUwRnVUXntKVylqrR83sP7u4c/8TVsDfRSiNuJEYLoM njp0TRTJd7UahF2if6HioBG+HVbjYuHqdE8akUmy+wf+ouET49d/WDPMUM+nWi8BDmDzaB4gO C01CoTW7jdNA6J1v+eRzfTfRBWAZnqBDpE3C33d77IgW5pFfPO45C7Y4BnCUR2h1pxmoONS// D2VCKrn71adJMT8rAr87x1IHzVwUuVoen9f/iHXVbBokdzeabsIRI+h+TJMV8pKW2EiTxgUT1 zHRYWuXAQZMuOg8KrY/6b4igBWgg4dmV+2Fs2F5QeqapEBWQJUGfwOfSwpeahBQ6nhgtVbU0G 8Hh7tn2WRlG09+eNd+OFUbfWhSrEdzV/X2mfbSrmIcBznVzXJ+p3JD3Fpe64BPD11Lnmxs0Vk LdaRv3Wa/zdlKsp9bjwyJQxj7pOg8qEu9eHotj2VRZDnY+c/y5XFRrfB/5hAc3hOF8JSuDbin cfMqcHIG4C8BqcOUaeLSo0oYb3Dr47zZ4VWM85fwQGR/HmKeWnriIiAH/NT7gwsbWLg4= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org When 32-bit architectures get changed to support 64-bit time_t, utimensat() needs to use the new __kernel_timespec structure as its argument. The older utime(), utimes() and futimesat() system calls don't need a corresponding change as they are no longer used on C libraries that have 64-bit time support. As we do for the other syscalls that have timespec arguments, we reuse the 'compat' syscall entry points to implement the traditional four interfaces, and only leave the new utimensat() as a native handler, so that the same code gets used on both 32-bit and 64-bit kernels on each syscall. Signed-off-by: Arnd Bergmann --- fs/utimes.c | 2 +- include/linux/syscalls.h | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) -- 2.18.0 diff --git a/fs/utimes.c b/fs/utimes.c index 79a65c163f40..d30f409ecc1a 100644 --- a/fs/utimes.c +++ b/fs/utimes.c @@ -166,7 +166,7 @@ long do_utimes(int dfd, const char __user *filename, struct timespec64 *times, } SYSCALL_DEFINE4(utimensat, int, dfd, const char __user *, filename, - struct timespec __user *, utimes, int, flags) + struct __kernel_timespec __user *, utimes, int, flags) { struct timespec64 tstimes[2]; diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h index b3e27e5ee322..420ac881a610 100644 --- a/include/linux/syscalls.h +++ b/include/linux/syscalls.h @@ -513,7 +513,8 @@ asmlinkage long sys_timerfd_gettime(int ufd, struct __kernel_itimerspec __user * /* fs/utimes.c */ asmlinkage long sys_utimensat(int dfd, const char __user *filename, - struct timespec __user *utimes, int flags); + struct __kernel_timespec __user *utimes, + int flags); /* kernel/acct.c */ asmlinkage long sys_acct(const char __user *name);