include/linux/audit.h
Source file repositories/reference/linux-study-clean/include/linux/audit.h
File Facts
- System
- Linux kernel
- Corpus path
include/linux/audit.h- Extension
.h- Size
- 21119 bytes
- Lines
- 743
- Domain
- Core OS
- Bucket
- Core Kernel Interface
- 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.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/sched.hlinux/ptrace.hlinux/audit_arch.huapi/linux/audit.huapi/linux/fanotify.hasm/syscall.h
Detected Declarations
struct audit_sig_infostruct audit_bufferstruct audit_contextstruct inodestruct netlink_skb_parmsstruct pathstruct linux_binprmstruct mq_attrstruct mqstatstruct audit_watchstruct audit_treestruct sk_buffstruct kern_ipc_permstruct lsm_idstruct lsm_propstruct audit_krulestruct audit_fieldstruct audit_ntp_valstruct audit_ntp_datastruct audit_ntp_datastruct filenameenum audit_ntp_typeenum audit_nfcfgopfunction audit_get_loginuidfunction audit_get_sessionidfunction __printffunction __printffunction audit_log_obj_ctxfunction audit_log_task_contextfunction audit_log_task_infofunction audit_get_loginuidfunction audit_get_sessionidfunction audit_signal_infofunction audit_cfg_lsmfunction audit_set_contextfunction audit_dummy_contextfunction audit_freefunction audit_uring_entryfunction audit_uring_exitfunction audit_syscall_entryfunction audit_syscall_exitfunction audit_getnamefunction audit_inodefunction audit_filefunction audit_inode_parent_hiddenfunction audit_inode_childfunction audit_ptracefunction audit_ipc_obj
Annotated Snippet
struct audit_sig_info {
uid_t uid;
pid_t pid;
char ctx[];
};
struct audit_buffer;
struct audit_context;
struct inode;
struct netlink_skb_parms;
struct path;
struct linux_binprm;
struct mq_attr;
struct mqstat;
struct audit_watch;
struct audit_tree;
struct sk_buff;
struct kern_ipc_perm;
struct lsm_id;
struct lsm_prop;
struct audit_krule {
u32 pflags;
u32 flags;
u32 listnr;
u32 action;
u32 mask[AUDIT_BITMASK_SIZE];
u32 buflen; /* for data alloc on list rules */
u32 field_count;
char *filterkey; /* ties events to rules */
struct audit_field *fields;
struct audit_field *arch_f; /* quick access to arch field */
struct audit_field *inode_f; /* quick access to an inode field */
struct audit_watch *watch; /* associated watch */
struct audit_tree *tree; /* associated watched tree */
struct audit_fsnotify_mark *exe;
struct list_head rlist; /* entry in audit_{watch,tree}.rules list */
struct list_head list; /* for AUDIT_LIST* purposes only */
u64 prio;
};
/* Flag to indicate legacy AUDIT_LOGINUID unset usage */
#define AUDIT_LOGINUID_LEGACY 0x1
struct audit_field {
u32 type;
union {
u32 val;
kuid_t uid;
kgid_t gid;
struct {
char *lsm_str;
void *lsm_rule;
};
};
u32 op;
};
enum audit_ntp_type {
AUDIT_NTP_OFFSET,
AUDIT_NTP_FREQ,
AUDIT_NTP_STATUS,
AUDIT_NTP_TAI,
AUDIT_NTP_TICK,
AUDIT_NTP_ADJUST,
AUDIT_NTP_NVALS /* count */
};
#ifdef CONFIG_AUDITSYSCALL
struct audit_ntp_val {
long long oldval, newval;
};
struct audit_ntp_data {
struct audit_ntp_val vals[AUDIT_NTP_NVALS];
};
#else
struct audit_ntp_data {};
#endif
enum audit_nfcfgop {
AUDIT_XT_OP_REGISTER,
AUDIT_XT_OP_REPLACE,
AUDIT_XT_OP_UNREGISTER,
AUDIT_NFT_OP_TABLE_REGISTER,
AUDIT_NFT_OP_TABLE_UNREGISTER,
AUDIT_NFT_OP_CHAIN_REGISTER,
AUDIT_NFT_OP_CHAIN_UNREGISTER,
AUDIT_NFT_OP_RULE_REGISTER,
Annotation
- Immediate include surface: `linux/sched.h`, `linux/ptrace.h`, `linux/audit_arch.h`, `uapi/linux/audit.h`, `uapi/linux/fanotify.h`, `asm/syscall.h`.
- Detected declarations: `struct audit_sig_info`, `struct audit_buffer`, `struct audit_context`, `struct inode`, `struct netlink_skb_parms`, `struct path`, `struct linux_binprm`, `struct mq_attr`, `struct mqstat`, `struct audit_watch`.
- Atlas domain: Core OS / Core Kernel Interface.
- Implementation status: source implementation candidate.
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.