security/integrity/evm/evm.h
Source file repositories/reference/linux-study-clean/security/integrity/evm/evm.h
File Facts
- System
- Linux kernel
- Corpus path
security/integrity/evm/evm.h- Extension
.h- Size
- 2330 bytes
- Lines
- 90
- 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.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/xattr.hlinux/security.h../integrity.h
Detected Declarations
struct xattr_liststruct evm_iint_cachestruct evm_digest
Annotated Snippet
struct xattr_list {
struct list_head list;
char *name;
bool enabled;
};
#define EVM_NEW_FILE 0x00000001
#define EVM_IMMUTABLE_DIGSIG 0x00000002
/* EVM integrity metadata associated with an inode */
struct evm_iint_cache {
unsigned long flags;
enum integrity_status evm_status:4;
struct integrity_inode_attributes metadata_inode;
};
extern struct lsm_blob_sizes evm_blob_sizes;
static inline struct evm_iint_cache *evm_iint_inode(const struct inode *inode)
{
if (unlikely(!inode->i_security))
return NULL;
return inode->i_security + evm_blob_sizes.lbs_inode;
}
extern int evm_initialized;
#define EVM_ATTR_FSUUID 0x0001
extern int evm_hmac_attrs;
/* List of EVM protected security xattrs */
extern struct list_head evm_config_xattrnames;
struct evm_digest {
struct ima_digest_data_hdr hdr;
char digest[IMA_MAX_DIGEST_SIZE];
} __packed;
int evm_protected_xattr(const char *req_xattr_name);
int evm_init_key(void);
int evm_update_evmxattr(struct dentry *dentry,
const char *req_xattr_name,
const char *req_xattr_value,
size_t req_xattr_value_len);
int evm_calc_hmac(struct dentry *dentry, const char *req_xattr_name,
const char *req_xattr_value,
size_t req_xattr_value_len, struct evm_digest *data,
struct evm_iint_cache *iint);
int evm_calc_hash(struct dentry *dentry, const char *req_xattr_name,
const char *req_xattr_value,
size_t req_xattr_value_len, char type,
struct evm_digest *data, struct evm_iint_cache *iint);
int evm_init_hmac(struct inode *inode, const struct xattr *xattrs,
char *hmac_val);
int evm_init_secfs(void);
#endif
Annotation
- Immediate include surface: `linux/xattr.h`, `linux/security.h`, `../integrity.h`.
- Detected declarations: `struct xattr_list`, `struct evm_iint_cache`, `struct evm_digest`.
- Atlas domain: Core OS / Security And Isolation.
- 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.