System
PKU
Protection keys for user pages: each page carries one of 16 keys, and RDPKRU and WRPKRU read and write the per-thread register that disables access or writes for each key.
- CPUID
- PKU + OSPKU
CPUID.(EAX=07H,ECX=0):ECX[3]CPUID.(EAX=07H,ECX=0):ECX[4] - Instructions
- 2 mnemonics
- Processors
- Comet Lake, Cannon Lake, Ice Lake (client), Tiger Lake, Alder Lake, Arrow Lake, Panther Lake, Nova Lake, Skylake-SP, Cascade Lake, Cooper Lake, Ice Lake (server), Sapphire Rapids, Emerald Rapids, Granite Rapids, Diamond Rapids, Sierra Forest, Clearwater Forest, Zen 3, Zen 4, Zen 5, Zen 6
Protection keys give each user page one of 16 keys, in four bits of its page-table entry, and let a thread change what each key allows without a system call. The 32-bit PKRU register holds two bits per key, access disable and write disable; RDPKRU reads it and WRPKRU writes it. Because PKRU is per thread, threads of one process can have different rights to the same memory. The keys apply only to data accesses in 64-bit mode, not to instruction fetches.
The operating system enables them with CR4.PKE, which CPUID reports as
OSPKE, and saves PKRU as XSAVE component 9. On Linux a program gets a
key with pkey_alloc() and assigns it to pages with pkey_mprotect().
Instructions
CPUID and processors
XED splits PKU into 1 ISA set. Software can use a form when the processor reports every CPUID bit of one alternative of the form's ISA set.
| ISA set | CPUID | Processors |
|---|---|---|
PKU | PKU + OSPKU | Comet Lake, Cannon Lake, Ice Lake (client), Tiger Lake, Alder Lake, Arrow Lake, Panther Lake, Nova Lake, Skylake-SP, Cascade Lake, Cooper Lake, Ice Lake (server), Sapphire Rapids, Emerald Rapids, Granite Rapids, Diamond Rapids, Sierra Forest, Clearwater Forest, Zen 3, Zen 4, Zen 5, Zen 6 |
Sources
- Intel XED v2026.08.23 (commit
0bcb6237345c): forms, encodings, ISA sets, CPUID bits and chip model. - The CPU data of x86-64.net: Zen 3 to Zen 6, from GCC’s
-marchfeature sets and AMD’s Processor Programming References, which the page of each processor cites. - Intel 64 and IA-32 Architectures Software Developer's Manual, Volume 2 (325383-093, September 2026)
- Linux kernel documentation: Memory Protection Keys
The tables are derived from Intel XED, Copyright Intel Corporation, licensed under the Apache License 2.0; x86-64.net converted and reformatted them. The text is our own.