diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2021-09-20 21:32:48 +0000 |
---|---|---|
committer | Richard Weinberger <richard@nod.at> | 2021-12-21 21:30:44 +0100 |
commit | 577ade59b99e3473b2f1342b1eb9e496eed39b68 (patch) | |
tree | c7caad9da863acb63602f38ab0c218f7c299c590 /arch/x86/um/syscalls_64.c | |
parent | 8f5c84f3678e72bbba96b0755135adae66d35c0e (diff) | |
download | linux-stable-577ade59b99e3473b2f1342b1eb9e496eed39b68.tar.gz linux-stable-577ade59b99e3473b2f1342b1eb9e496eed39b68.tar.bz2 linux-stable-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.c | 10 |
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); +} |