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
29asmlinkage long sys_mmap(unsigned long addr, unsigned long len,
30 unsigned long prot, unsigned long flags,
31 unsigned long fd, off_t off)
32{
33 if (offset_in_page(off) != 0)
34 return -EINVAL;
35
36 return sys_mmap_pgoff(addr, len, prot, flags, fd, off >> PAGE_SHIFT);
37}
38
39
40
41
42asmlinkage long sys_rt_sigreturn_wrapper(void);
43#define sys_rt_sigreturn sys_rt_sigreturn_wrapper
44
45#undef __SYSCALL
46#define __SYSCALL(nr, sym) [nr] = sym,
47
48
49
50
51
52void * const sys_call_table[__NR_syscalls] __aligned(4096) = {
53 [0 ... __NR_syscalls - 1] = sys_ni_syscall,
54#include <asm/unistd.h>
55};
56