arch/x86/include/asm/shstk.h
Source file repositories/reference/linux-study-clean/arch/x86/include/asm/shstk.h
File Facts
- System
- Linux kernel
- Corpus path
arch/x86/include/asm/shstk.h- Extension
.h- Size
- 1633 bytes
- Lines
- 47
- Domain
- Architecture Layer
- Bucket
- arch/x86
- 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/types.h
Detected Declarations
struct task_structstruct ksignalstruct thread_shstkfunction shstk_prctlfunction reset_thread_featuresfunction shstk_freefunction restore_signal_shadow_stackfunction shstk_update_last_framefunction shstk_is_enabledfunction shstk_popfunction shstk_push
Annotated Snippet
struct thread_shstk {
u64 base;
u64 size;
};
long shstk_prctl(struct task_struct *task, int option, unsigned long arg2);
void reset_thread_features(void);
unsigned long shstk_alloc_thread_stack(struct task_struct *p, u64 clone_flags,
unsigned long stack_size);
void shstk_free(struct task_struct *p);
int setup_signal_shadow_stack(struct ksignal *ksig);
int restore_signal_shadow_stack(void);
int shstk_update_last_frame(unsigned long val);
bool shstk_is_enabled(void);
int shstk_pop(u64 *val);
int shstk_push(u64 val);
#else
static inline long shstk_prctl(struct task_struct *task, int option,
unsigned long arg2) { return -EINVAL; }
static inline void reset_thread_features(void) {}
static inline unsigned long shstk_alloc_thread_stack(struct task_struct *p,
u64 clone_flags,
unsigned long stack_size) { return 0; }
static inline void shstk_free(struct task_struct *p) {}
static inline int setup_signal_shadow_stack(struct ksignal *ksig) { return 0; }
static inline int restore_signal_shadow_stack(void) { return 0; }
static inline int shstk_update_last_frame(unsigned long val) { return 0; }
static inline bool shstk_is_enabled(void) { return false; }
static inline int shstk_pop(u64 *val) { return -ENOTSUPP; }
static inline int shstk_push(u64 val) { return -ENOTSUPP; }
#endif /* CONFIG_X86_USER_SHADOW_STACK */
#endif /* __ASSEMBLER__ */
#endif /* _ASM_X86_SHSTK_H */
Annotation
- Immediate include surface: `linux/types.h`.
- Detected declarations: `struct task_struct`, `struct ksignal`, `struct thread_shstk`, `function shstk_prctl`, `function reset_thread_features`, `function shstk_free`, `function restore_signal_shadow_stack`, `function shstk_update_last_frame`, `function shstk_is_enabled`, `function shstk_pop`.
- Atlas domain: Architecture Layer / arch/x86.
- 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.