tools/testing/selftests/mm/pkey-x86.h
Source file repositories/reference/linux-study-clean/tools/testing/selftests/mm/pkey-x86.h
File Facts
- System
- Linux kernel
- Corpus path
tools/testing/selftests/mm/pkey-x86.h- Extension
.h- Size
- 3423 bytes
- Lines
- 166
- Domain
- Support Tooling And Documentation
- Bucket
- tools
- Inferred role
- Support Tooling And Documentation: implementation source
- Status
- source implementation candidate
Why This File Exists
Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.
- Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.
Dependency Surface
- No C-style include directives detected by the generator.
Detected Declarations
function __page_o_noopsfunction __read_pkey_regfunction __write_pkey_regfunction cpu_has_pkeysfunction cpu_max_xsave_sizefunction pkey_bit_positionfunction pkey_reg_xstate_offsetfunction get_arch_reserved_keysfunction expect_fault_on_read_execonly_key
Annotated Snippet
if (leaf == XSTATE_PKEY_BIT) {
xstate_offset = ebx;
xstate_size = eax;
}
}
if (xstate_size == 0) {
printf("could not find size/offset of PKEY in xsave state\n");
return 0;
}
return xstate_offset;
}
static inline int get_arch_reserved_keys(void)
{
return NR_RESERVED_PKEYS;
}
static inline void expect_fault_on_read_execonly_key(void *p1, int pkey)
{
int ptr_contents;
ptr_contents = read_ptr(p1);
dprintf2("ptr (%p) contents@%d: %x\n", p1, __LINE__, ptr_contents);
expected_pkey_fault(pkey);
}
static inline void *malloc_pkey_with_mprotect_subpage(long size, int prot, u16 pkey)
{
return PTR_ERR_ENOTSUP;
}
#endif /* _PKEYS_X86_H */
Annotation
- Detected declarations: `function __page_o_noops`, `function __read_pkey_reg`, `function __write_pkey_reg`, `function cpu_has_pkeys`, `function cpu_max_xsave_size`, `function pkey_bit_position`, `function pkey_reg_xstate_offset`, `function get_arch_reserved_keys`, `function expect_fault_on_read_execonly_key`.
- Atlas domain: Support Tooling And Documentation / tools.
- 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.