From patchwork Thu Apr 19 14:37:34 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 133811 Delivered-To: patch@linaro.org Received: by 10.46.66.142 with SMTP id h14csp714866ljf; Thu, 19 Apr 2018 07:39:27 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+NUkLrBlYTfhjYGUeAK7unAJotXUTIi0L8f/5TMGVX8XMTEZIEXUhAdLww5CT6cN22IeX2 X-Received: by 2002:a17:902:362:: with SMTP id 89-v6mr6556095pld.270.1524148767416; Thu, 19 Apr 2018 07:39:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524148767; cv=none; d=google.com; s=arc-20160816; b=MyxYLZ9c38weByiwvwoSzFev26Dzc0UbiHdk/ca7RXZnrHQhelC6WBEY5RO9vL5ID+ sqquL0Rjsl2uFyE6ryWNTuIRcLnEN4SNyUWQ2qKrzyt7N4AouXEsVTUsNxgF38XWSNaD uj7VryTkPRvpop9UhulGkTKHNJki7s5V4rGb41eh1KthK2eTvbYZkhBePYh6eQFcXmNG Gn59T+p3qxwM99y2DTU1pWa1DSPzzAGZ/ZHeUH88apqS/10FdnR2UZ/ylIwSvXv3762O qhxUG1JL+jckwzm09TcyQf6drKXq1VuMhtAIaBxOGAKupVP6qm02s5cXKV1u1b8yJsoy 6zCg== 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=O5FDEUvv+T9xGV1OaSiciU6iSJkdzsowujXxm6xlkpI=; b=GJo1kKOMMN8AJ4N+n1ZglnxELifYE3nSCuxXbdk4rN7AOS6xNt9dliKvwP8OrDN6sf H+G8ltg3xOgbjMF3nEWqB5dVKuvW4JB98AoVI4WisTTiIEbR+wpz+tlrWaAFryZvHcSY GZ/KJ0DgxhKYu+S4M+/pz1VuVgtbsK12J0WAuYwfei+U+xasqMxTqTu1If78F+Vspr6G kQmk5Y2N6/IHpkUSwdyNBVsMq6z9ZkGSbiZO6L1gCKasbbVeMqrmdTp4A3CD3Oa8Wf9o otJmhKqP/CyQT+2ts3k0LL4mjjG881fMTFySjP9Yjt77rV+R6p2NLRNWZPB1hiWk0B1c gRHw== 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 s1si3252363pfm.62.2018.04.19.07.39.27; Thu, 19 Apr 2018 07:39:27 -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 S1753615AbeDSOjZ (ORCPT + 29 others); Thu, 19 Apr 2018 10:39:25 -0400 Received: from mout.kundenserver.de ([212.227.17.10]:54897 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753570AbeDSOjU (ORCPT ); Thu, 19 Apr 2018 10:39:20 -0400 Received: from wuerfel.lan ([95.208.111.237]) by mrelayeu.kundenserver.de (mreue101 [212.227.15.145]) with ESMTPA (Nemesis) id 0M2dqH-1eJgR81PpF-00sN80; Thu, 19 Apr 2018 16:37:59 +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, deepa.kernel@gmail.com, viro@zeniv.linux.org.uk, ebiederm@xmission.com, albert.aribaud@3adev.fr, linux-s390@vger.kernel.org, schwidefsky@de.ibm.com, x86@kernel.org, catalin.marinas@arm.com, will.deacon@arm.com, linux-mips@linux-mips.org, jhogan@kernel.org, ralf@linux-mips.org, linuxppc-dev@lists.ozlabs.org, sparclinux@vger.kernel.org Subject: [PATCH v3 14/17] y2038: ipc: Use __kernel_timespec Date: Thu, 19 Apr 2018 16:37:34 +0200 Message-Id: <20180419143737.606138-15-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 In-Reply-To: <20180419143737.606138-1-arnd@arndb.de> References: <20180419143737.606138-1-arnd@arndb.de> X-Provags-ID: V03:K1:ZKYAuxGMajmvaIzfwCYhsflzK2XPcYERcA468TieefZU0vLGepf 2Wkz/HafOKlcUAFLzYD6udPmDsM4igRQ/uZeeH4BUCYDLRKQrHXMrNXHy81qCzVtqu8vyib Ej60fgyqLctnHauTwS87L0KUPZ0gsh/r+GKkP4ajkDdAwnGI2bENXQy0ps800t8LhB1TklK +2gYPRu7eB9PsIa0tiEZQ== X-UI-Out-Filterresults: notjunk:1; V01:K0:l+iPWJPC3Ww=:pRP4OdoG+L/xHdLq5sx8nH ZEjmszxrElDS4mrhmDfVuwsWQQIcmXTxMPYYJPBfywlkPTOYDOkBVvUid83ExOG1NpoInac9+ NtnVPiNQdiU7fvJF4Bu/aRCqCJRcPjqPNpFpVQyYxb/UlYSPv7xKcz86uSBGbjUsErUzaAuox ETVykYxFODKrZ/JGrlu7009d58rwCKzqYh/popmsB3odf/J6+JFpGIanjwdMxvkbBX8Dd7rc8 7TiXdK5LhYgp9iKvzwAylR5h8EE5AfQH3V5VBMXdVYN/uW8KpG6ccWvyO+gzs1nlTa40Dv8MO BHUUxDny8CwA+BNw8Ayi+T40Ggj19duYs/p9DE3rakubI5NgETmKB772YZAoogzo6HoIh5jkU rNBbirHafjlRZhzKyik607r2/XaFxVeHqn+D7Ph02hqPZX4EiNAYsDt7B80zrOOJ/q8C0MDbs vZycorTJplY1842oJYoEPJCDfPgPOsMcNiINo0lcmV/IYgnaKIkaDvT/MYcIFd4s3k9fhn0g9 SJSXKjp1om6EvM11S9zOfU1BFbRjCNDaDCfEisWPkQr/cM9oFmnYho3Ug/KCfUstMgnVfAK0P 1xzCQEFOWa5MvXDU2YofbMMUZtGN/MlrXWZaQOWNtzthMgx+rk9FNHPIvzEKNss8QxgufJwuJ cnfKGd632K9MeC8AFcDTKypzd2LavyAtd7ZQP3YyC8D1F7nyEaRrSOMz0enMG1TDWCWuOEgJ7 Wx//PEk5yXaiY/kbl8qxtMqKCS+jk852IQHwWg== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This is a preparatation for changing over __kernel_timespec to 64-bit times, which involves assigning new system call numbers for mq_timedsend(), mq_timedreceive() and semtimedop() for compatibility with future y2038 proof user space. The existing ABIs will remain available through compat code. Signed-off-by: Arnd Bergmann --- include/linux/syscalls.h | 6 +++--- ipc/mqueue.c | 6 +++--- ipc/sem.c | 4 ++-- ipc/util.h | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) -- 2.9.0 diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h index c9a2a2601852..b92cb79d38c3 100644 --- a/include/linux/syscalls.h +++ b/include/linux/syscalls.h @@ -680,8 +680,8 @@ asmlinkage long sys_sysinfo(struct sysinfo __user *info); /* ipc/mqueue.c */ asmlinkage long sys_mq_open(const char __user *name, int oflag, umode_t mode, struct mq_attr __user *attr); asmlinkage long sys_mq_unlink(const char __user *name); -asmlinkage long sys_mq_timedsend(mqd_t mqdes, const char __user *msg_ptr, size_t msg_len, unsigned int msg_prio, const struct timespec __user *abs_timeout); -asmlinkage long sys_mq_timedreceive(mqd_t mqdes, char __user *msg_ptr, size_t msg_len, unsigned int __user *msg_prio, const struct timespec __user *abs_timeout); +asmlinkage long sys_mq_timedsend(mqd_t mqdes, const char __user *msg_ptr, size_t msg_len, unsigned int msg_prio, const struct __kernel_timespec __user *abs_timeout); +asmlinkage long sys_mq_timedreceive(mqd_t mqdes, char __user *msg_ptr, size_t msg_len, unsigned int __user *msg_prio, const struct __kernel_timespec __user *abs_timeout); asmlinkage long sys_mq_notify(mqd_t mqdes, const struct sigevent __user *notification); asmlinkage long sys_mq_getsetattr(mqd_t mqdes, const struct mq_attr __user *mqstat, struct mq_attr __user *omqstat); @@ -698,7 +698,7 @@ asmlinkage long sys_semget(key_t key, int nsems, int semflg); asmlinkage long sys_semctl(int semid, int semnum, int cmd, unsigned long arg); asmlinkage long sys_semtimedop(int semid, struct sembuf __user *sops, unsigned nsops, - const struct timespec __user *timeout); + const struct __kernel_timespec __user *timeout); asmlinkage long sys_semop(int semid, struct sembuf __user *sops, unsigned nsops); diff --git a/ipc/mqueue.c b/ipc/mqueue.c index a808f29d4c5a..9610afcfa2e5 100644 --- a/ipc/mqueue.c +++ b/ipc/mqueue.c @@ -691,7 +691,7 @@ static void __do_notify(struct mqueue_inode_info *info) wake_up(&info->wait_q); } -static int prepare_timeout(const struct timespec __user *u_abs_timeout, +static int prepare_timeout(const struct __kernel_timespec __user *u_abs_timeout, struct timespec64 *ts) { if (get_timespec64(ts, u_abs_timeout)) @@ -1128,7 +1128,7 @@ static int do_mq_timedreceive(mqd_t mqdes, char __user *u_msg_ptr, SYSCALL_DEFINE5(mq_timedsend, mqd_t, mqdes, const char __user *, u_msg_ptr, size_t, msg_len, unsigned int, msg_prio, - const struct timespec __user *, u_abs_timeout) + const struct __kernel_timespec __user *, u_abs_timeout) { struct timespec64 ts, *p = NULL; if (u_abs_timeout) { @@ -1142,7 +1142,7 @@ SYSCALL_DEFINE5(mq_timedsend, mqd_t, mqdes, const char __user *, u_msg_ptr, SYSCALL_DEFINE5(mq_timedreceive, mqd_t, mqdes, char __user *, u_msg_ptr, size_t, msg_len, unsigned int __user *, u_msg_prio, - const struct timespec __user *, u_abs_timeout) + const struct __kernel_timespec __user *, u_abs_timeout) { struct timespec64 ts, *p = NULL; if (u_abs_timeout) { diff --git a/ipc/sem.c b/ipc/sem.c index 8935cd8cf166..b951e25ba2db 100644 --- a/ipc/sem.c +++ b/ipc/sem.c @@ -2176,7 +2176,7 @@ static long do_semtimedop(int semid, struct sembuf __user *tsops, } long ksys_semtimedop(int semid, struct sembuf __user *tsops, - unsigned int nsops, const struct timespec __user *timeout) + unsigned int nsops, const struct __kernel_timespec __user *timeout) { if (timeout) { struct timespec64 ts; @@ -2188,7 +2188,7 @@ long ksys_semtimedop(int semid, struct sembuf __user *tsops, } SYSCALL_DEFINE4(semtimedop, int, semid, struct sembuf __user *, tsops, - unsigned int, nsops, const struct timespec __user *, timeout) + unsigned int, nsops, const struct __kernel_timespec __user *, timeout) { return ksys_semtimedop(semid, tsops, nsops, timeout); } diff --git a/ipc/util.h b/ipc/util.h index acc5159e96d0..975c6de2df9d 100644 --- a/ipc/util.h +++ b/ipc/util.h @@ -251,7 +251,7 @@ static inline int compat_ipc_parse_version(int *cmd) /* for __ARCH_WANT_SYS_IPC */ long ksys_semtimedop(int semid, struct sembuf __user *tsops, unsigned int nsops, - const struct timespec __user *timeout); + const struct __kernel_timespec __user *timeout); long ksys_semget(key_t key, int nsems, int semflg); long ksys_semctl(int semid, int semnum, int cmd, unsigned long arg); long ksys_msgget(key_t key, int msgflg);