From patchwork Mon Jul 16 16:10:57 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 142057 Delivered-To: patch@linaro.org Received: by 2002:a2e:9754:0:0:0:0:0 with SMTP id f20-v6csp2604729ljj; Mon, 16 Jul 2018 09:12:41 -0700 (PDT) X-Google-Smtp-Source: AAOMgpc9Vh2XdAGGsUxj1j29AI7xp3PWzqriVKAiWh8m8V2dVZ1E4e0wCLE/rEtFMZUnaJp/2KD7 X-Received: by 2002:a63:40c7:: with SMTP id n190-v6mr16077575pga.116.1531757561416; Mon, 16 Jul 2018 09:12:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531757561; cv=none; d=google.com; s=arc-20160816; b=vsMC8g5u8UW7NknCOYh1oRsIP+rzJ67KTYIKqiyYwRIGZGgprjr12ItW5AFBiRvYvh A8+ytI48rrk4MEbBE27aHC5KnGG0uN4nFE47FvH0ggAj1XNv9kGo6zni9OcvYnrkejT5 urejngWd9U3MeO38Isf9/bN89AnMNkRoCdeXmjJfb+8YZxcnF7TmCdpva6fFaJRstS6O ohyTyj6S/ghG2ViQJxbElpH5/lZqkioMsA+9ySu3Hqii2OPXgYnbzCbEaEjWLG5Ipvvp 7pNXlt98G8VtP1cHDeTwNq13/1NGvPwT+Kth2Brx6f3bEBnDUhFD5YhuIU3qr7epeMu1 vEgg== 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=qxEGeHx+AWUQjYCj+De/habDm3mr+QeBxPP5COM/2Yk=; b=kTEDA/15DaLiRc6rE6sPvUbl6KYCH5MmIXUpj6E8ABvQgA9P9/Ow6O2UAa+M1fj7he LW8jVNmXoDPxSaSc8Xui6oHUJK9IT20ISauJqW+u3xGowL+un40/q8QOvvhzDraWtYVs BmBQRNCRYfwOgL7oCf53dazb980fWRsrKmeCbiXuC8fgfMqmkak3JWie8I69ND/K9WBq 2uBEpvUMj4Rw37/ne/L9UM0z7BiGSk9pZUgL7BJpvHgRPG2trB4WFf7WbQs5cOmMKq+f zeg/Cs0fXR03iEDOuJHjdxmP7xXDOckfsfY8RmyDRtd4GSeoLlzyHzN3TylNjmqtuIyG mStQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b=gNRpVh62; spf=pass (google.com: domain of libc-alpha-return-94327-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) smtp.mailfrom="libc-alpha-return-94327-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 h18-v6si30691438pfn.158.2018.07.16.09.12.41 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 16 Jul 2018 09:12:41 -0700 (PDT) Received-SPF: pass (google.com: domain of libc-alpha-return-94327-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=gNRpVh62; spf=pass (google.com: domain of libc-alpha-return-94327-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) smtp.mailfrom="libc-alpha-return-94327-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=YxXULNulF9NwWu0L8OOvVtDkHswBiCW mQHln7tIyTflgJ11C+w0YTW414hNMJ5qxJ5Id2nEEenPESAoeRs8yNdVSABn8c20 qcvulS9S1ldvIqLyquQq/xdQ3NHsECdzL5/qJePY7hSgPUmatNhyq8H0cRgUa2wk RrhbVlzIanjU= 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=6THWs4Xe5nVYpWxofrGo3OcNDXc=; b=gNRpV h62jUmDXsG7YlHCrjCgyinEWA0dC4g5glvumDgoGbtOaG9Aoc8fur4G7BUBl2J8w b0ErM2C2raXETowMhgJdlLINBAxp5EwtbzCE5Ol0/V+IATeojqhb1rbi+fnFGGqI BiLTx1/LIsXBKLGPVs30imSauqAA/j2wVC34fc= Received: (qmail 22095 invoked by alias); 16 Jul 2018 16:12:06 -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 21913 invoked by uid 89); 16 Jul 2018 16:12:05 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-25.9 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= 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 11/17] y2038: Prepare sched_rr_get_interval for __kernel_timespec Date: Mon, 16 Jul 2018 18:10:57 +0200 Message-Id: <20180716161103.16239-12-arnd@arndb.de> In-Reply-To: <20180716161103.16239-1-arnd@arndb.de> References: <20180716161103.16239-1-arnd@arndb.de> 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 fc98024d3b5e..1a22bb4285bf 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 5d12eab09429..2deb11269fcb 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c @@ -5265,7 +5265,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); @@ -5276,7 +5276,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)