diff options
| author | Peter Maydell <peter.maydell@linaro.org> | 2019-09-12 16:17:26 +0100 |
|---|---|---|
| committer | Peter Maydell <peter.maydell@linaro.org> | 2019-09-12 16:17:26 +0100 |
| commit | a30cb4b1f22c58aa3b933ee9e1d7611399b57b5b (patch) | |
| tree | f31eb44f95cfcee9525b4ba0a9fd5656c3ed6041 /linux-user/syscall.c | |
| parent | 6d2fdde42c3344099262431df6a3f429c509291d (diff) | |
| parent | 5eea942900536b76ad13bef35e1d8f276566ae9e (diff) | |
| download | focaccia-qemu-a30cb4b1f22c58aa3b933ee9e1d7611399b57b5b.tar.gz focaccia-qemu-a30cb4b1f22c58aa3b933ee9e1d7611399b57b5b.zip | |
Merge remote-tracking branch 'remotes/vivier2/tags/linux-user-for-4.2-pull-request' into staging
Add several floppy drive ioctl, xtensa call0 ABI support, arm MAX_RESERVED_VA for M-profile, aarch64 AT_HWCAP2, qOffsets' query for ELF, memfd_create, and some code cleanup # gpg: Signature made Wed 11 Sep 2019 07:48:45 BST # gpg: using RSA key CD2F75DDC8E3A4DC2E4F5173F30C38BD3F2FBE3C # gpg: issuer "laurent@vivier.eu" # gpg: Good signature from "Laurent Vivier <lvivier@redhat.com>" [full] # gpg: aka "Laurent Vivier <laurent@vivier.eu>" [full] # gpg: aka "Laurent Vivier (Red Hat) <lvivier@redhat.com>" [full] # Primary key fingerprint: CD2F 75DD C8E3 A4DC 2E4F 5173 F30C 38BD 3F2F BE3C * remotes/vivier2/tags/linux-user-for-4.2-pull-request: linux-user: Add support for FDRESET, FDRAWCMD, FDTWADDLE, and FDEJECT ioctls linux-user: Add support for FDMSGON and FDMSGOFF ioctls linux-user: Add support for FDFLUSH ioctl linux-user: Add support for FIOGETOWN and FIOSETOWN ioctls linux-user: Add support for RNDRESEEDCRNG ioctl linux-user: drop redundant handling of environment variables target/xtensa: linux-user: add call0 ABI support linux-user: Support gdb 'qOffsets' query for ELF linux-user/arm: Adjust MAX_RESERVED_VA for M-profile linux-user: Pass CPUState to MAX_RESERVED_VA linux-user: add memfd_create linux-user: fail and report on bad dfilter specs linux-user: erroneous fd_trans_unregister call linux-user: Add AT_HWCAP2 for aarch64-linux-user linux-user: remove useless variable Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'linux-user/syscall.c')
| -rw-r--r-- | linux-user/syscall.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 8b41a03901..e2af3c1494 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -20,6 +20,7 @@ #include "qemu/osdep.h" #include "qemu/cutils.h" #include "qemu/path.h" +#include "qemu/memfd.h" #include "qemu/queue.h" #include <elf.h> #include <endian.h> @@ -88,6 +89,7 @@ #include <linux/kd.h> #include <linux/mtio.h> #include <linux/fs.h> +#include <linux/fd.h> #if defined(CONFIG_FIEMAP) #include <linux/fiemap.h> #endif @@ -11847,7 +11849,6 @@ static abi_long do_syscall1(void *cpu_env, int num, abi_long arg1, timer_t htimer = g_posix_timers[timerid]; ret = get_errno(timer_getoverrun(htimer)); } - fd_trans_unregister(ret); return ret; } #endif @@ -11939,6 +11940,17 @@ static abi_long do_syscall1(void *cpu_env, int num, abi_long arg1, /* PowerPC specific. */ return do_swapcontext(cpu_env, arg1, arg2, arg3); #endif +#ifdef TARGET_NR_memfd_create + case TARGET_NR_memfd_create: + p = lock_user_string(arg1); + if (!p) { + return -TARGET_EFAULT; + } + ret = get_errno(memfd_create(p, arg2)); + fd_trans_unregister(ret); + unlock_user(p, arg1, 0); + return ret; +#endif default: qemu_log_mask(LOG_UNIMP, "Unsupported syscall: %d\n", num); |