From patchwork Wed Apr 25 16:03:00 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 134355 Delivered-To: patch@linaro.org Received: by 10.46.151.6 with SMTP id r6csp1051312lji; Wed, 25 Apr 2018 09:05:29 -0700 (PDT) X-Google-Smtp-Source: AIpwx49BpgqmELXmvMv59a8japkyas1Qrv0TOJ6y2pUMGUNoh+vp22LFC1QsU1vPrDtM5eBkHwh/ X-Received: by 10.101.69.194 with SMTP id m2mr24235318pgr.433.1524672329336; Wed, 25 Apr 2018 09:05:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524672329; cv=none; d=google.com; s=arc-20160816; b=QEUxzoSJL4jz3DxK2zXEx39uYA2FTL5UtfJlJub4nITuWSsIDRznzE0U0CKufg1QMc qELQzR6E4bXTjd8HCxQnJSPugGjzfNZGPVyRzWralL2l3HueCE4q0/lCOryPwzYsSMmf /z2qqf0aaJw/UIWfpMEfUI10IqJ7QkyF8INy3gzfAA27wo5Y6GXi6yS3Q4nH75LXzDEn /6/OmScGY3gErE/YEmbdEv29a0FP9yBYOATptRkPIGZOqzRyuOVpuOkANuGVTHdeKc6x CyZ5YyLR/UB4umzARUOZpY2sd9Ataftl8sOb3tKuCkjWSHUtUCMbfJRir1+8zOqFCLSW HQPA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:in-reply-to:message-id:date:subject:cc:to:from :delivered-to:sender:list-help:list-post:list-archive:list-subscribe :list-unsubscribe:list-id:precedence:mailing-list:dkim-signature :domainkey-signature:arc-authentication-results; bh=pY/unc05HR9/U7jR5JfwojOFiWBaI42qEBvPClQK8Xk=; b=G0NHVAc2ZcyRd2aA7CqQQj892zJmKijBVQo4DsJ/TwJFwvt04f8nsXtqec5QJjy06N agq0hMU7PfizHWBQPVBHKxBq26u1sa+RsyRlZt3Nb1bQ2gAktKL0d0cSwDdMt7wcBorr P9z59x5lJeLMkaRoDLLwhMzsmStztHam8gZowzuvF+D/GMHHtUwk4SgXl6drjS2OZf7w r1TgOcdfl/FIj4G8IAjLRZ4oYwFv74+ZxZRZdk3MQs+2F4sSegdc4RF2ZlKi/3gpfnzT UO6LxaO/00Bm2gBjJfPXppICL/J5FiR1T8pDkA4srAFkM9kbsBX/enTlzDU4/Q8ik21R poxA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b=PZmcCqQI; spf=pass (google.com: domain of libc-alpha-return-91845-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=libc-alpha-return-91845-patch=linaro.org@sourceware.org Return-Path: Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id l3si3151362pfa.368.2018.04.25.09.05.28 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 25 Apr 2018 09:05:29 -0700 (PDT) Received-SPF: pass (google.com: domain of libc-alpha-return-91845-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) client-ip=209.132.180.131; Authentication-Results: mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b=PZmcCqQI; spf=pass (google.com: domain of libc-alpha-return-91845-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=libc-alpha-return-91845-patch=linaro.org@sourceware.org DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:cc:subject:date:message-id:in-reply-to :references; q=dns; s=default; b=J3nrdifvjvN/LzLDybG2c17UieH5npA qzNbuwZ2RvMPj47jSwjagYPuha6utbFZRRtR8S8FIpiG3kybz/prtJOS1JgIj8HL e10KUY6OjLV8XggQFxscARhAhixl0k1iwTo8BR+w9YqlTlPvOezdiysOPwR0+AtL Tzl3YFyzZEBw= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:cc:subject:date:message-id:in-reply-to :references; s=default; bh=eaeJ49lw/AiCj55lffGBYsQ70g0=; b=PZmcC qQIzXDu5KcFIQbln0Cu48HqZQa/soBTP0TeqPlg2QrrZVWyeu1ginqYlDMSPTA4J EROZYFGe5CsU1xhl4tjaaanRKJBn6L+J6M0NLVTN/EWF+B4A/m85jSsm4hClleJB BPFA578dMwKk7PQBd/oQnR4aUVdNsfn2t6nQnU= Received: (qmail 59248 invoked by alias); 25 Apr 2018 16:04:50 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 59142 invoked by uid 89); 25 Apr 2018 16:04:49 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-25.8 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, KAM_LAZY_DOMAIN_SECURITY, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 spammy=dfd X-HELO: mout.kundenserver.de From: Arnd Bergmann To: y2038@lists.linaro.org, linux-kernel@vger.kernel.org Cc: Arnd Bergmann , linux-api@vger.kernel.org, linux-arch@vger.kernel.org, libc-alpha@sourceware.org, tglx@linutronix.de, netdev@vger.kernel.org, deepa.kernel@gmail.com, viro@zeniv.linux.org.uk, albert.aribaud@3adev.fr, Peter Zijlstra , Darren Hart , "Eric W. Biederman" , Dominik Brodowski Subject: [PATCH 06/17] y2038: Change sys_utimensat() to use __kernel_timespec Date: Wed, 25 Apr 2018 18:03:00 +0200 Message-Id: <20180425160311.2718314-7-arnd@arndb.de> In-Reply-To: <20180425160311.2718314-1-arnd@arndb.de> References: <20180425160311.2718314-1-arnd@arndb.de> X-UI-Out-Filterresults: notjunk:1; V01:K0:WRcSPk41H4s=:aRIUhRdxQKZsyYruZo61Qz yha/TdFPz0PVepEvJd5TQhRAevY+c1N01Ji2yOk0+yUssbPv+G2rebscubmHDcpAKdo7LRR3x uH6JQMzocysQcTFw2atL4Gd4ocljp6MZg592pUf26ByCH+bllIef8M9hoSS6SamXwVnob9TSJ Vay/2cVtNXwNRzXDlneBzcKep9yGP0b42dBL6cXs7NT4TqiLHaHfuOdjnt2t5TqdmviK/78P2 Pm2cJMVu5bHS04h75RXWUBR6uOVLXK8fO1oyX0kN39l4V9yEz4cASHxoJS7fiPVlJANjUf9hd L/H1fIHgBeJMhzGSf9v2NvfAH7lF8h9/u8zNY84Kbsr4K6K1qBlfrVWPANmGEH5EM/QApjxMx RMamj4XL7ycsgZ9iUr0hz9eQKgzhuLBbWFqX+9wobIEqJab0r6GvP97dKHqsJE+UpDJBK5mA3 O3oH2g76bWmezZOIpUUTsgGY85bb1NBceok9TNHBKwrCa/pWggR8RY1DCOMb7qNHTv8nYaNhS MSPGZxUnyJeKhQ2StHBSZlrdORy4F748954B9MwpLsa/1bYzyA2bt5+Ydr3DMMG8v60vh5BTn go9gZdX8C9f1VIx4eSZV59CffAkpz/QtMtHeROvw52w7yqP6jiyGRJuoSyM1NgaYr4XnxlfUd vnBBxA4zxIsLQmB4O5yPFKVkmFZsWU+pgN4PH/cpvUa+/w9/E1anufQirX3rlQnL38Ls= 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.9.0 diff --git a/fs/utimes.c b/fs/utimes.c index 69d4b6ba1bfb..ca2c02a7985c 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 b92cb79d38c3..3d7dd665cdeb 100644 --- a/include/linux/syscalls.h +++ b/include/linux/syscalls.h @@ -500,7 +500,8 @@ asmlinkage long sys_timerfd_gettime(int ufd, struct itimerspec __user *otmr); /* 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);