From: Tom Herbert <tom@herbertland.com>
To: <davem@davemloft.net>, <netdev@vger.kernel.org>
Subject: [PATCH v2 net-next 2/3] kernel: Make compat bitmap functions externally visible
Date: Tue, 26 May 2015 09:34:08 -0700 [thread overview]
Message-ID: <1432658049-3400132-3-git-send-email-tom@herbertland.com> (raw)
In-Reply-To: <1432658049-3400132-1-git-send-email-tom@herbertland.com>
Export compat_get_bitmap and compat_put_bitmap. Make
compat_get_user_cpu_mask not static, add prototype in compat.h, and
export it.
Signed-off-by: Tom Herbert <tom@herbertland.com>
---
include/linux/compat.h | 2 ++
kernel/compat.c | 7 +++++--
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/include/linux/compat.h b/include/linux/compat.h
index ab25814..b52bc0c 100644
--- a/include/linux/compat.h
+++ b/include/linux/compat.h
@@ -380,6 +380,8 @@ long compat_get_bitmap(unsigned long *mask, const compat_ulong_t __user *umask,
unsigned long bitmap_size);
long compat_put_bitmap(compat_ulong_t __user *umask, unsigned long *mask,
unsigned long bitmap_size);
+int compat_get_user_cpu_mask(compat_ulong_t __user *user_mask_ptr,
+ unsigned len, struct cpumask *new_mask);
int copy_siginfo_from_user32(siginfo_t *to, struct compat_siginfo __user *from);
int copy_siginfo_to_user32(struct compat_siginfo __user *to, const siginfo_t *from);
int get_compat_sigevent(struct sigevent *event,
diff --git a/kernel/compat.c b/kernel/compat.c
index 24f0061..0b74ad9 100644
--- a/kernel/compat.c
+++ b/kernel/compat.c
@@ -599,8 +599,8 @@ COMPAT_SYSCALL_DEFINE5(waitid,
return copy_siginfo_to_user32(uinfo, &info);
}
-static int compat_get_user_cpu_mask(compat_ulong_t __user *user_mask_ptr,
- unsigned len, struct cpumask *new_mask)
+int compat_get_user_cpu_mask(compat_ulong_t __user *user_mask_ptr,
+ unsigned len, struct cpumask *new_mask)
{
unsigned long *k;
@@ -612,6 +612,7 @@ static int compat_get_user_cpu_mask(compat_ulong_t __user *user_mask_ptr,
k = cpumask_bits(new_mask);
return compat_get_bitmap(k, user_mask_ptr, len * 8);
}
+EXPORT_SYMBOL_GPL(compat_get_user_cpu_mask);
COMPAT_SYSCALL_DEFINE3(sched_setaffinity, compat_pid_t, pid,
unsigned int, len,
@@ -927,6 +928,7 @@ long compat_get_bitmap(unsigned long *mask, const compat_ulong_t __user *umask,
return 0;
}
+EXPORT_SYMBOL_GPL(compat_get_bitmap);
long compat_put_bitmap(compat_ulong_t __user *umask, unsigned long *mask,
unsigned long bitmap_size)
@@ -967,6 +969,7 @@ long compat_put_bitmap(compat_ulong_t __user *umask, unsigned long *mask,
return 0;
}
+EXPORT_SYMBOL_GPL(compat_put_bitmap);
void
sigset_from_compat(sigset_t *set, const compat_sigset_t *compat)
--
1.8.1
next prev parent reply other threads:[~2015-05-26 16:34 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-26 16:34 [PATCH v2 net-next 0/3] net: Add incoming CPU mask to sockets Tom Herbert
2015-05-26 16:34 ` [PATCH v2 net-next 1/3] net: Add cache alignment in sock_common for socket lookup fields Tom Herbert
2015-05-26 17:19 ` Eric Dumazet
2015-05-26 17:54 ` Eric Dumazet
2015-05-26 18:02 ` Tom Herbert
2015-05-26 16:34 ` Tom Herbert [this message]
2015-05-26 16:34 ` [PATCH v2 net-next 3/3] net: Add incoming CPU mask to sockets Tom Herbert
2015-05-26 17:18 ` [PATCH v2 net-next 0/3] " Eric Dumazet
2015-05-26 18:00 ` Tom Herbert
2015-05-26 18:19 ` Eric Dumazet
2015-05-26 20:01 ` Tom Herbert
2015-05-26 22:42 ` Eric Dumazet
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=1432658049-3400132-3-git-send-email-tom@herbertland.com \
--to=tom@herbertland.com \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).