437 common openat2 sys_openat2
438 common pidfd_getfd sys_pidfd_getfd
439 common faccessat2 sys_faccessat2
+449 common mshare sys_mshare
#
# x32-specific system call numbers start at 512 to avoid cache impact
__SYSCALL(__NR_faccessat2, sys_faccessat2)
#undef __NR_syscalls
-#define __NR_syscalls 440
+#define __NR_syscalls 450
/*
* 32 bit systems traditionally used different
CFLAGS_init-mm.o += $(call cc-disable-warning, initializer-overrides)
mmu-y := nommu.o
-mmu-$(CONFIG_MMU) := highmem.o memory.o mincore.o \
+mmu-$(CONFIG_MMU) := highmem.o memory.o mincore.o mshare.o \
mlock.o mmap.o mmu_gather.o mprotect.o mremap.o \
msync.o page_vma_mapped.o pagewalk.o \
pgtable-generic.o rmap.o vmalloc.o
--- /dev/null
+#include <linux/anon_inodes.h>
+#include <linux/fs.h>
+#include <linux/syscalls.h>
+
+static const struct file_operations mshare_fops = {
+};
+
+SYSCALL_DEFINE3(mshare, unsigned long, addr, unsigned long, len,
+ unsigned long, flags)
+{
+ int fd;
+
+ if ((addr | len) & (PGDIR_SIZE - 1))
+ return -EINVAL;
+
+ fd = anon_inode_getfd("mshare", &mshare_fops, NULL, O_RDWR);
+
+ return fd;
+}