hc
2023-12-08 01573e231f18eb2d99162747186f59511f56b64d
kernel/include/linux/bpfilter.h
....@@ -3,13 +3,23 @@
33 #define _LINUX_BPFILTER_H
44
55 #include <uapi/linux/bpfilter.h>
6
+#include <linux/usermode_driver.h>
7
+#include <linux/sockptr.h>
68
79 struct sock;
8
-int bpfilter_ip_set_sockopt(struct sock *sk, int optname, char __user *optval,
10
+int bpfilter_ip_set_sockopt(struct sock *sk, int optname, sockptr_t optval,
911 unsigned int optlen);
1012 int bpfilter_ip_get_sockopt(struct sock *sk, int optname, char __user *optval,
1113 int __user *optlen);
12
-extern int (*bpfilter_process_sockopt)(struct sock *sk, int optname,
13
- char __user *optval,
14
- unsigned int optlen, bool is_set);
14
+void bpfilter_umh_cleanup(struct umd_info *info);
15
+
16
+struct bpfilter_umh_ops {
17
+ struct umd_info info;
18
+ /* since ip_getsockopt() can run in parallel, serialize access to umh */
19
+ struct mutex lock;
20
+ int (*sockopt)(struct sock *sk, int optname, sockptr_t optval,
21
+ unsigned int optlen, bool is_set);
22
+ int (*start)(void);
23
+};
24
+extern struct bpfilter_umh_ops bpfilter_ops;
1525 #endif