security/tomoyo/common.h
Source file repositories/reference/linux-study-clean/security/tomoyo/common.h
File Facts
- System
- Linux kernel
- Corpus path
security/tomoyo/common.h- Extension
.h- Size
- 40680 bytes
- Lines
- 1293
- Domain
- Core OS
- Bucket
- Security And Isolation
- Inferred role
- Core OS: implementation source
- Status
- source implementation candidate
Why This File Exists
Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.
- Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/ctype.hlinux/string.hlinux/mm.hlinux/file.hlinux/kmod.hlinux/fs.hlinux/sched.hlinux/namei.hlinux/mount.hlinux/list.hlinux/cred.hlinux/poll.hlinux/binfmts.hlinux/highmem.hlinux/net.hlinux/inet.hlinux/in.hlinux/in6.hlinux/un.hlinux/lsm_hooks.hnet/sock.hnet/af_unix.hnet/ip.hnet/ipv6.hnet/udp.h
Detected Declarations
struct tomoyo_acl_headstruct tomoyo_shared_acl_headstruct tomoyo_policy_namespacestruct tomoyo_request_infostruct tomoyo_path_infostruct tomoyo_namestruct tomoyo_name_unionstruct tomoyo_number_unionstruct tomoyo_ipaddr_unionstruct tomoyo_groupstruct tomoyo_path_groupstruct tomoyo_number_groupstruct tomoyo_address_groupstruct tomoyo_mini_statstruct tomoyo_page_dumpstruct tomoyo_obj_infostruct tomoyo_argvstruct tomoyo_envpstruct tomoyo_execvestruct tomoyo_condition_elementstruct tomoyo_conditionstruct tomoyo_acl_infostruct tomoyo_domain_infostruct tomoyo_task_aclstruct tomoyo_path_aclstruct tomoyo_path_number_aclstruct tomoyo_mkdev_aclstruct tomoyo_path2_aclstruct tomoyo_mount_aclstruct tomoyo_env_aclstruct tomoyo_inet_aclstruct tomoyo_unix_aclstruct tomoyo_acl_paramstruct tomoyo_io_bufferstruct tomoyo_transition_controlstruct tomoyo_aggregatorstruct tomoyo_managerstruct tomoyo_preferencestruct tomoyo_profilestruct tomoyo_timestruct tomoyo_policy_namespacestruct tomoyo_taskenum tomoyo_conditions_indexenum tomoyo_path_stat_indexenum tomoyo_mode_indexenum tomoyo_policy_idenum tomoyo_domain_info_flags_indexenum tomoyo_grant_log
Annotated Snippet
struct tomoyo_acl_head {
struct list_head list;
s8 is_deleted; /* true or false or TOMOYO_GC_IN_PROGRESS */
} __packed;
/* Common header for shared entries. */
struct tomoyo_shared_acl_head {
struct list_head list;
atomic_t users;
} __packed;
struct tomoyo_policy_namespace;
/* Structure for request info. */
struct tomoyo_request_info {
/*
* For holding parameters specific to operations which deal files.
* NULL if not dealing files.
*/
struct tomoyo_obj_info *obj;
/*
* For holding parameters specific to execve() request.
* NULL if not dealing execve().
*/
struct tomoyo_execve *ee;
struct tomoyo_domain_info *domain;
/* For holding parameters. */
union {
struct {
const struct tomoyo_path_info *filename;
/* For using wildcards at tomoyo_find_next_domain(). */
const struct tomoyo_path_info *matched_path;
/* One of values in "enum tomoyo_path_acl_index". */
u8 operation;
} path;
struct {
const struct tomoyo_path_info *filename1;
const struct tomoyo_path_info *filename2;
/* One of values in "enum tomoyo_path2_acl_index". */
u8 operation;
} path2;
struct {
const struct tomoyo_path_info *filename;
unsigned int mode;
unsigned int major;
unsigned int minor;
/* One of values in "enum tomoyo_mkdev_acl_index". */
u8 operation;
} mkdev;
struct {
const struct tomoyo_path_info *filename;
unsigned long number;
/*
* One of values in
* "enum tomoyo_path_number_acl_index".
*/
u8 operation;
} path_number;
struct {
const struct tomoyo_path_info *name;
} environ;
struct {
const __be32 *address;
u16 port;
/* One of values smaller than TOMOYO_SOCK_MAX. */
u8 protocol;
/* One of values in "enum tomoyo_network_acl_index". */
u8 operation;
bool is_ipv6;
} inet_network;
struct {
const struct tomoyo_path_info *address;
/* One of values smaller than TOMOYO_SOCK_MAX. */
u8 protocol;
/* One of values in "enum tomoyo_network_acl_index". */
u8 operation;
} unix_network;
struct {
const struct tomoyo_path_info *type;
const struct tomoyo_path_info *dir;
const struct tomoyo_path_info *dev;
unsigned long flags;
int need_dev;
} mount;
struct {
const struct tomoyo_path_info *domainname;
} task;
} param;
struct tomoyo_acl_info *matched_acl;
u8 param_type;
Annotation
- Immediate include surface: `linux/ctype.h`, `linux/string.h`, `linux/mm.h`, `linux/file.h`, `linux/kmod.h`, `linux/fs.h`, `linux/sched.h`, `linux/namei.h`.
- Detected declarations: `struct tomoyo_acl_head`, `struct tomoyo_shared_acl_head`, `struct tomoyo_policy_namespace`, `struct tomoyo_request_info`, `struct tomoyo_path_info`, `struct tomoyo_name`, `struct tomoyo_name_union`, `struct tomoyo_number_union`, `struct tomoyo_ipaddr_union`, `struct tomoyo_group`.
- Atlas domain: Core OS / Security And Isolation.
- Implementation status: source implementation candidate.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.