arch/arm64/include/asm/gcs.h
Source file repositories/reference/linux-study-clean/arch/arm64/include/asm/gcs.h
File Facts
- System
- Linux kernel
- Corpus path
arch/arm64/include/asm/gcs.h- Extension
.h- Size
- 4223 bytes
- Lines
- 197
- Domain
- Architecture Layer
- Bucket
- arch/arm64
- 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.
- Touches user memory; correctness depends on fault-safe copying and privilege boundary handling.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
asm/types.hasm/uaccess.h
Detected Declarations
struct kernel_clone_argsstruct ksignalfunction gcsb_dsyncfunction gcsstrfunction gcsss1function gcsss2function task_gcs_el0_enabledfunction gcs_check_lockedfunction gcssttrfunction put_user_gcsfunction push_user_gcsfunction get_user_gcsfunction pop_user_gcsfunction task_gcs_el0_enabledfunction gcs_set_el0_modefunction gcs_check_lockedfunction get_user_gcsfunction pop_user_gcs
Annotated Snippet
static inline void gcs_set_el0_mode(struct task_struct *task) { }
static inline void gcs_free(struct task_struct *task) { }
static inline void gcs_preserve_current_state(void) { }
static inline void put_user_gcs(unsigned long val, unsigned long __user *addr,
int *err) { }
static inline void push_user_gcs(unsigned long val, int *err) { }
static inline unsigned long gcs_alloc_thread_stack(struct task_struct *tsk,
const struct kernel_clone_args *args)
{
return -ENOTSUPP;
}
static inline int gcs_check_locked(struct task_struct *task,
unsigned long new_val)
{
return 0;
}
static inline u64 get_user_gcs(unsigned long __user *addr, int *err)
{
*err = -EFAULT;
return 0;
}
static inline u64 pop_user_gcs(int *err)
{
return 0;
}
#endif
#endif
Annotation
- Immediate include surface: `asm/types.h`, `asm/uaccess.h`.
- Detected declarations: `struct kernel_clone_args`, `struct ksignal`, `function gcsb_dsync`, `function gcsstr`, `function gcsss1`, `function gcsss2`, `function task_gcs_el0_enabled`, `function gcs_check_locked`, `function gcssttr`, `function put_user_gcs`.
- Atlas domain: Architecture Layer / arch/arm64.
- Implementation status: source 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.