From patchwork Mon Jul 16 16:10:52 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 142051 Delivered-To: patch@linaro.org Received: by 2002:a2e:9754:0:0:0:0:0 with SMTP id f20-v6csp2604443ljj; Mon, 16 Jul 2018 09:12:24 -0700 (PDT) X-Google-Smtp-Source: AAOMgpcrxHTx4FjXgdvCgEWiF6wwsJN1/6Bp+7z6PlWp8EOb36W2xEDn96rZHE28WRoQFVxoTETo X-Received: by 2002:a62:5543:: with SMTP id j64-v6mr2425388pfb.188.1531757543919; Mon, 16 Jul 2018 09:12:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531757543; cv=none; d=google.com; s=arc-20160816; b=sfm/sHCSnrT19jtBz1s0C2t5pzlcwdLlZFX+oafH/H4NkYBxGQ3ZKZhdLqrxrURqVi hkIqVNR8ZJAkqagB5PUzL8h5gEp93sfCpuP1BzcIyx6ahSC719S+D17h4Bg0r7sk5JOV XG0m96UqEQxb0AX1zCN7ri18azoCaFcHbiSn1mLWoNfIu70Vcc3i3Ml4yxbmm3WoNqz+ 9BM2/G+U3UdfjNR+T+tbyfLg7qM80z2+ougRjF3qWXQSS/hYMrRfWSLdUoVEGJlHAeKD qS2xldONn5t/Zc/TKWDgTcfWNAnzoxoZYJHCSa4OcvtDIQwA+9x97iF3A4d486iaspDU JkFA== 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=E3B3WelTDoojsEBvno9+IV6zY7CxGv/JQVJE2ATeGj0=; b=k94hGjgr3glqpBRRSmcODOKZz8Dw68QjgKDGyeh5PTXFextJxRMvNjMCVac6OH99SE WATA1607m091lzyXP97Nde3zY9fgYcVkzpoTYi6GMKnMKw5Y15aWJ0L8C7JDFuYb761/ xfDfu5XdtteYsu04qIEdCplPQd4O4J/oVeR3559HHfWJ089p0qOfu4k0ANfjw1GHj5oC I83d8vi7tCMVMVW/hQjZCUWD0Z2k/E1zXj2J/UgfQyBrm68zANK3gPlmyUB4LPAZcElM HtM8DbGEfiiYCKSBYYEiBXYAeAX4/HAQlZG4Nc79qAtNMxpxS+UFtu+P/z9MkpU3YiOu 2tNw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b=lywZqynr; spf=pass (google.com: domain of libc-alpha-return-94325-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) smtp.mailfrom="libc-alpha-return-94325-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 c31-v6si26826127pgl.126.2018.07.16.09.12.23 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 16 Jul 2018 09:12:23 -0700 (PDT) Received-SPF: pass (google.com: domain of libc-alpha-return-94325-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=lywZqynr; spf=pass (google.com: domain of libc-alpha-return-94325-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) smtp.mailfrom="libc-alpha-return-94325-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=eehDfIrWJKdv41bsbGxnQd//fh5cns3 lbq8McpLJ3uw0E0KDvw82hDaZ2vofrf+Rf2n3mTjMxfwiyE3LQUwNriRAoYUXJU3 9CfW4vidWmVII/rHt/4cb6rX6g2B9qU8e94AhbQVV7C5xOcljLkb63qzrO+iPO6z bspLDeCpNHG0= 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=X1P7zjIH1aKQrHrgzkXh77Sz0zI=; b=lywZq ynrwVWljFlpYtQdBCZVIvaz/MMGhdCA3z+taYDQjSoK6LoobwVetK67RXiJ1Ysqw MLwecK+k1kz/IlCYiIuBqEFMCYQdJ1O1stPXRO4ec6q9dYY6lIxzY/utVpi0B5dk F+oQvja8pV3yQdIZXMViai3tDhWSjV9UuFc9VI= Received: (qmail 21716 invoked by alias); 16 Jul 2018 16:12:04 -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 21671 invoked by uid 89); 16 Jul 2018 16:12:03 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-25.9 required=5.0 tests=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=H*Ad:U*viro, Hx-spam-relays-external:ESMTPA X-HELO: mout.kundenserver.de From: Arnd Bergmann To: tglx@linutronix.de Cc: y2038@lists.linaro.org, hch@infradead.org, linux-api@vger.kernel.org, linux-arch@vger.kernel.org, libc-alpha@sourceware.org, albert.aribaud@3adev.fr, netdev@vger.kernel.org, viro@zeniv.linux.org.uk, peterz@infradead.org, dvhart@infradead.org, ebiederm@xmission.com, linux@dominikbrodowski.net, Arnd Bergmann Subject: [PATCH v2 06/17] y2038: Change sys_utimensat() to use __kernel_timespec Date: Mon, 16 Jul 2018 18:10:52 +0200 Message-Id: <20180716161103.16239-7-arnd@arndb.de> In-Reply-To: <20180716161103.16239-1-arnd@arndb.de> References: <20180716161103.16239-1-arnd@arndb.de> 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 615cc9b374cf..45c04d75eb95 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);