1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20#include <linux/compiler.h>
21#include <linux/errno.h>
22#include <linux/fs.h>
23#include <linux/mm.h>
24#include <linux/export.h>
25#include <linux/sched.h>
26#include <linux/slab.h>
27#include <linux/syscalls.h>
28#include <asm/cpufeature.h>
29
30asmlinkage long sys_mmap(unsigned long addr, unsigned long len,
31 unsigned long prot, unsigned long flags,
32 unsigned long fd, off_t off)
33{
34 if (offset_in_page(off) != 0)
35 return -EINVAL;
36
37 return sys_mmap_pgoff(addr, len, prot, flags, fd, off >> PAGE_SHIFT);
38}
39
40SYSCALL_DEFINE1(arm64_personality, unsigned int, personality)
41{
42 if (personality(personality) == PER_LINUX32 &&
43 !system_supports_32bit_el0())
44 return -EINVAL;
45 return sys_personality(personality);
46}
47
48
49
50
51asmlinkage long sys_rt_sigreturn_wrapper(void);
52#define sys_rt_sigreturn sys_rt_sigreturn_wrapper
53#define sys_personality sys_arm64_personality
54
55#undef __SYSCALL
56#define __SYSCALL(nr, sym) [nr] = sym,
57
58
59
60
61
62void * const sys_call_table[__NR_syscalls] __aligned(4096) = {
63 [0 ... __NR_syscalls - 1] = sys_ni_syscall,
64#include <asm/unistd.h>
65};
66