arch/arm64/kernel/sys.c
Source file repositories/reference/linux-study-clean/arch/arm64/kernel/sys.c
File Facts
- System
- Linux kernel
- Corpus path
arch/arm64/kernel/sys.c- Extension
.c- Size
- 1591 bytes
- Lines
- 64
- Domain
- Architecture Layer
- Bucket
- arch/arm64
- Inferred role
- Architecture Layer: syscall or user/kernel boundary
- Status
- core 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 participates in a user/kernel boundary; inspect argument validation, copy_from_user/copy_to_user, credentials, and dispatch target.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/compiler.hlinux/errno.hlinux/fs.hlinux/mm.hlinux/export.hlinux/sched.hlinux/slab.hlinux/syscalls.hasm/cpufeature.hasm/syscall.hasm/syscall_table_64.h
Detected Declarations
syscall mmapsyscall arm64_personalityfunction Copyrightfunction __arm64_sys_ni_syscall
Annotated Snippet
SYSCALL_DEFINE6(mmap, unsigned long, addr, unsigned long, len,
unsigned long, prot, unsigned long, flags,
unsigned long, fd, unsigned long, off)
{
if (offset_in_page(off) != 0)
return -EINVAL;
return ksys_mmap_pgoff(addr, len, prot, flags, fd, off >> PAGE_SHIFT);
}
SYSCALL_DEFINE1(arm64_personality, unsigned int, personality)
{
if (personality(personality) == PER_LINUX32 &&
!system_supports_32bit_el0())
return -EINVAL;
return ksys_personality(personality);
}
asmlinkage long sys_ni_syscall(void);
asmlinkage long __arm64_sys_ni_syscall(const struct pt_regs *__unused)
{
return sys_ni_syscall();
}
/*
* Wrappers to pass the pt_regs argument.
*/
#define __arm64_sys_personality __arm64_sys_arm64_personality
#define __SYSCALL_WITH_COMPAT(nr, native, compat) __SYSCALL(nr, native)
#undef __SYSCALL
#define __SYSCALL(nr, sym) asmlinkage long __arm64_##sym(const struct pt_regs *);
#include <asm/syscall_table_64.h>
#undef __SYSCALL
#define __SYSCALL(nr, sym) [nr] = __arm64_##sym,
const syscall_fn_t sys_call_table[__NR_syscalls] = {
[0 ... __NR_syscalls - 1] = __arm64_sys_ni_syscall,
#include <asm/syscall_table_64.h>
};
Annotation
- Immediate include surface: `linux/compiler.h`, `linux/errno.h`, `linux/fs.h`, `linux/mm.h`, `linux/export.h`, `linux/sched.h`, `linux/slab.h`, `linux/syscalls.h`.
- Detected declarations: `syscall mmap`, `syscall arm64_personality`, `function Copyright`, `function __arm64_sys_ni_syscall`.
- Atlas domain: Architecture Layer / arch/arm64.
- Implementation status: core 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.