cregit-Linux how code gets into the kernel

Release 4.7 include/linux/seccomp.h

Directory: include/linux
#ifndef _LINUX_SECCOMP_H

#define _LINUX_SECCOMP_H

#include <uapi/linux/seccomp.h>


#define SECCOMP_FILTER_FLAG_MASK	(SECCOMP_FILTER_FLAG_TSYNC)

#ifdef CONFIG_SECCOMP

#include <linux/thread_info.h>
#include <asm/seccomp.h>

struct seccomp_filter;
/**
 * struct seccomp - the state of a seccomp'ed process
 *
 * @mode:  indicates one of the valid values above for controlled
 *         system calls available to a process.
 * @filter: must always point to a valid seccomp-filter or NULL as it is
 *          accessed without locking during system call entry.
 *
 *          @filter must only be accessed from the context of current as there
 *          is no read locking.
 */

struct seccomp {
	
int mode;
	
struct seccomp_filter *filter;
};

#ifdef CONFIG_HAVE_ARCH_SECCOMP_FILTER
extern int __secure_computing(void);

static inline int secure_computing(void) { if (unlikely(test_thread_flag(TIF_SECCOMP))) return __secure_computing(); return 0; }

Contributors

PersonTokensPropCommitsCommitProp
andrea arcangeliandrea arcangeli1869.23%133.33%
will drewrywill drewry623.08%133.33%
andy lutomirskiandy lutomirski27.69%133.33%
Total26100.00%3100.00%

#define SECCOMP_PHASE1_OK 0 #define SECCOMP_PHASE1_SKIP 1 extern u32 seccomp_phase1(struct seccomp_data *sd); int seccomp_phase2(u32 phase1_result); #else extern void secure_computing_strict(int this_syscall); #endif extern long prctl_get_seccomp(void); extern long prctl_set_seccomp(unsigned long, char __user *);
static inline int seccomp_mode(struct seccomp *s) { return s->mode; }

Contributors

PersonTokensPropCommitsCommitProp
andy lutomirskiandy lutomirski1588.24%150.00%
will drewrywill drewry211.76%150.00%
Total17100.00%2100.00%

#else /* CONFIG_SECCOMP */ #include <linux/errno.h> struct seccomp { }; struct seccomp_filter { }; #ifdef CONFIG_HAVE_ARCH_SECCOMP_FILTER
static inline int secure_computing(void) { return 0; }

Contributors

PersonTokensPropCommitsCommitProp
stephen rothwellstephen rothwell866.67%133.33%
andrea arcangeliandrea arcangeli325.00%133.33%
andy lutomirskiandy lutomirski18.33%133.33%
Total12100.00%3100.00%

#else
static inline void secure_computing_strict(int this_syscall) { return; }

Contributors

PersonTokensPropCommitsCommitProp
will drewrywill drewry11100.00%1100.00%
Total11100.00%1100.00%

#endif
static inline long prctl_get_seccomp(void) { return -EINVAL; }

Contributors

PersonTokensPropCommitsCommitProp
andrea arcangeliandrea arcangeli13100.00%1100.00%
Total13100.00%1100.00%


static inline long prctl_set_seccomp(unsigned long arg2, char __user *arg3) { return -EINVAL; }

Contributors

PersonTokensPropCommitsCommitProp
andrea arcangeliandrea arcangeli1575.00%150.00%
will drewrywill drewry525.00%150.00%
Total20100.00%2100.00%


static inline int seccomp_mode(struct seccomp *s) { return SECCOMP_MODE_DISABLED; }

Contributors

PersonTokensPropCommitsCommitProp
andy lutomirskiandy lutomirski1280.00%133.33%
will drewrywill drewry213.33%133.33%
kees cookkees cook16.67%133.33%
Total15100.00%3100.00%

#endif /* CONFIG_SECCOMP */ #ifdef CONFIG_SECCOMP_FILTER extern void put_seccomp_filter(struct task_struct *tsk); extern void get_seccomp_filter(struct task_struct *tsk); #else /* CONFIG_SECCOMP_FILTER */
static inline void put_seccomp_filter(struct task_struct *tsk) { return; }

Contributors

PersonTokensPropCommitsCommitProp
will drewrywill drewry13100.00%1100.00%
Total13100.00%1100.00%


static inline void get_seccomp_filter(struct task_struct *tsk) { return; }

Contributors

PersonTokensPropCommitsCommitProp
will drewrywill drewry13100.00%1100.00%
Total13100.00%1100.00%

#endif /* CONFIG_SECCOMP_FILTER */ #if defined(CONFIG_SECCOMP_FILTER) && defined(CONFIG_CHECKPOINT_RESTORE) extern long seccomp_get_filter(struct task_struct *task, unsigned long filter_off, void __user *data); #else
static inline long seccomp_get_filter(struct task_struct *task, unsigned long n, void __user *data) { return -EINVAL; }

Contributors

PersonTokensPropCommitsCommitProp
tycho andersentycho andersen25100.00%1100.00%
Total25100.00%1100.00%

#endif /* CONFIG_SECCOMP_FILTER && CONFIG_CHECKPOINT_RESTORE */ #endif /* _LINUX_SECCOMP_H */

Overall Contributors

PersonTokensPropCommitsCommitProp
will drewrywill drewry11231.02%422.22%
andrea arcangeliandrea arcangeli9927.42%316.67%
andy lutomirskiandy lutomirski7219.94%422.22%
tycho andersentycho andersen6016.62%15.56%
stephen rothwellstephen rothwell82.22%15.56%
kees cookkees cook61.66%316.67%
ralf baechleralf baechle30.83%15.56%
david howellsdavid howells10.28%15.56%
Total361100.00%18100.00%
Directory: include/linux
Information contained on this website is for historical information purposes only and does not indicate or represent copyright ownership.
{% endraw %}