include/uapi/linux/ptrace.h
Source file repositories/reference/linux-study-clean/include/uapi/linux/ptrace.h
File Facts
- System
- Linux kernel
- Corpus path
include/uapi/linux/ptrace.h- Extension
.h- Size
- 5633 bytes
- Lines
- 192
- 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.
- Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/types.hasm/ptrace.h
Detected Declarations
struct ptrace_peeksiginfo_argsstruct seccomp_metadatastruct ptrace_syscall_infostruct ptrace_rseq_configurationstruct ptrace_sud_config
Annotated Snippet
struct ptrace_peeksiginfo_args {
__u64 off; /* from which siginfo to start */
__u32 flags;
__s32 nr; /* how may siginfos to take */
};
#define PTRACE_GETSIGMASK 0x420a
#define PTRACE_SETSIGMASK 0x420b
#define PTRACE_SECCOMP_GET_FILTER 0x420c
#define PTRACE_SECCOMP_GET_METADATA 0x420d
struct seccomp_metadata {
__u64 filter_off; /* Input: which filter */
__u64 flags; /* Output: filter's flags */
};
#define PTRACE_GET_SYSCALL_INFO 0x420e
#define PTRACE_SET_SYSCALL_INFO 0x4212
#define PTRACE_SYSCALL_INFO_NONE 0
#define PTRACE_SYSCALL_INFO_ENTRY 1
#define PTRACE_SYSCALL_INFO_EXIT 2
#define PTRACE_SYSCALL_INFO_SECCOMP 3
struct ptrace_syscall_info {
__u8 op; /* PTRACE_SYSCALL_INFO_* */
__u8 reserved;
__u16 flags;
__u32 arch;
__u64 instruction_pointer;
__u64 stack_pointer;
union {
struct {
__u64 nr;
__u64 args[6];
} entry;
struct {
__s64 rval;
__u8 is_error;
} exit;
struct {
__u64 nr;
__u64 args[6];
__u32 ret_data;
__u32 reserved2;
} seccomp;
};
};
#define PTRACE_GET_RSEQ_CONFIGURATION 0x420f
struct ptrace_rseq_configuration {
__u64 rseq_abi_pointer;
__u32 rseq_abi_size;
__u32 signature;
__u32 flags;
__u32 pad;
};
#define PTRACE_SET_SYSCALL_USER_DISPATCH_CONFIG 0x4210
#define PTRACE_GET_SYSCALL_USER_DISPATCH_CONFIG 0x4211
/*
* struct ptrace_sud_config - Per-task configuration for Syscall User Dispatch
* @mode: One of PR_SYS_DISPATCH_ON or PR_SYS_DISPATCH_OFF
* @selector: Tracees user virtual address of SUD selector
* @offset: SUD exclusion area (virtual address)
* @len: Length of SUD exclusion area
*
* Used to get/set the syscall user dispatch configuration for a tracee.
* Selector is optional (may be NULL), and if invalid will produce
* a SIGSEGV in the tracee upon first access.
*
* If mode is PR_SYS_DISPATCH_ON, syscall dispatch will be enabled. If
* PR_SYS_DISPATCH_OFF, syscall dispatch will be disabled and all other
* parameters must be 0. The value in *selector (if not null), also determines
* whether syscall dispatch will occur.
*
* The Syscall User Dispatch Exclusion area described by offset/len is the
* virtual address space from which syscalls will not produce a user
* dispatch.
*/
struct ptrace_sud_config {
__u64 mode;
__u64 selector;
__u64 offset;
__u64 len;
};
/* 0x4212 is PTRACE_SET_SYSCALL_INFO */
Annotation
- Immediate include surface: `linux/types.h`, `asm/ptrace.h`.
- Detected declarations: `struct ptrace_peeksiginfo_args`, `struct seccomp_metadata`, `struct ptrace_syscall_info`, `struct ptrace_rseq_configuration`, `struct ptrace_sud_config`.
- Atlas domain: Core OS / Core Kernel Interface.
- 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.