From patchwork Mon Sep 9 21:32:57 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Pinski X-Patchwork-Id: 2863121 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id C90D6BF43F for ; Mon, 9 Sep 2013 21:33:42 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E977D20414 for ; Mon, 9 Sep 2013 21:33:41 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id DF73F203F4 for ; Mon, 9 Sep 2013 21:33:40 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1VJ95V-00005J-KL; Mon, 09 Sep 2013 21:33:37 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1VJ95S-0002JO-VZ; Mon, 09 Sep 2013 21:33:34 +0000 Received: from mail-oa0-x22d.google.com ([2607:f8b0:4003:c02::22d]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1VJ95P-0002I8-6B for linux-arm-kernel@lists.infradead.org; Mon, 09 Sep 2013 21:33:32 +0000 Received: by mail-oa0-f45.google.com with SMTP id m6so6942922oag.4 for ; Mon, 09 Sep 2013 14:33:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references:to:to:to; bh=wR8i5X+15IQTj4v4P4acEYnOrJkaVkRTm6KID4tnubU=; b=soIrhfEFzjw+OhriqOnQIdZFVGaitzmfjKQKLu9rGXk6bARzJVxyt0azLlo4jzM+eo YL17milcJls6XpqHpc+izoJalon6VCiHtTxbeXI0gMRhlUh1Eq3IBRzCnUKBBgWZqRk9 /aguPbK5Z4AsMpse3ODxsFVzaKsWH6z4JTV0aQZoFgz646KuNdAjLunz4a3quoWlMTPw 0eD2u6ZvDLR0Wy2IEbViwRRAk5p750cHeJF7hsrPgnTk37tU15FR6gyd5Yao1jjO1WyR Ktmceww/KUFa/WORLebDcRAG+qLks4L8CZC31trSPBV6XP8i9dHCMSURrnYjmVqNVx0d dDJQ== X-Received: by 10.60.70.134 with SMTP id m6mr12608457oeu.14.1378762389291; Mon, 09 Sep 2013 14:33:09 -0700 (PDT) Received: from localhost.localdomain (64.2.3.195.ptr.us.xo.net. [64.2.3.195]) by mx.google.com with ESMTPSA id hl3sm15033303obb.0.1969.12.31.16.00.00 (version=TLSv1 cipher=RC4-SHA bits=128/128); Mon, 09 Sep 2013 14:33:08 -0700 (PDT) Received: from localhost.localdomain (apinskidesktop [127.0.0.1]) by localhost.localdomain (8.14.3/8.14.3/Debian-9.4) with ESMTP id r89LX68P013200 (version=TLSv1/SSLv3 cipher=DHE-DSS-AES256-SHA bits=256 verify=NO); Mon, 9 Sep 2013 14:33:06 -0700 Received: (from apinski@localhost) by localhost.localdomain (8.14.3/8.14.3/Submit) id r89LX6GY013199; Mon, 9 Sep 2013 14:33:06 -0700 From: Andrew Pinski To: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 3/5] FS: Export poll_select_copy_remaining and rename poll_select_copy_remaining in compat.c so it does not pick the wrong copy. Date: Mon, 9 Sep 2013 14:32:57 -0700 Message-Id: <1378762380-13152-3-git-send-email-apinski@cavium.com> X-Mailer: git-send-email 1.7.2.5 In-Reply-To: <1378762380-13152-1-git-send-email-apinski@cavium.com> References: <1378762380-13152-1-git-send-email-apinski@cavium.com> To: Alexander Viro To: linux-fsdevel@vger.kernel.org To: linux-kernel@vger.kernel.org X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130909_173331_274023_CE882327 X-CRM114-Status: GOOD ( 15.71 ) X-Spam-Score: -2.0 (--) Cc: linux-fsdevel@vger.kernel.org, Andrew Pinski , Alexander Viro X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-5.0 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Hi, The ILP32 ABI in ARM64 uses a slightly different pselect from either the compat or even the native LP64 ABI. We would want to reuse some of the code path that are used as the size of the timespec is the same, so this patch exports poll_select_copy_remaining from fs/select.c and renames the copy in fs/compat.c to make sure that it is not being used. Signed-off-by: Andrew Pinski --- fs/compat.c | 8 ++++---- fs/select.c | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/fs/compat.c b/fs/compat.c index 6af20de..298e3e1 100644 --- a/fs/compat.c +++ b/fs/compat.c @@ -1088,7 +1088,7 @@ COMPAT_SYSCALL_DEFINE4(openat, int, dfd, const char __user *, filename, int, fla #define __COMPAT_NFDBITS (8 * sizeof(compat_ulong_t)) -static int poll_select_copy_remaining(struct timespec *end_time, void __user *p, +static int compat_poll_select_copy_remaining(struct timespec *end_time, void __user *p, int timeval, int ret) { struct timespec ts; @@ -1307,7 +1307,7 @@ asmlinkage long compat_sys_select(int n, compat_ulong_t __user *inp, } ret = compat_core_sys_select(n, inp, outp, exp, to); - ret = poll_select_copy_remaining(&end_time, tvp, 1, ret); + ret = compat_poll_select_copy_remaining(&end_time, tvp, 1, ret); return ret; } @@ -1362,7 +1362,7 @@ static long do_compat_pselect(int n, compat_ulong_t __user *inp, } ret = compat_core_sys_select(n, inp, outp, exp, to); - ret = poll_select_copy_remaining(&end_time, tsp, 0, ret); + ret = compat_poll_select_copy_remaining(&end_time, tsp, 0, ret); if (ret == -ERESTARTNOHAND) { /* @@ -1448,7 +1448,7 @@ asmlinkage long compat_sys_ppoll(struct pollfd __user *ufds, } else if (sigmask) sigprocmask(SIG_SETMASK, &sigsaved, NULL); - ret = poll_select_copy_remaining(&end_time, tsp, 0, ret); + ret = compat_poll_select_copy_remaining(&end_time, tsp, 0, ret); return ret; } diff --git a/fs/select.c b/fs/select.c index 35d4adc7..aef2c10 100644 --- a/fs/select.c +++ b/fs/select.c @@ -287,8 +287,8 @@ int poll_select_set_timeout(struct timespec *to, long sec, long nsec) return 0; } -static int poll_select_copy_remaining(struct timespec *end_time, void __user *p, - int timeval, int ret) +int poll_select_copy_remaining(struct timespec *end_time, void __user *p, + int timeval, int ret) { struct timespec rts; struct timeval rtv;