From patchwork Mon Aug 27 19:45:29 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 145197 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp332378ljw; Mon, 27 Aug 2018 12:45:52 -0700 (PDT) X-Google-Smtp-Source: ANB0Vda0vP75chbQEgZ48WPOJRu+oQ6NowoLZEey9zVufkNzO3y+avfoTFde889ZvkD7rgETop00 X-Received: by 2002:a17:902:d917:: with SMTP id c23-v6mr14276750plz.65.1535399152383; Mon, 27 Aug 2018 12:45:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535399152; cv=none; d=google.com; s=arc-20160816; b=QsO9MgFOHxWvJeG/FbmEY9CPqcVuCnL8YAYQD0/LJJNb6mHuZZfBxwufVKA952cqli 4rrDPyAwaJgbOVBHiaHEx7mWY/Vr2jSLUbBT/fit8+7i3vkilC1YwAh1O8ZopoMdqBK7 YZkuBLM6bi+fPPziDEsBoHtT3+5B6Nuh64QDmRAlIkM8eLeohP5jpwE6PA37ld7c+Ngl YKau+9tmjf4Bu7ZxHdHQZrWVO4OTDTVZntOsR0/jxZ7OSe896dg6w9R3d2uRtFfr15o6 sNO+ZEynP6XvtSZAQEAddecsyxhgEYrUVjjpOUS4by+2B0R7T+0nQqcpUE5ue8m3tdjB nC1Q== 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=lHiOM5deHGRikSt1B43ZuSiNxUvYUBN455dKP1Onpt8=; b=OiFk4mWQhwEMtbE/gSBLXWuS+XXQdY2r83ARNvRpXXUiqWcy8N/3T5vKtLdenFx5Wm 0TSRyRTHIn/TLeeElWmDfYS80OJ+9bla5jXUz17vhjTuGq6Mux7vF2UT4HTVqIDiJlWN 3qbZAKOJTnrUzM9oeztQcA+Czu4SNgyBrcA8W4tGqOV0IP6GZ5CSrCWT5UOnk+5nvoEn g7Z3Jqo/6V34DLyrKNZpaCQ/y8XjhGoVvg641wcyizt4mPSE/nDdQpT5K/FCbFk8jUJD RFeMCBvJM/XHAI48aUrvLH/ji7qrr9zulQrUtQ0UdXP+PQVfJBDEyTuC5zncatvwQ19c CrFg== 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 bh12-v6si80277plb.425.2018.08.27.12.45.52; Mon, 27 Aug 2018 12:45:52 -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 S1727651AbeH0Xdt (ORCPT + 32 others); Mon, 27 Aug 2018 19:33:49 -0400 Received: from mout.kundenserver.de ([217.72.192.75]:35469 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727620AbeH0Xdt (ORCPT ); Mon, 27 Aug 2018 19:33:49 -0400 Received: from wuerfel.lan ([109.193.40.16]) by mrelayeu.kundenserver.de (mreue101 [212.227.15.145]) with ESMTPA (Nemesis) id 0M1nxq-1ffbh80KlO-00toEj; Mon, 27 Aug 2018 21:45:40 +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 12/14] y2038: sched: Change sched_rr_get_interval to use __kernel_timespec Date: Mon, 27 Aug 2018 21:45:29 +0200 Message-Id: <20180827194531.3796559-13-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:A/PvtBsBqqPBHphqonIzFoco4UcdjHocqMllKaqT0ZBSX1pyyuv CI9k4lkIApv0KhEoBjNLqN1I9Q6Y9E/9wuJ2zNhpIDhNW4AkM+A1NnEEXU8x7Kj0ddMuHio xj5PFbUKX/1Cokxjq88roCCZe4ZJmhmekFCYsj1oqPvESVUTpwtSrMTU2YyPFDt9HUln1zO a0UyZy78YOCAc6msBEXmQ== X-UI-Out-Filterresults: notjunk:1; V01:K0:xKLUZx0V7qM=:ZJT2IOPxulQ8zzcIdMU1bF iMjUInVfAjhSZc7+pFYiB05dQmC7RiKjw3/TxrrSHWg8LvBBF+qiG22FhCStK7w9WYBewxh3O Ezu2nhmHEXdUPYF+4PVhhZZ70xqHlSkbp1iMMXopl7fNfIusg1Jr6enjY3XEfsLVNBw+Cd/DO TrDHWRn0rA0GGZ8oU5ayVF4Sck45RkmQ2mTk7ToqjuoZV2RphbaIohASG8Jz2zg6iexBXzq11 /e5bKisCU2+WeQAAecrPKOZzkBLwf0y846CyRSZ25QBkZG8pPXLXebhS2zccyz3tr+OOzDQzp InlHGQ8Zut9pPafpiUJSig4NXT3eEd5nMZNj9f4MplqdCG4AaSf8GIBQNoINDacztEPL5Dks6 NTZ+cjZBcAarQGQHFCbDpqt8eRGR5o9+BLp1ilgsxYcO/qOwCOuWM0B23IsPr03RAJcZsXuou m0ijpj4/RfGAXXq9+wM1UjLlEY4u72GGVoMpV/VKhteUs2KYZDiOHEtQnNl2UmjWDWRhmWnEL y1PRqVDk2DLdFAX9RqmaItTrVTF9LeTmsKuh+SGweY9r/WOiNRUVEYtovY6K80Uf1v4yRGxzG UA/Q8zowGzEliVY8f7eLvFfLPwz0JkYCwIp2p4xqjHwgFk22Ofp0+rRDanzRK2aD/68o9imXT uVmjww+R6D1nuDTwvtCIhFpDKAEZAMSS0y1ZE8QTC/O9hFpaftYoyYqd1V5XtdD9/hcA= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This is a preparation patch for converting sys_sched_rr_get_interval to work with 64-bit time_t on 32-bit architectures. The 'interval' argument is changed to struct __kernel_timespec, which will be redefined using 64-bit time_t in the future. The compat version of the system call in turn is enabled for compilation with CONFIG_COMPAT_32BIT_TIME so the individual 32-bit architectures can share the handling of the traditional argument with 64-bit architectures providing it for their compat mode. Signed-off-by: Arnd Bergmann --- include/linux/syscalls.h | 2 +- kernel/sched/core.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) -- 2.18.0 diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h index 95e795fb0593..5642016a312d 100644 --- a/include/linux/syscalls.h +++ b/include/linux/syscalls.h @@ -614,7 +614,7 @@ asmlinkage long sys_sched_yield(void); asmlinkage long sys_sched_get_priority_max(int policy); asmlinkage long sys_sched_get_priority_min(int policy); asmlinkage long sys_sched_rr_get_interval(pid_t pid, - struct timespec __user *interval); + struct __kernel_timespec __user *interval); /* kernel/signal.c */ asmlinkage long sys_restart_syscall(void); diff --git a/kernel/sched/core.c b/kernel/sched/core.c index 8287b75ed961..39af2bec2b39 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c @@ -5243,7 +5243,7 @@ static int sched_rr_get_interval(pid_t pid, struct timespec64 *t) * an error code. */ SYSCALL_DEFINE2(sched_rr_get_interval, pid_t, pid, - struct timespec __user *, interval) + struct __kernel_timespec __user *, interval) { struct timespec64 t; int retval = sched_rr_get_interval(pid, &t); @@ -5254,7 +5254,7 @@ SYSCALL_DEFINE2(sched_rr_get_interval, pid_t, pid, return retval; } -#ifdef CONFIG_COMPAT +#ifdef CONFIG_COMPAT_32BIT_TIME COMPAT_SYSCALL_DEFINE2(sched_rr_get_interval, compat_pid_t, pid, struct old_timespec32 __user *, interval)