diff options
author | Peter Maydell | 2021-01-22 11:35:55 +0100 |
---|---|---|
committer | Peter Maydell | 2021-01-22 11:35:55 +0100 |
commit | 0e32462630687a18039464511bd0447ada5709c3 (patch) | |
tree | 477352f4cdc67eef3b4f2c319f652c53b6351bd1 /linux-user/syscall.c | |
parent | Merge remote-tracking branch 'remotes/cohuck-gitlab/tags/s390x-20210121' into... (diff) | |
parent | linux-user: Remove obsolete F_SHLCK and F_EXLCK translation (diff) | |
download | qemu-0e32462630687a18039464511bd0447ada5709c3.tar.gz qemu-0e32462630687a18039464511bd0447ada5709c3.tar.xz qemu-0e32462630687a18039464511bd0447ada5709c3.zip |
Merge remote-tracking branch 'remotes/vivier2/tags/linux-user-for-6.0-pull-request' into staging
linux-user pull request 20210119-v3
Remove obsolete F_SHLCK and F_EXLCK translation
Update sockopt
Add F_ADD_SEALS and F_GET_SEALS
# gpg: Signature made Thu 21 Jan 2021 12:33:04 GMT
# 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-6.0-pull-request:
linux-user: Remove obsolete F_SHLCK and F_EXLCK translation
linux-user: Add IPv6 options to do_print_sockopt()
linux-user: add missing IPv6 get/setsockopt option
linux-user: add missing UDP get/setsockopt option
linux-user: Support F_ADD_SEALS and F_GET_SEALS fcntls
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'linux-user/syscall.c')
-rw-r--r-- | linux-user/syscall.c | 23 |
1 files changed, 19 insertions, 4 deletions
diff --git a/linux-user/syscall.c b/linux-user/syscall.c index d182890ff0..34760779c8 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -51,12 +51,15 @@ #include <sys/sysinfo.h> #include <sys/signalfd.h> //#include <sys/user.h> +#include <netinet/in.h> #include <netinet/ip.h> #include <netinet/tcp.h> +#include <netinet/udp.h> #include <linux/wireless.h> #include <linux/icmp.h> #include <linux/icmpv6.h> #include <linux/if_tun.h> +#include <linux/in6.h> #include <linux/errqueue.h> #include <linux/random.h> #ifdef CONFIG_TIMERFD @@ -2184,7 +2187,8 @@ static abi_long do_setsockopt(int sockfd, int level, int optname, switch(level) { case SOL_TCP: - /* TCP options all take an 'int' value. */ + case SOL_UDP: + /* TCP and UDP options all take an 'int' value. */ if (optlen < sizeof(uint32_t)) return -TARGET_EINVAL; @@ -2270,6 +2274,7 @@ static abi_long do_setsockopt(int sockfd, int level, int optname, case IPV6_RECVDSTOPTS: case IPV6_2292DSTOPTS: case IPV6_TCLASS: + case IPV6_ADDR_PREFERENCES: #ifdef IPV6_RECVPATHMTU case IPV6_RECVPATHMTU: #endif @@ -2832,7 +2837,8 @@ get_timeout: } break; case SOL_TCP: - /* TCP options all take an 'int' value. */ + case SOL_UDP: + /* TCP and UDP options all take an 'int' value. */ int_case: if (get_user_u32(len, optlen)) return -TARGET_EFAULT; @@ -2923,6 +2929,7 @@ get_timeout: case IPV6_RECVDSTOPTS: case IPV6_2292DSTOPTS: case IPV6_TCLASS: + case IPV6_ADDR_PREFERENCES: #ifdef IPV6_RECVPATHMTU case IPV6_RECVPATHMTU: #endif @@ -6640,6 +6647,14 @@ static int target_to_host_fcntl_cmd(int cmd) ret = F_GETPIPE_SZ; break; #endif +#ifdef F_ADD_SEALS + case TARGET_F_ADD_SEALS: + ret = F_ADD_SEALS; + break; + case TARGET_F_GET_SEALS: + ret = F_GET_SEALS; + break; +#endif default: ret = -TARGET_EINVAL; break; @@ -6664,8 +6679,6 @@ static int target_to_host_fcntl_cmd(int cmd) TRANSTBL_CONVERT(F_RDLCK); \ TRANSTBL_CONVERT(F_WRLCK); \ TRANSTBL_CONVERT(F_UNLCK); \ - TRANSTBL_CONVERT(F_EXLCK); \ - TRANSTBL_CONVERT(F_SHLCK); \ } static int target_to_host_flock(int type) @@ -6931,6 +6944,8 @@ static abi_long do_fcntl(int fd, int cmd, abi_ulong arg) case TARGET_F_GETLEASE: case TARGET_F_SETPIPE_SZ: case TARGET_F_GETPIPE_SZ: + case TARGET_F_ADD_SEALS: + case TARGET_F_GET_SEALS: ret = get_errno(safe_fcntl(fd, host_cmd, arg)); break; |