diff options
author | Christoph Hellwig <hch@lst.de> | 2020-07-23 09:08:55 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-07-25 01:41:54 +0300 |
commit | b03afaa82ece13b2a008f0e3a7127bead578e3e6 (patch) | |
tree | d34d7c6c990946d126e74053cdd8d37291dbe48e /include/linux | |
parent | c2f12630c60ff33a9cafd221646053fc10ec59b6 (diff) | |
download | linux-b03afaa82ece13b2a008f0e3a7127bead578e3e6.tar.xz |
bpfilter: switch bpfilter_ip_set_sockopt to sockptr_t
This is mostly to prepare for cleaning up the callers, as bpfilter by
design can't handle kernel pointers.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/bpfilter.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/include/linux/bpfilter.h b/include/linux/bpfilter.h index 9b114c718a76..2ae3c8e1d83c 100644 --- a/include/linux/bpfilter.h +++ b/include/linux/bpfilter.h @@ -4,9 +4,10 @@ #include <uapi/linux/bpfilter.h> #include <linux/usermode_driver.h> +#include <linux/sockptr.h> struct sock; -int bpfilter_ip_set_sockopt(struct sock *sk, int optname, char __user *optval, +int bpfilter_ip_set_sockopt(struct sock *sk, int optname, sockptr_t optval, unsigned int optlen); int bpfilter_ip_get_sockopt(struct sock *sk, int optname, char __user *optval, int __user *optlen); @@ -16,8 +17,7 @@ struct bpfilter_umh_ops { struct umd_info info; /* since ip_getsockopt() can run in parallel, serialize access to umh */ struct mutex lock; - int (*sockopt)(struct sock *sk, int optname, - char __user *optval, + int (*sockopt)(struct sock *sk, int optname, sockptr_t optval, unsigned int optlen, bool is_set); int (*start)(void); }; |