https://github.com/torvalds/linux
Raw File
Tip revision: 54be6c6c5ae8e0d93a6c4641cb7528eb0b6ba478 authored by Linus Torvalds on 04 February 2024, 12:20:36 UTC
Linux 6.8-rc3
Tip revision: 54be6c6
seccomp_types.h
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef _LINUX_SECCOMP_TYPES_H
#define _LINUX_SECCOMP_TYPES_H

#include <linux/types.h>

#ifdef CONFIG_SECCOMP

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_count: number of seccomp filters
 * @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;
	atomic_t filter_count;
	struct seccomp_filter *filter;
};

#else

struct seccomp { };
struct seccomp_filter { };

#endif

#endif /* _LINUX_SECCOMP_TYPES_H */
back to top