drivers/s390/crypto/pkey_api.c
Source file repositories/reference/linux-study-clean/drivers/s390/crypto/pkey_api.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/s390/crypto/pkey_api.c- Extension
.c- Size
- 19240 bytes
- Lines
- 805
- Domain
- Driver Families
- Bucket
- drivers/s390
- Inferred role
- Driver Families: operation-table or driver-model contract
- Status
- pattern implementation candidate
Why This File Exists
Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Defines an operation table; this is where Linux turns generic core objects into subsystem-specific behavior.
- Touches user memory; correctness depends on fault-safe copying and privilege boundary handling.
- Allocates kernel memory; connect allocation flags and lifetime to context constraints.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/init.hlinux/miscdevice.hlinux/export.hlinux/slab.hzcrypt_api.hzcrypt_ccamisc.hpkey_base.h
Detected Declarations
function Authorfunction pkey_key2protkeyfunction pkey_ioctl_genseckfunction pkey_ioctl_clr2seckfunction pkey_ioctl_sec2protkfunction pkey_ioctl_clr2protkfunction pkey_ioctl_findcardfunction pkey_ioctl_skey2pkeyfunction pkey_ioctl_verifykeyfunction pkey_ioctl_genprotkfunction pkey_ioctl_verifyprotkfunction pkey_ioctl_kblob2protkfunction pkey_ioctl_genseck2function pkey_ioctl_clr2seck2function pkey_ioctl_verifykey2function pkey_ioctl_kblob2protk2function pkey_ioctl_apqns4kfunction pkey_ioctl_apqns4ktfunction pkey_ioctl_kblob2protk3function pkey_unlocked_ioctlfunction pkey_api_initfunction pkey_api_exitexport pkey_key2protkey
Annotated Snippet
static const struct file_operations pkey_fops = {
.owner = THIS_MODULE,
.open = nonseekable_open,
.unlocked_ioctl = pkey_unlocked_ioctl,
};
static struct miscdevice pkey_dev = {
.name = "pkey",
.minor = MISC_DYNAMIC_MINOR,
.mode = 0666,
.fops = &pkey_fops,
.groups = pkey_attr_groups,
};
int __init pkey_api_init(void)
{
/* register as a misc device */
return misc_register(&pkey_dev);
}
void __exit pkey_api_exit(void)
{
misc_deregister(&pkey_dev);
}
Annotation
- Immediate include surface: `linux/init.h`, `linux/miscdevice.h`, `linux/export.h`, `linux/slab.h`, `zcrypt_api.h`, `zcrypt_ccamisc.h`, `pkey_base.h`.
- Detected declarations: `function Author`, `function pkey_key2protkey`, `function pkey_ioctl_genseck`, `function pkey_ioctl_clr2seck`, `function pkey_ioctl_sec2protk`, `function pkey_ioctl_clr2protk`, `function pkey_ioctl_findcard`, `function pkey_ioctl_skey2pkey`, `function pkey_ioctl_verifykey`, `function pkey_ioctl_genprotk`.
- Atlas domain: Driver Families / drivers/s390.
- Implementation status: pattern implementation candidate.
- This snippet crosses the user/kernel memory boundary; validate fault handling and access checks before translating the pattern.
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.