linux-zen-desktop/include/linux/syscall_user_dispatch.h

59 lines
1.4 KiB
C
Raw Permalink Normal View History

2023-08-30 17:31:07 +02:00
/* SPDX-License-Identifier: GPL-2.0 */
/*
* Copyright (C) 2020 Collabora Ltd.
*/
#ifndef _SYSCALL_USER_DISPATCH_H
#define _SYSCALL_USER_DISPATCH_H
#include <linux/thread_info.h>
#ifdef CONFIG_GENERIC_ENTRY
struct syscall_user_dispatch {
char __user *selector;
unsigned long offset;
unsigned long len;
bool on_dispatch;
};
int set_syscall_user_dispatch(unsigned long mode, unsigned long offset,
unsigned long len, char __user *selector);
#define clear_syscall_work_syscall_user_dispatch(tsk) \
clear_task_syscall_work(tsk, SYSCALL_USER_DISPATCH)
2023-10-24 12:59:35 +02:00
int syscall_user_dispatch_get_config(struct task_struct *task, unsigned long size,
void __user *data);
int syscall_user_dispatch_set_config(struct task_struct *task, unsigned long size,
void __user *data);
2023-08-30 17:31:07 +02:00
#else
struct syscall_user_dispatch {};
static inline int set_syscall_user_dispatch(unsigned long mode, unsigned long offset,
unsigned long len, char __user *selector)
{
return -EINVAL;
}
static inline void clear_syscall_work_syscall_user_dispatch(struct task_struct *tsk)
{
}
2023-10-24 12:59:35 +02:00
static inline int syscall_user_dispatch_get_config(struct task_struct *task,
unsigned long size, void __user *data)
{
return -EINVAL;
}
static inline int syscall_user_dispatch_set_config(struct task_struct *task,
unsigned long size, void __user *data)
{
return -EINVAL;
}
2023-08-30 17:31:07 +02:00
#endif /* CONFIG_GENERIC_ENTRY */
#endif /* _SYSCALL_USER_DISPATCH_H */