1 #ifndef __LINUX_USERMODE_DRIVER_H__
2 #define __LINUX_USERMODE_DRIVER_H__
3 
4 #include <linux/umh.h>
5 
6 #ifdef CONFIG_BPFILTER
7 void __exit_umh(struct task_struct *tsk);
8 
9 static inline void exit_umh(struct task_struct *tsk)
10 {
11 	if (unlikely(tsk->flags & PF_UMH))
12 		__exit_umh(tsk);
13 }
14 #else
15 static inline void exit_umh(struct task_struct *tsk)
16 {
17 }
18 #endif
19 
20 struct umd_info {
21 	const char *cmdline;
22 	struct file *pipe_to_umh;
23 	struct file *pipe_from_umh;
24 	struct list_head list;
25 	void (*cleanup)(struct umd_info *info);
26 	pid_t pid;
27 };
28 int fork_usermode_blob(void *data, size_t len, struct umd_info *info);
29 
30 #endif /* __LINUX_USERMODE_DRIVER_H__ */
31