include/uapi/linux/sed-opal.h

Source file repositories/reference/linux-study-clean/include/uapi/linux/sed-opal.h

File Facts

System
Linux kernel
Corpus path
include/uapi/linux/sed-opal.h
Extension
.h
Size
6490 bytes
Lines
251
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.

Dependency Surface

Detected Declarations

Annotated Snippet

struct opal_key {
	__u8 lr;
	__u8 key_len;
	__u8 key_type;
	__u8 __align[5];
	__u8 key[OPAL_KEY_MAX];
};

enum opal_revert_lsp_opts {
	OPAL_PRESERVE = 0x01,
};

struct opal_lr_act {
	struct opal_key key;
	__u32 sum;
	__u8 num_lrs;
	__u8 lr[OPAL_MAX_LRS];
	__u8 align[2]; /* Align to 8 byte boundary */
};

struct opal_lr_react {
	struct opal_key key;
	struct opal_key new_admin_key; /* Set new Admin1 PIN if key_len is > 0 */
	__u8 num_lrs; /*
		       * Configure selected ranges (from lr[]) in SUM.
		       * If num_lrs > 0 the 'entire_table' must be 0
		       */
	__u8 lr[OPAL_MAX_LRS];
	__u8 range_policy; /* Set RangeStartRangeLengthPolicy parameter */
	__u8 entire_table; /* Set all locking objects in SUM */
	__u8 align[4]; /* Align to 8 byte boundary */
};

struct opal_session_info {
	__u32 sum;
	__u32 who;
	struct opal_key opal_key;
};

struct opal_user_lr_setup {
	__u64 range_start;
	__u64 range_length;
	__u32 RLE; /* Read Lock enabled */
	__u32 WLE; /* Write Lock Enabled */
	struct opal_session_info session;
};

struct opal_lr_status {
	struct opal_session_info session;
	__u64 range_start;
	__u64 range_length;
	__u32 RLE; /* Read Lock enabled */
	__u32 WLE; /* Write Lock Enabled */
	__u32 l_state;
	__u8  align[4];
};

struct opal_sum_ranges {
	/*
	 * Initiate Admin1 session if key_len > 0,
	 * use Anybody session otherwise.
	 */
	struct opal_key key;
	__u8 num_lrs;
	__u8 lr[OPAL_MAX_LRS];
	__u8 range_policy;
	__u8 align[5]; /* Align to 8 byte boundary */
};

struct opal_lock_unlock {
	struct opal_session_info session;
	__u32 l_state;
	__u16 flags;
	__u8 __align[2];
};

struct opal_new_pw {
	struct opal_session_info session;

	/* When we're not operating in sum, and we first set
	 * passwords we need to set them via ADMIN authority.
	 * After passwords are changed, we can set them via,
	 * User authorities.
	 * Because of this restriction we need to know about
	 * Two different users. One in 'session' which we will use
	 * to start the session and new_userr_pw as the user we're
	 * chaning the pw for.
	 */
	struct opal_session_info new_user_pw;
};

Annotation

Implementation Notes