linux/include/linux/syscall_user_dispatch.h
<<
>>
Prefs
   1/* SPDX-License-Identifier: GPL-2.0 */
   2/*
   3 * Copyright (C) 2020 Collabora Ltd.
   4 */
   5#ifndef _SYSCALL_USER_DISPATCH_H
   6#define _SYSCALL_USER_DISPATCH_H
   7
   8#include <linux/thread_info.h>
   9
  10#ifdef CONFIG_GENERIC_ENTRY
  11
  12struct syscall_user_dispatch {
  13        char __user     *selector;
  14        unsigned long   offset;
  15        unsigned long   len;
  16        bool            on_dispatch;
  17};
  18
  19int set_syscall_user_dispatch(unsigned long mode, unsigned long offset,
  20                              unsigned long len, char __user *selector);
  21
  22#define clear_syscall_work_syscall_user_dispatch(tsk) \
  23        clear_task_syscall_work(tsk, SYSCALL_USER_DISPATCH)
  24
  25#else
  26struct syscall_user_dispatch {};
  27
  28static inline int set_syscall_user_dispatch(unsigned long mode, unsigned long offset,
  29                                            unsigned long len, char __user *selector)
  30{
  31        return -EINVAL;
  32}
  33
  34static inline void clear_syscall_work_syscall_user_dispatch(struct task_struct *tsk)
  35{
  36}
  37
  38#endif /* CONFIG_GENERIC_ENTRY */
  39
  40#endif /* _SYSCALL_USER_DISPATCH_H */
  41