From patchwork Wed Apr 25 16:03:05 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 134353 Delivered-To: patch@linaro.org Received: by 10.46.151.6 with SMTP id r6csp1051124lji; Wed, 25 Apr 2018 09:05:22 -0700 (PDT) X-Google-Smtp-Source: AIpwx48H5nz0gqwkrj05kv2KERIVM67yTqaqyvz6qJKYsBqBR/lvBYaDDTwKcKc838p+3iNoFnTJ X-Received: by 10.99.8.135 with SMTP id 129mr18509770pgi.17.1524672322555; Wed, 25 Apr 2018 09:05:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524672322; cv=none; d=google.com; s=arc-20160816; b=XV1e7DuJciyHsUVjTnnvXALzdOpIOgseXz0mmwtT8ChzJjcUVNDuheGGE+eX1e3Y+t ay83tEvAjtR2d16Puk1jOieEl1UnpzVfhfi76X0Lj1OC9kuFRsrBK8c7SvBKfDDaYEip +Mn4fK2kgD0cfk/Ioa2iY6+HyxbzNclxMVP9yBsyCBitw9pJZZUEVOOwSK8r95S5cwo1 8SuFSDsZuOdtsKuGar1f06BtVP4PpR/XBo08IudUCt4Oxkd5Owq3wGe290BOnb559AlN Ms9OpWfp9+SsOJt8LDzQnqU3EnPRjPWre8ZMJfaSAyiUNNjx5r6cAdlpudZAU7hq4Sh+ ae+A== 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=Wf44AQHoyx8V7CIpg2TofW7ulCpFq0SarNN3ewuRec0=; b=wjKjrrBiKGJNp6oCGls0ka0aDIwp4/RWYy07IrDCXKde4EoEIe9L99YyOMAs2ClRF8 DfNbmJ+L+a1GgpagWIupkdyajANgyp14UxKdgfWVwWRMKEn6WbVyIXuHNtC9QhNYJAhP TgbW6K1PzFE1WiCOLHqukYm39QmEtU/t52vMoH1eyhaM8LxeUQ0nYFK8hpTk+aQ4o0Qr yn+vb1ZTodP8LLbJvZjfbJh2vlOHlMqPd/21pQDX9DUE3ewjiwvE+6TcQRwWycU8dpXL D44KRDRINI0dcaNMSCnqujBFo5sGTqQh08WiJ+PvXITkFiWtvGS/5cE+vy4q+lJQzLHE Vp6A== 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 g14-v6si10617873plj.146.2018.04.25.09.05.17; Wed, 25 Apr 2018 09:05:22 -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 S1755872AbeDYQFF (ORCPT + 29 others); Wed, 25 Apr 2018 12:05:05 -0400 Received: from mout.kundenserver.de ([217.72.192.75]:52717 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755253AbeDYQE4 (ORCPT ); Wed, 25 Apr 2018 12:04:56 -0400 Received: from wuerfel.lan ([95.208.111.237]) by mrelayeu.kundenserver.de (mreue101 [212.227.15.145]) with ESMTPA (Nemesis) id 0LuMNz-1eDaVq0d9T-011iYF; Wed, 25 Apr 2018 18:03:37 +0200 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 11/17] y2038: Prepare sched_rr_get_interval for __kernel_timespec Date: Wed, 25 Apr 2018 18:03:05 +0200 Message-Id: <20180425160311.2718314-12-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 In-Reply-To: <20180425160311.2718314-1-arnd@arndb.de> References: <20180425160311.2718314-1-arnd@arndb.de> X-Provags-ID: V03:K1:8jwDeyfmJKkciOyNw0bu2Tt8CtGOBeJN9yCrM2Scbqyw99Pz3kF kmBBkDi+c5gNlWYHPef3tIbeF/0q8IkMlQTvcunkQDNlbnE77ppLbI9WTQDWRQbpDolE3WW zHaHdKzFKNXZiYmpg2PZJytYwxpI0DvwHfuH4HtQXeLsiXbHgFvE9tGT0K8FXUgKH6SDrRt YCMhP1D6ErxbwNroaPXLA== X-UI-Out-Filterresults: notjunk:1; V01:K0:/FaaNQSDfXA=:9RI72P3/fCSIoEz5AehtOp Z0NMYXhTYhud0oBUDxmHd9qNcll4mgXzU48abDtcCQG19gl1v9ecytnu8ODKPuGt4AiGh8TPw s6LrO/81e57P0qTMNRPJxWUWA5Cbe7gPFLRtURoMU+xYria8cwhJN/imNhrl7qfTEER/kBqXl b3OuFRDxgdFaaok/4/IVQ8GiAIdaNGXsdQ2dJqxLuwtlbIr0hW2DpZNbjccwhyJH0BXGkT/yf ZH8dxheDMcN9KQpzZB8XAp083yKyJ8O3OT2O916M+pQTwgZhoBm+hQXRxGbNs0K5G8XnyDCm7 2isfPv9r2Q+jAbS2udojw46o2gc/ZOTEJaSZ1a0OmPkkM+Vp4a0weTkUhCd+0ohtQwhkOunE2 +iFhVYTxw7fzgVRp0MJcMfa2WoHRc2ebZ0hBg3lqJKIGWaBVcK3emr7yxMMUEsAA3PmY9Mp4r z5iP5BRJipbMlBjsb2J4Y2jhcY50C82fn7mOQHkzc+rREZVjJusf490JMvRJHYl0D7B7+lNGH Bp893+YyJbP3R4CngVkrR6gqLoFN3Xc3Ebr7BuPxpv0v7y+zanIcKS9UXoLqAJ59zdx+pZowH bmhxoZy69Y9WTYhaKtfytomJrOlkDFX+7FWRITNsqhkQvGlmtATdkzvROXZMRAFnsn+2QRv7Z GrUmTZ1JB3B5kXSM2EMStBP+8JJpk8vlEBBf3A+sYUulO1rxBb2ObdDNefFunkL5ahYA= 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.9.0 diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h index c3d504dbba9c..2619678359ee 100644 --- a/include/linux/syscalls.h +++ b/include/linux/syscalls.h @@ -601,7 +601,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 5e10aaeebfcc..1e0afc42975b 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c @@ -5272,7 +5272,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); @@ -5283,7 +5283,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 compat_timespec __user *, interval)