From patchwork Wed Apr 25 16:03:06 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 134354 Delivered-To: patch@linaro.org Received: by 10.46.151.6 with SMTP id r6csp1051130lji; Wed, 25 Apr 2018 09:05:23 -0700 (PDT) X-Google-Smtp-Source: AIpwx48a+gaMI6snHWGfCxdrgvdEE//baE/sLGNf7Y6RYQKQNLK1oNtZRK954O+QVGx2pK4fQ4Dy X-Received: by 10.167.128.217 with SMTP id a25mr28496126pfn.132.1524672322906; 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=rNLB1Cdjv3UANKM0OdlbR/Z/bYV0hKDO6xfd34lRSO540aeTSi/eUdVshGsR5EsoHP 6ahETb9/wjl0arGZY8xRUgrPwJlA7kYtHw4P1Jopk+mVF7Wn8LgJWfbjoRBX4+cneXa7 Ts25UWAHEE2Hpz5L42zOtmWqg0v5okMyb3LEbSQS1L5WD8Zd6nyWRX6mUwzUxkPg/cdh 7Yq7+o3bQ+HHQaWPwIY1xVNtHAwJcTJM6NxgXO0mJ4tAruNz7Z6dfSJJEjiYmtp/zoCU dlt8zDdYThcgmeSaIU6DLJyA7ypl0UG3vCdeQUhub8qca9+c6PIEIhb50tU8iP4AWowi dx8w== 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=eUDuP3Z0NHpSwhrI+s14mFXMp/N2EUiYpkgaIHzCvzg=; b=fceB9GFprnM9cxeqYgRB/T5sBlWgS0hSSdRPm6bLpMCzTQQFZ1k1VBg/dV+AQUst8Z L2YJSM3W9uMdjJWkSHsHheD1/AU1YBleFDr4jMbQfnlmUaCaIV+wvAZPgwQTxvsw7sMh ZxjvHtBn37FIrHoUQSk1L7+TQeUnMWstMgoq49dMFuQI9kMI2BJpyAIAcsAzGyuaO/fD W/Rn8jNLGqPmsNoqNf0Ywc+HRqBkeWntWGG+kVPRAcH59nFsFX1MfJoyvH2k++MBgqmc WJghND8dBDEzWp+wioAXLWvONLy2WylLq8Dp0aVzWQIQfJnjTwUX9bQZQkEE4wWiuzoM erRg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of netdev-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=netdev-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.22; Wed, 25 Apr 2018 09:05:22 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of netdev-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 netdev-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=netdev-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755589AbeDYQFS (ORCPT + 9 others); Wed, 25 Apr 2018 12:05:18 -0400 Received: from mout.kundenserver.de ([212.227.17.13]:52585 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755253AbeDYQFO (ORCPT ); Wed, 25 Apr 2018 12:05:14 -0400 Received: from wuerfel.lan ([95.208.111.237]) by mrelayeu.kundenserver.de (mreue101 [212.227.15.145]) with ESMTPA (Nemesis) id 0M2551-1eNXBy3JVL-00tynP; 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 12/17] y2038: aio: Prepare sys_io_getevents for __kernel_timespec Date: Wed, 25 Apr 2018 18:03:06 +0200 Message-Id: <20180425160311.2718314-13-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:4GGlfMGZlOC11z6Bn22ipNGC4iDwHQ1nTxVWJPLi5JaLxEbhSKq KOB7JEmzwnPUCLpov7GluLo1Pt7CTxcZdqYPLRBmBgPV1kQSkxeMRL1+hc/eBqN4bDG6ocF eO1eomsjj9jAwluqw7YFkb4vCIt9efD1q/AcCGgWpn4l5ro8D2TIggbYHOpMDc0JiX2V5dF j8jBy0yb9bddnBJPQfMnw== X-UI-Out-Filterresults: notjunk:1; V01:K0:yEzicpM9y5s=:GpoynPZ0JPhbV/v2tedIep RiZj6qO2l+Et5w68oHl5mFXevFj9/TjsCD7dmdq/rKHrb1HtR5/0DjIVh+OaJfZZ2Bxg2r0r5 1zoiObLi9Ihs9Hdt6crf8uu3J3Sdvbdi3CJgfFAXkMZ3ANZf2ZkmpSL3J17cMyCJs5hhzPO42 dW0ZlYzgZ6ScUPYBh028Y0DOwyy/heMkeOOmZBciQowcgWWRP/QDUTJszPPIzeZrllsTcu+um AqBtduKuUtO4OhkdjeaYBuQPe1vMXrcdbOVDiTwiIWH0bJV/ISGG3eRhJY4F1XTe1Rz0+eA95 UngF8AQvtdMihJwto5lwH8Acbykl8/KzM3hns5QYwTmDkfTTjyCVuHVm58oDN8BF10/nImNxq yh7BNLZQWJtoj6kUlb+2agKcHp9DbP1H+CBiTv4aoQ5Y185wziuuOiblh70MG03wespO5DCeQ M1eb+1NIZHSYimOiK9imrz7M6cWX7QKX0mkXqoL4NpwmRqCgSBsFPFsB9pO7BOLV11zpvgfEq r6D4CdH4kEZ3+T0Vk2mApvJonmrxHCme3Ld4ghN4lbOrjOopHPavbIasna5/JirWwXp0ZLmFN TGNvAHT/tXUTZep4yLrwG2L533CWDluYCTkERN6BUYMPZWHjh4a2fPWjyEE4YeOIlHIZMgJEc /eC9Mjs5KEwc6BUL63kr3ARnpxXHPBqcxUmyBIcqvZCsTwPA4C+0yZg033UK9oUOWK7s= Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org This is a preparation patch for converting sys_io_getevents to work with 64-bit time_t on 32-bit architectures. The 'timeout' 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 --- fs/aio.c | 4 ++-- include/linux/syscalls.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) -- 2.9.0 diff --git a/fs/aio.c b/fs/aio.c index 88d7927ffbc6..64fea8c27b16 100644 --- a/fs/aio.c +++ b/fs/aio.c @@ -1858,7 +1858,7 @@ SYSCALL_DEFINE5(io_getevents, aio_context_t, ctx_id, long, min_nr, long, nr, struct io_event __user *, events, - struct timespec __user *, timeout) + struct __kernel_timespec __user *, timeout) { struct timespec64 ts; @@ -1870,7 +1870,7 @@ SYSCALL_DEFINE5(io_getevents, aio_context_t, ctx_id, return do_io_getevents(ctx_id, min_nr, nr, events, timeout ? &ts : NULL); } -#ifdef CONFIG_COMPAT +#ifdef CONFIG_COMPAT_32BIT_TIME COMPAT_SYSCALL_DEFINE5(io_getevents, compat_aio_context_t, ctx_id, compat_long_t, min_nr, compat_long_t, nr, diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h index 2619678359ee..ffd8674e9df7 100644 --- a/include/linux/syscalls.h +++ b/include/linux/syscalls.h @@ -289,7 +289,7 @@ asmlinkage long sys_io_getevents(aio_context_t ctx_id, long min_nr, long nr, struct io_event __user *events, - struct timespec __user *timeout); + struct __kernel_timespec __user *timeout); /* fs/xattr.c */ asmlinkage long sys_setxattr(const char __user *path, const char __user *name,