From 577ade59b99e3473b2f1342b1eb9e496eed39b68 Mon Sep 17 00:00:00 2001 From: Al Viro Date: Mon, 20 Sep 2021 21:32:48 +0000 Subject: um: move amd64 variant of mmap(2) to arch/x86/um/syscalls_64.c Signed-off-by: Al Viro Signed-off-by: Richard Weinberger --- arch/x86/um/syscalls_64.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'arch/x86/um/syscalls_64.c') 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); +} -- cgit v1.2.3