summaryrefslogtreecommitdiffstats
path: root/arch/x86/um/syscalls_64.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2021-09-20 23:32:48 +0200
committerRichard Weinberger <richard@nod.at>2021-12-21 21:30:44 +0100
commit577ade59b99e3473b2f1342b1eb9e496eed39b68 (patch)
treec7caad9da863acb63602f38ab0c218f7c299c590 /arch/x86/um/syscalls_64.c
parentuml: trim unused junk from arch/x86/um/sys_call_table_*.c (diff)
downloadlinux-577ade59b99e3473b2f1342b1eb9e496eed39b68.tar.xz
linux-577ade59b99e3473b2f1342b1eb9e496eed39b68.zip
um: move amd64 variant of mmap(2) to arch/x86/um/syscalls_64.c
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Richard Weinberger <richard@nod.at>
Diffstat (limited to 'arch/x86/um/syscalls_64.c')
-rw-r--r--arch/x86/um/syscalls_64.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/arch/x86/um/syscalls_64.c b/arch/x86/um/syscalls_64.c
index 8249685b4096..e768f54b118c 100644
--- a/arch/x86/um/syscalls_64.c
+++ b/arch/x86/um/syscalls_64.c
@@ -88,3 +88,13 @@ void arch_switch_to(struct task_struct *to)
arch_prctl(to, ARCH_SET_FS, (void __user *) to->thread.arch.fs);
}
+
+SYSCALL_DEFINE6(mmap, unsigned long, addr, unsigned long, len,
+ unsigned long, prot, unsigned long, flags,
+ unsigned long, fd, unsigned long, off)
+{
+ if (off & ~PAGE_MASK)
+ return -EINVAL;
+
+ return ksys_mmap_pgoff(addr, len, prot, flags, fd, off >> PAGE_SHIFT);
+}