This structure is only used for user mode drivers so change the prefix from umh to umd to make that clear. v1: https://lkml.kernel.org/r/87o8p6f0kw.fsf_-_@x220.int.ebiederm.org v2: https://lkml.kernel.org/r/878sg563po.fsf_-_@x220.int.ebiederm.org Link: https://lkml.kernel.org/r/20200702164140.4468-6-ebiederm@xmission.com Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Acked-by: Alexei Starovoitov <ast@kernel.org> Tested-by: Alexei Starovoitov <ast@kernel.org> Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
30 lines
635 B
C
30 lines
635 B
C
#ifndef __LINUX_USERMODE_DRIVER_H__
|
|
#define __LINUX_USERMODE_DRIVER_H__
|
|
|
|
#include <linux/umh.h>
|
|
|
|
#ifdef CONFIG_BPFILTER
|
|
void __exit_umh(struct task_struct *tsk);
|
|
|
|
static inline void exit_umh(struct task_struct *tsk)
|
|
{
|
|
if (unlikely(tsk->flags & PF_UMH))
|
|
__exit_umh(tsk);
|
|
}
|
|
#else
|
|
static inline void exit_umh(struct task_struct *tsk)
|
|
{
|
|
}
|
|
#endif
|
|
|
|
struct umd_info {
|
|
const char *cmdline;
|
|
struct file *pipe_to_umh;
|
|
struct file *pipe_from_umh;
|
|
struct list_head list;
|
|
void (*cleanup)(struct umd_info *info);
|
|
pid_t pid;
|
|
};
|
|
int fork_usermode_blob(void *data, size_t len, struct umd_info *info);
|
|
|
|
#endif /* __LINUX_USERMODE_DRIVER_H__ */
|