From: Andrew Pinski <pinskia@gmail.com>
To: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org
To: Alexander Viro <viro@zeniv.linux.org.uk>
To: linux-fsdevel@vger.kernel.org
To: linux-kernel@vger.kernel.org
Cc: Andrew Pinski <apinski@cavium.com>,
Alexander Viro <viro@zeniv.linux.org.uk>,
linux-fsdevel@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 [thread overview]
Message-ID: <1378762380-13152-3-git-send-email-apinski@cavium.com> (raw)
In-Reply-To: <1378762380-13152-1-git-send-email-apinski@cavium.com>
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 <apinski@cavium.com>
---
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;
--
1.7.2.5
next prev parent reply other threads:[~2013-09-09 21:33 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-09 21:32 [PATCH 1/5] ARM64: Split out CONFIG_ARM64_AARCH32 from CONFIG_COMPAT. Signed-off-by: Andrew Pinski <apinski@cavium.com> Andrew Pinski
2013-09-09 21:32 ` [PATCH 2/5] ARM64: Move some signal code to a seperate file to be reused by ILP32 Andrew Pinski
2013-09-09 21:38 ` Andrew Pinski
2013-09-09 22:40 ` David Daney
2013-09-11 10:59 ` Catalin Marinas
2013-09-09 21:32 ` Andrew Pinski [this message]
2013-09-11 11:09 ` [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 Catalin Marinas
2013-09-11 21:00 ` Andrew Pinski
2013-09-13 9:53 ` Catalin Marinas
2013-09-09 21:32 ` [PATCH 4/5] ARM64: Move copy_siginfo_to_user32 and copy_siginfo_from_user32 to signal.c to be able to use from non AARCH32 code Andrew Pinski
2013-09-09 21:32 ` [PATCH 5/5] ARM64: Add support for ILP32 ABI Andrew Pinski
2013-09-11 14:32 ` Catalin Marinas
2013-09-13 6:18 ` Andrew Pinski
2013-09-13 9:47 ` Will Deacon
2013-09-13 9:57 ` Catalin Marinas
2013-09-13 10:04 ` Will Deacon
2013-09-13 12:13 ` Catalin Marinas
2013-09-13 12:12 ` Catalin Marinas
2014-04-21 22:06 ` Andrew Pinski
2014-04-15 21:43 ` Andrew Pinski
2013-09-11 10:55 ` [PATCH 1/5] ARM64: Split out CONFIG_ARM64_AARCH32 from CONFIG_COMPAT. Signed-off-by: Andrew Pinski <apinski@cavium.com> Catalin Marinas
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1378762380-13152-3-git-send-email-apinski@cavium.com \
--to=pinskia@gmail.com \
--cc=apinski@cavium.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=viro@zeniv.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®