~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/include/linux/umh.h

Version: ~ [ linux-6.11-rc3 ] ~ [ linux-6.10.4 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.45 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.104 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.164 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.223 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.281 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.319 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 #ifndef __LINUX_UMH_H__
  2 #define __LINUX_UMH_H__
  3 
  4 #include <linux/gfp.h>
  5 #include <linux/stddef.h>
  6 #include <linux/errno.h>
  7 #include <linux/compiler.h>
  8 #include <linux/workqueue.h>
  9 #include <linux/sysctl.h>
 10 
 11 struct cred;
 12 struct file;
 13 
 14 #define UMH_NO_WAIT     0x00    /* don't wait at all */
 15 #define UMH_WAIT_EXEC   0x01    /* wait for the exec, but not the process */
 16 #define UMH_WAIT_PROC   0x02    /* wait for the process to complete */
 17 #define UMH_KILLABLE    0x04    /* wait for EXEC/PROC killable */
 18 #define UMH_FREEZABLE   0x08    /* wait for EXEC/PROC freezable */
 19 
 20 struct subprocess_info {
 21         struct work_struct work;
 22         struct completion *complete;
 23         const char *path;
 24         char **argv;
 25         char **envp;
 26         int wait;
 27         int retval;
 28         int (*init)(struct subprocess_info *info, struct cred *new);
 29         void (*cleanup)(struct subprocess_info *info);
 30         void *data;
 31 } __randomize_layout;
 32 
 33 extern int
 34 call_usermodehelper(const char *path, char **argv, char **envp, int wait);
 35 
 36 extern struct subprocess_info *
 37 call_usermodehelper_setup(const char *path, char **argv, char **envp,
 38                           gfp_t gfp_mask,
 39                           int (*init)(struct subprocess_info *info, struct cred *new),
 40                           void (*cleanup)(struct subprocess_info *), void *data);
 41 
 42 extern int
 43 call_usermodehelper_exec(struct subprocess_info *info, int wait);
 44 
 45 enum umh_disable_depth {
 46         UMH_ENABLED = 0,
 47         UMH_FREEZING,
 48         UMH_DISABLED,
 49 };
 50 
 51 extern int __usermodehelper_disable(enum umh_disable_depth depth);
 52 extern void __usermodehelper_set_disable_depth(enum umh_disable_depth depth);
 53 
 54 static inline int usermodehelper_disable(void)
 55 {
 56         return __usermodehelper_disable(UMH_DISABLED);
 57 }
 58 
 59 static inline void usermodehelper_enable(void)
 60 {
 61         __usermodehelper_set_disable_depth(UMH_ENABLED);
 62 }
 63 
 64 extern int usermodehelper_read_trylock(void);
 65 extern long usermodehelper_read_lock_wait(long timeout);
 66 extern void usermodehelper_read_unlock(void);
 67 
 68 #endif /* __LINUX_UMH_H__ */
 69 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php