arch/s390/include/uapi/asm/pkey.h
Source file repositories/reference/linux-study-clean/arch/s390/include/uapi/asm/pkey.h
File Facts
- System
- Linux kernel
- Corpus path
arch/s390/include/uapi/asm/pkey.h- Extension
.h- Size
- 21097 bytes
- Lines
- 474
- Domain
- Architecture Layer
- Bucket
- arch/s390
- Inferred role
- Architecture Layer: implementation source
- Status
- source implementation candidate
Why This File Exists
CPU and platform-specific kernel glue: boot entry, traps, syscall entry, interrupts, page tables, context switch, and low-level barriers.
- CPU and platform-specific kernel glue: boot entry, traps, syscall entry, interrupts, page tables, context switch, and low-level barriers.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/ioctl.hlinux/types.h
Detected Declarations
struct pkey_apqnstruct pkey_seckeystruct pkey_protkeystruct pkey_clrkeystruct ep11kblob_headerstruct pkey_genseckstruct pkey_clr2seckstruct pkey_sec2protkstruct pkey_clr2protkstruct pkey_findcardstruct pkey_skey2pkeystruct pkey_verifykeystruct pkey_genprotkstruct pkey_verifyprotkstruct pkey_kblob2pkeystruct pkey_genseck2struct pkey_clr2seck2struct pkey_verifykey2struct pkey_kblob2pkey2struct pkey_apqns4keystruct pkey_apqns4keytypestruct pkey_kblob2pkey3enum pkey_key_typeenum pkey_key_size
Annotated Snippet
struct pkey_apqn {
__u16 card;
__u16 domain;
};
/* Struct to hold a CCA AES secure key blob */
struct pkey_seckey {
__u8 seckey[SECKEYBLOBSIZE]; /* the secure key blob */
};
/* Struct to hold protected key and length info */
struct pkey_protkey {
__u32 type; /* key type, one of the PKEY_KEYTYPE_AES values */
__u32 len; /* bytes actually stored in protkey[] */
__u8 protkey[MAXPROTKEYSIZE]; /* the protected key blob */
};
/* Struct to hold an AES clear key value */
struct pkey_clrkey {
__u8 clrkey[MAXCLRKEYSIZE]; /* 16, 24, or 32 byte clear key value */
};
/*
* EP11 key blobs of type PKEY_TYPE_EP11_AES and PKEY_TYPE_EP11_ECC
* are ep11 blobs prepended by this header:
*/
struct ep11kblob_header {
__u8 type; /* always 0x00 */
__u8 hver; /* header version, currently needs to be 0x00 */
__u16 len; /* total length in bytes (including this header) */
__u8 version; /* PKEY_TYPE_EP11_AES or PKEY_TYPE_EP11_ECC */
__u8 res0; /* unused */
__u16 bitlen; /* clear key bit len, 0 for unknown */
__u8 res1[8]; /* unused */
} __packed;
/*
* Generate CCA AES secure key.
*/
struct pkey_genseck {
__u16 cardnr; /* in: card to use or FFFF for any */
__u16 domain; /* in: domain or FFFF for any */
__u32 keytype; /* in: key type to generate */
struct pkey_seckey seckey; /* out: the secure key blob */
};
#define PKEY_GENSECK _IOWR(PKEY_IOCTL_MAGIC, 0x01, struct pkey_genseck)
/*
* Construct CCA AES secure key from clear key value
*/
struct pkey_clr2seck {
__u16 cardnr; /* in: card to use or FFFF for any */
__u16 domain; /* in: domain or FFFF for any */
__u32 keytype; /* in: key type to generate */
struct pkey_clrkey clrkey; /* in: the clear key value */
struct pkey_seckey seckey; /* out: the secure key blob */
};
#define PKEY_CLR2SECK _IOWR(PKEY_IOCTL_MAGIC, 0x02, struct pkey_clr2seck)
/*
* Fabricate AES protected key from a CCA AES secure key
*/
struct pkey_sec2protk {
__u16 cardnr; /* in: card to use or FFFF for any */
__u16 domain; /* in: domain or FFFF for any */
struct pkey_seckey seckey; /* in: the secure key blob */
struct pkey_protkey protkey; /* out: the protected key */
};
#define PKEY_SEC2PROTK _IOWR(PKEY_IOCTL_MAGIC, 0x03, struct pkey_sec2protk)
/*
* Fabricate AES protected key from clear key value
*/
struct pkey_clr2protk {
__u32 keytype; /* in: key type to generate */
struct pkey_clrkey clrkey; /* in: the clear key value */
struct pkey_protkey protkey; /* out: the protected key */
};
#define PKEY_CLR2PROTK _IOWR(PKEY_IOCTL_MAGIC, 0x04, struct pkey_clr2protk)
/*
* Search for matching crypto card based on the Master Key
* Verification Pattern provided inside a CCA AES secure key.
*/
struct pkey_findcard {
struct pkey_seckey seckey; /* in: the secure key blob */
Annotation
- Immediate include surface: `linux/ioctl.h`, `linux/types.h`.
- Detected declarations: `struct pkey_apqn`, `struct pkey_seckey`, `struct pkey_protkey`, `struct pkey_clrkey`, `struct ep11kblob_header`, `struct pkey_genseck`, `struct pkey_clr2seck`, `struct pkey_sec2protk`, `struct pkey_clr2protk`, `struct pkey_findcard`.
- Atlas domain: Architecture Layer / arch/s390.
- 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.