* [PULL 1/5] linux-user: Support F_ADD_SEALS and F_GET_SEALS fcntls
2021-01-20 19:53 [PULL 0/5] Linux user for 6.0 patches Laurent Vivier
@ 2021-01-20 19:53 ` Laurent Vivier
2021-01-20 19:53 ` [PULL 2/5] linux-user: add missing UDP get/setsockopt option Laurent Vivier
` (4 subsequent siblings)
5 siblings, 0 replies; 17+ messages in thread
From: Laurent Vivier @ 2021-01-20 19:53 UTC (permalink / raw)
To: qemu-devel; +Cc: Laurent Vivier, Shu-Chun Weng
From: Shu-Chun Weng <scw@google.com>
Also reorder blocks so that they are all in the same order everywhere.
Signed-off-by: Shu-Chun Weng <scw@google.com>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Message-Id: <20201218193213.3566856-2-scw@google.com>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
linux-user/strace.c | 39 ++++++++++++++++++++++++++++++++-------
linux-user/syscall.c | 10 ++++++++++
linux-user/syscall_defs.h | 14 ++++++++------
3 files changed, 50 insertions(+), 13 deletions(-)
diff --git a/linux-user/strace.c b/linux-user/strace.c
index e00275fcb51b..227812c07e63 100644
--- a/linux-user/strace.c
+++ b/linux-user/strace.c
@@ -2066,11 +2066,34 @@ print_fcntl(void *cpu_env, const struct syscallname *name,
break;
case TARGET_F_SETLEASE:
qemu_log("F_SETLEASE,");
- print_raw_param(TARGET_ABI_FMT_ld, arg2, 0);
+ print_raw_param(TARGET_ABI_FMT_ld, arg2, 1);
break;
case TARGET_F_GETLEASE:
qemu_log("F_GETLEASE");
break;
+#ifdef F_DUPFD_CLOEXEC
+ case TARGET_F_DUPFD_CLOEXEC:
+ qemu_log("F_DUPFD_CLOEXEC,");
+ print_raw_param(TARGET_ABI_FMT_ld, arg2, 1);
+ break;
+#endif
+ case TARGET_F_NOTIFY:
+ qemu_log("F_NOTIFY,");
+ print_raw_param(TARGET_ABI_FMT_ld, arg2, 1);
+ break;
+#ifdef F_GETOWN_EX
+ case TARGET_F_GETOWN_EX:
+ qemu_log("F_GETOWN_EX,");
+ print_pointer(arg2, 1);
+ break;
+#endif
+#ifdef F_SETOWN_EX
+ case TARGET_F_SETOWN_EX:
+ qemu_log("F_SETOWN_EX,");
+ print_pointer(arg2, 1);
+ break;
+#endif
+#ifdef F_SETPIPE_SZ
case TARGET_F_SETPIPE_SZ:
qemu_log("F_SETPIPE_SZ,");
print_raw_param(TARGET_ABI_FMT_ld, arg2, 1);
@@ -2078,14 +2101,16 @@ print_fcntl(void *cpu_env, const struct syscallname *name,
case TARGET_F_GETPIPE_SZ:
qemu_log("F_GETPIPE_SZ");
break;
- case TARGET_F_DUPFD_CLOEXEC:
- qemu_log("F_DUPFD_CLOEXEC,");
- print_raw_param(TARGET_ABI_FMT_ld, arg2, 1);
+#endif
+#ifdef F_ADD_SEALS
+ case TARGET_F_ADD_SEALS:
+ qemu_log("F_ADD_SEALS,");
+ print_raw_param("0x"TARGET_ABI_FMT_lx, arg2, 1);
break;
- case TARGET_F_NOTIFY:
- qemu_log("F_NOTIFY,");
- print_raw_param(TARGET_ABI_FMT_ld, arg2, 0);
+ case TARGET_F_GET_SEALS:
+ qemu_log("F_GET_SEALS");
break;
+#endif
default:
print_raw_param(TARGET_ABI_FMT_ld, arg1, 0);
print_pointer(arg2, 1);
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index d182890ff04a..98aaca01872f 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -6639,6 +6639,14 @@ static int target_to_host_fcntl_cmd(int cmd)
case TARGET_F_GETPIPE_SZ:
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;
@@ -6931,6 +6939,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;
diff --git a/linux-user/syscall_defs.h b/linux-user/syscall_defs.h
index a00bfc2647c7..f98c1c1c8de4 100644
--- a/linux-user/syscall_defs.h
+++ b/linux-user/syscall_defs.h
@@ -2408,12 +2408,14 @@ struct target_statfs64 {
#endif
#define TARGET_F_LINUX_SPECIFIC_BASE 1024
-#define TARGET_F_SETLEASE (TARGET_F_LINUX_SPECIFIC_BASE + 0)
-#define TARGET_F_GETLEASE (TARGET_F_LINUX_SPECIFIC_BASE + 1)
-#define TARGET_F_DUPFD_CLOEXEC (TARGET_F_LINUX_SPECIFIC_BASE + 6)
-#define TARGET_F_SETPIPE_SZ (TARGET_F_LINUX_SPECIFIC_BASE + 7)
-#define TARGET_F_GETPIPE_SZ (TARGET_F_LINUX_SPECIFIC_BASE + 8)
-#define TARGET_F_NOTIFY (TARGET_F_LINUX_SPECIFIC_BASE+2)
+#define TARGET_F_SETLEASE (TARGET_F_LINUX_SPECIFIC_BASE + 0)
+#define TARGET_F_GETLEASE (TARGET_F_LINUX_SPECIFIC_BASE + 1)
+#define TARGET_F_DUPFD_CLOEXEC (TARGET_F_LINUX_SPECIFIC_BASE + 6)
+#define TARGET_F_NOTIFY (TARGET_F_LINUX_SPECIFIC_BASE + 2)
+#define TARGET_F_SETPIPE_SZ (TARGET_F_LINUX_SPECIFIC_BASE + 7)
+#define TARGET_F_GETPIPE_SZ (TARGET_F_LINUX_SPECIFIC_BASE + 8)
+#define TARGET_F_ADD_SEALS (TARGET_F_LINUX_SPECIFIC_BASE + 9)
+#define TARGET_F_GET_SEALS (TARGET_F_LINUX_SPECIFIC_BASE + 10)
#include "target_fcntl.h"
--
2.29.2
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PULL 2/5] linux-user: add missing UDP get/setsockopt option
2021-01-20 19:53 [PULL 0/5] Linux user for 6.0 patches Laurent Vivier
2021-01-20 19:53 ` [PULL 1/5] linux-user: Support F_ADD_SEALS and F_GET_SEALS fcntls Laurent Vivier
@ 2021-01-20 19:53 ` Laurent Vivier
2021-01-20 19:53 ` [PULL 3/5] linux-user: add missing IPv6 " Laurent Vivier
` (3 subsequent siblings)
5 siblings, 0 replies; 17+ messages in thread
From: Laurent Vivier @ 2021-01-20 19:53 UTC (permalink / raw)
To: qemu-devel; +Cc: Laurent Vivier, Shu-Chun Weng
From: Shu-Chun Weng <scw@google.com>
SOL_UDP manipulate options at UDP level. All six options currently defined
in linux source include/uapi/linux/udp.h take integer values.
Signed-off-by: Shu-Chun Weng <scw@google.com>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Message-Id: <20201218193213.3566856-3-scw@google.com>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
linux-user/strace.c | 6 ++++++
linux-user/syscall.c | 7 +++++--
2 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/linux-user/strace.c b/linux-user/strace.c
index 227812c07e63..64172de99d98 100644
--- a/linux-user/strace.c
+++ b/linux-user/strace.c
@@ -7,6 +7,7 @@
#include <sys/mount.h>
#include <arpa/inet.h>
#include <netinet/tcp.h>
+#include <netinet/udp.h>
#include <linux/if_packet.h>
#include <linux/netlink.h>
#include <sched.h>
@@ -2644,6 +2645,11 @@ static void do_print_sockopt(const char *name, abi_long arg1)
print_raw_param(TARGET_ABI_FMT_ld, optname, 0);
print_pointer(optval, 0);
break;
+ case SOL_UDP:
+ qemu_log("SOL_UDP,");
+ print_raw_param(TARGET_ABI_FMT_ld, optname, 0);
+ print_pointer(optval, 0);
+ break;
case SOL_IP:
qemu_log("SOL_IP,");
print_raw_param(TARGET_ABI_FMT_ld, optname, 0);
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index 98aaca01872f..969db2008104 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -53,6 +53,7 @@
//#include <sys/user.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>
@@ -2184,7 +2185,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;
@@ -2832,7 +2834,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;
--
2.29.2
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PULL 3/5] linux-user: add missing IPv6 get/setsockopt option
2021-01-20 19:53 [PULL 0/5] Linux user for 6.0 patches Laurent Vivier
2021-01-20 19:53 ` [PULL 1/5] linux-user: Support F_ADD_SEALS and F_GET_SEALS fcntls Laurent Vivier
2021-01-20 19:53 ` [PULL 2/5] linux-user: add missing UDP get/setsockopt option Laurent Vivier
@ 2021-01-20 19:53 ` Laurent Vivier
2021-01-20 19:53 ` [PULL 4/5] linux-user: Add IPv6 options to do_print_sockopt() Laurent Vivier
` (2 subsequent siblings)
5 siblings, 0 replies; 17+ messages in thread
From: Laurent Vivier @ 2021-01-20 19:53 UTC (permalink / raw)
To: qemu-devel; +Cc: Philippe Mathieu-Daudé, Laurent Vivier, Shu-Chun Weng
From: Shu-Chun Weng <scw@google.com>
IPV6_ADDR_PREFERENCES (RFC5014: Source address selection) was not supported.
Signed-off-by: Shu-Chun Weng <scw@google.com>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Message-Id: <20201218193213.3566856-4-scw@google.com>
[PMD: Add missing <linux/in6.h> include for IPV6_ADDR_PREFERENCES]
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
linux-user/syscall.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index 969db2008104..5d482dcbefd6 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -51,6 +51,7 @@
#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>
@@ -58,6 +59,7 @@
#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
@@ -2272,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
@@ -2926,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
--
2.29.2
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PULL 4/5] linux-user: Add IPv6 options to do_print_sockopt()
2021-01-20 19:53 [PULL 0/5] Linux user for 6.0 patches Laurent Vivier
` (2 preceding siblings ...)
2021-01-20 19:53 ` [PULL 3/5] linux-user: add missing IPv6 " Laurent Vivier
@ 2021-01-20 19:53 ` Laurent Vivier
2021-01-20 19:53 ` [PULL 5/5] linux-user: Remove obsolete F_SHLCK and F_EXLCK translation Laurent Vivier
2021-01-21 10:44 ` [PULL 0/5] Linux user for 6.0 patches Peter Maydell
5 siblings, 0 replies; 17+ messages in thread
From: Laurent Vivier @ 2021-01-20 19:53 UTC (permalink / raw)
To: qemu-devel; +Cc: Laurent Vivier, Shu-Chun Weng
From: Shu-Chun Weng <scw@google.com>
Signed-off-by: Shu-Chun Weng <scw@google.com>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Message-Id: <20201218193213.3566856-5-scw@google.com>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
linux-user/strace.c | 108 ++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 108 insertions(+)
diff --git a/linux-user/strace.c b/linux-user/strace.c
index 64172de99d98..bc3bb6b2f949 100644
--- a/linux-user/strace.c
+++ b/linux-user/strace.c
@@ -6,6 +6,7 @@
#include <sys/select.h>
#include <sys/mount.h>
#include <arpa/inet.h>
+#include <netinet/in.h>
#include <netinet/tcp.h>
#include <netinet/udp.h>
#include <linux/if_packet.h>
@@ -2761,6 +2762,113 @@ print_optint:
break;
}
break;
+ case SOL_IPV6:
+ qemu_log("SOL_IPV6,");
+ switch (optname) {
+ case IPV6_MTU_DISCOVER:
+ qemu_log("IPV6_MTU_DISCOVER,");
+ goto print_optint;
+ case IPV6_MTU:
+ qemu_log("IPV6_MTU,");
+ goto print_optint;
+ case IPV6_V6ONLY:
+ qemu_log("IPV6_V6ONLY,");
+ goto print_optint;
+ case IPV6_RECVPKTINFO:
+ qemu_log("IPV6_RECVPKTINFO,");
+ goto print_optint;
+ case IPV6_UNICAST_HOPS:
+ qemu_log("IPV6_UNICAST_HOPS,");
+ goto print_optint;
+ case IPV6_MULTICAST_HOPS:
+ qemu_log("IPV6_MULTICAST_HOPS,");
+ goto print_optint;
+ case IPV6_MULTICAST_LOOP:
+ qemu_log("IPV6_MULTICAST_LOOP,");
+ goto print_optint;
+ case IPV6_RECVERR:
+ qemu_log("IPV6_RECVERR,");
+ goto print_optint;
+ case IPV6_RECVHOPLIMIT:
+ qemu_log("IPV6_RECVHOPLIMIT,");
+ goto print_optint;
+ case IPV6_2292HOPLIMIT:
+ qemu_log("IPV6_2292HOPLIMIT,");
+ goto print_optint;
+ case IPV6_CHECKSUM:
+ qemu_log("IPV6_CHECKSUM,");
+ goto print_optint;
+ case IPV6_ADDRFORM:
+ qemu_log("IPV6_ADDRFORM,");
+ goto print_optint;
+ case IPV6_2292PKTINFO:
+ qemu_log("IPV6_2292PKTINFO,");
+ goto print_optint;
+ case IPV6_RECVTCLASS:
+ qemu_log("IPV6_RECVTCLASS,");
+ goto print_optint;
+ case IPV6_RECVRTHDR:
+ qemu_log("IPV6_RECVRTHDR,");
+ goto print_optint;
+ case IPV6_2292RTHDR:
+ qemu_log("IPV6_2292RTHDR,");
+ goto print_optint;
+ case IPV6_RECVHOPOPTS:
+ qemu_log("IPV6_RECVHOPOPTS,");
+ goto print_optint;
+ case IPV6_2292HOPOPTS:
+ qemu_log("IPV6_2292HOPOPTS,");
+ goto print_optint;
+ case IPV6_RECVDSTOPTS:
+ qemu_log("IPV6_RECVDSTOPTS,");
+ goto print_optint;
+ case IPV6_2292DSTOPTS:
+ qemu_log("IPV6_2292DSTOPTS,");
+ goto print_optint;
+ case IPV6_TCLASS:
+ qemu_log("IPV6_TCLASS,");
+ goto print_optint;
+ case IPV6_ADDR_PREFERENCES:
+ qemu_log("IPV6_ADDR_PREFERENCES,");
+ goto print_optint;
+#ifdef IPV6_RECVPATHMTU
+ case IPV6_RECVPATHMTU:
+ qemu_log("IPV6_RECVPATHMTU,");
+ goto print_optint;
+#endif
+#ifdef IPV6_TRANSPARENT
+ case IPV6_TRANSPARENT:
+ qemu_log("IPV6_TRANSPARENT,");
+ goto print_optint;
+#endif
+#ifdef IPV6_FREEBIND
+ case IPV6_FREEBIND:
+ qemu_log("IPV6_FREEBIND,");
+ goto print_optint;
+#endif
+#ifdef IPV6_RECVORIGDSTADDR
+ case IPV6_RECVORIGDSTADDR:
+ qemu_log("IPV6_RECVORIGDSTADDR,");
+ goto print_optint;
+#endif
+ case IPV6_PKTINFO:
+ qemu_log("IPV6_PKTINFO,");
+ print_pointer(optval, 0);
+ break;
+ case IPV6_ADD_MEMBERSHIP:
+ qemu_log("IPV6_ADD_MEMBERSHIP,");
+ print_pointer(optval, 0);
+ break;
+ case IPV6_DROP_MEMBERSHIP:
+ qemu_log("IPV6_DROP_MEMBERSHIP,");
+ print_pointer(optval, 0);
+ break;
+ default:
+ print_raw_param(TARGET_ABI_FMT_ld, optname, 0);
+ print_pointer(optval, 0);
+ break;
+ }
+ break;
default:
print_raw_param(TARGET_ABI_FMT_ld, level, 0);
print_raw_param(TARGET_ABI_FMT_ld, optname, 0);
--
2.29.2
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PULL 5/5] linux-user: Remove obsolete F_SHLCK and F_EXLCK translation
2021-01-20 19:53 [PULL 0/5] Linux user for 6.0 patches Laurent Vivier
` (3 preceding siblings ...)
2021-01-20 19:53 ` [PULL 4/5] linux-user: Add IPv6 options to do_print_sockopt() Laurent Vivier
@ 2021-01-20 19:53 ` Laurent Vivier
2021-01-21 10:44 ` [PULL 0/5] Linux user for 6.0 patches Peter Maydell
5 siblings, 0 replies; 17+ messages in thread
From: Laurent Vivier @ 2021-01-20 19:53 UTC (permalink / raw)
To: qemu-devel; +Cc: Laurent Vivier, Michael Forney
From: Michael Forney <mforney@mforney.org>
These lock types are unsupported by Linux since v2.2[0][1] and
always return EINVAL (except on SPARC up until v2.6, which just
warned).
musl libc does not define these constants, so just remove them from
the translation cases.
[0] https://github.com/mpe/linux-fullhistory/blob/v2.2.0/fs/locks.c#L322-L324
[1] https://github.com/mpe/linux-fullhistory/blob/v2.2.0/fs/locks.c#L429-L445
Signed-off-by: Michael Forney <mforney@mforney.org>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Message-Id: <20210114223602.9004-1-mforney@mforney.org>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
linux-user/alpha/target_fcntl.h | 2 --
linux-user/generic/fcntl.h | 5 -----
linux-user/syscall.c | 2 --
3 files changed, 9 deletions(-)
diff --git a/linux-user/alpha/target_fcntl.h b/linux-user/alpha/target_fcntl.h
index 2617e73472b7..e16ed1d4157f 100644
--- a/linux-user/alpha/target_fcntl.h
+++ b/linux-user/alpha/target_fcntl.h
@@ -33,8 +33,6 @@
#define TARGET_F_RDLCK 1
#define TARGET_F_WRLCK 2
#define TARGET_F_UNLCK 8
-#define TARGET_F_EXLCK 16
-#define TARGET_F_SHLCK 32
#include "../generic/fcntl.h"
#endif
diff --git a/linux-user/generic/fcntl.h b/linux-user/generic/fcntl.h
index c85c5b9fed65..4568d1f42bdd 100644
--- a/linux-user/generic/fcntl.h
+++ b/linux-user/generic/fcntl.h
@@ -119,11 +119,6 @@ struct target_f_owner_ex {
#define TARGET_F_UNLCK 2
#endif
-#ifndef TARGET_F_EXLCK
-#define TARGET_F_EXLCK 4
-#define TARGET_F_SHLCK 8
-#endif
-
#ifndef TARGET_HAVE_ARCH_STRUCT_FLOCK
#ifndef TARGET_ARCH_FLOCK_PAD
#define TARGET_ARCH_FLOCK_PAD
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index 5d482dcbefd6..34760779c8ec 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -6679,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)
--
2.29.2
^ permalink raw reply related [flat|nested] 17+ messages in thread
* Re: [PULL 0/5] Linux user for 6.0 patches
2021-01-20 19:53 [PULL 0/5] Linux user for 6.0 patches Laurent Vivier
` (4 preceding siblings ...)
2021-01-20 19:53 ` [PULL 5/5] linux-user: Remove obsolete F_SHLCK and F_EXLCK translation Laurent Vivier
@ 2021-01-21 10:44 ` Peter Maydell
2021-01-21 11:07 ` Laurent Vivier
5 siblings, 1 reply; 17+ messages in thread
From: Peter Maydell @ 2021-01-21 10:44 UTC (permalink / raw)
To: Laurent Vivier; +Cc: QEMU Developers
On Wed, 20 Jan 2021 at 19:56, Laurent Vivier <laurent@vivier.eu> wrote:
>
> The following changes since commit 48202c712412c803ddb56365c7bca322aa4e7506:
>
> Merge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-2021011=
> 9-1' into staging (2021-01-19 15:47:23 +0000)
>
> are available in the Git repository at:
>
> git://github.com/vivier/qemu.git tags/linux-user-for-6.0-pull-request
>
> for you to fetch changes up to 8a7e49050b8d5477a567b0ec5d764a564481abdb:
>
> linux-user: Remove obsolete F_SHLCK and F_EXLCK translation (2021-01-20 18:=
> 26:46 +0100)
>
> ----------------------------------------------------------------
> linux-user pull request 20210119-v2
>
> Remove obsolete F_SHLCK and F_EXLCK translation
> Update sockopt
> Add F_ADD_SEALS and F_GET_SEALS
>
Now fails with:
../../linux-user/strace.c: In function ‘do_print_sockopt’:
../../linux-user/strace.c:2831:14: error: ‘IPV6_ADDR_PREFERENCES’
undeclared (first use in this function)
case IPV6_ADDR_PREFERENCES:
^
thanks
-- PMM
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PULL 0/5] Linux user for 6.0 patches
2021-01-21 10:44 ` [PULL 0/5] Linux user for 6.0 patches Peter Maydell
@ 2021-01-21 11:07 ` Laurent Vivier
2021-01-21 11:38 ` Philippe Mathieu-Daudé
0 siblings, 1 reply; 17+ messages in thread
From: Laurent Vivier @ 2021-01-21 11:07 UTC (permalink / raw)
To: Peter Maydell; +Cc: QEMU Developers
Le 21/01/2021 à 11:44, Peter Maydell a écrit :
> On Wed, 20 Jan 2021 at 19:56, Laurent Vivier <laurent@vivier.eu> wrote:
>>
>> The following changes since commit 48202c712412c803ddb56365c7bca322aa4e7506:
>>
>> Merge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-2021011=
>> 9-1' into staging (2021-01-19 15:47:23 +0000)
>>
>> are available in the Git repository at:
>>
>> git://github.com/vivier/qemu.git tags/linux-user-for-6.0-pull-request
>>
>> for you to fetch changes up to 8a7e49050b8d5477a567b0ec5d764a564481abdb:
>>
>> linux-user: Remove obsolete F_SHLCK and F_EXLCK translation (2021-01-20 18:=
>> 26:46 +0100)
>>
>> ----------------------------------------------------------------
>> linux-user pull request 20210119-v2
>>
>> Remove obsolete F_SHLCK and F_EXLCK translation
>> Update sockopt
>> Add F_ADD_SEALS and F_GET_SEALS
>>
> Now fails with:
>
> ../../linux-user/strace.c: In function ‘do_print_sockopt’:
> ../../linux-user/strace.c:2831:14: error: ‘IPV6_ADDR_PREFERENCES’
> undeclared (first use in this function)
> case IPV6_ADDR_PREFERENCES:
Probably the same cause, in a different file.
This should fix the problem.
diff --git a/linux-user/strace.c b/linux-user/strace.c
index bc3bb6b2f949..7b43668b9b0e 100644
--- a/linux-user/strace.c
+++ b/linux-user/strace.c
@@ -11,6 +11,7 @@
#include <netinet/udp.h>
#include <linux/if_packet.h>
#include <linux/netlink.h>
+#include <linux/in6.h>
#include <sched.h>
#include "qemu.h"
I will try to reproduce it before re-sending the PR.
Thanks,
Laurent
^ permalink raw reply related [flat|nested] 17+ messages in thread
* Re: [PULL 0/5] Linux user for 6.0 patches
2021-01-21 11:07 ` Laurent Vivier
@ 2021-01-21 11:38 ` Philippe Mathieu-Daudé
2021-01-21 11:43 ` Philippe Mathieu-Daudé
0 siblings, 1 reply; 17+ messages in thread
From: Philippe Mathieu-Daudé @ 2021-01-21 11:38 UTC (permalink / raw)
To: Laurent Vivier, Peter Maydell; +Cc: QEMU Developers
On 1/21/21 12:07 PM, Laurent Vivier wrote:
> Le 21/01/2021 à 11:44, Peter Maydell a écrit :
>> On Wed, 20 Jan 2021 at 19:56, Laurent Vivier <laurent@vivier.eu> wrote:
>>>
>>> The following changes since commit 48202c712412c803ddb56365c7bca322aa4e7506:
>>>
>>> Merge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-2021011=
>>> 9-1' into staging (2021-01-19 15:47:23 +0000)
>>>
>>> are available in the Git repository at:
>>>
>>> git://github.com/vivier/qemu.git tags/linux-user-for-6.0-pull-request
>>>
>>> for you to fetch changes up to 8a7e49050b8d5477a567b0ec5d764a564481abdb:
>>>
>>> linux-user: Remove obsolete F_SHLCK and F_EXLCK translation (2021-01-20 18:=
>>> 26:46 +0100)
>>>
>>> ----------------------------------------------------------------
>>> linux-user pull request 20210119-v2
>>>
>>> Remove obsolete F_SHLCK and F_EXLCK translation
>>> Update sockopt
>>> Add F_ADD_SEALS and F_GET_SEALS
>>>
>> Now fails with:
>>
>> ../../linux-user/strace.c: In function ‘do_print_sockopt’:
>> ../../linux-user/strace.c:2831:14: error: ‘IPV6_ADDR_PREFERENCES’
>> undeclared (first use in this function)
>> case IPV6_ADDR_PREFERENCES:
I checked on CentOS7 and this part isn't compiled because
TARGET_NR_socketcall is not defined, but I only build the
x86_64-linux-user target there.
>
> Probably the same cause, in a different file.
>
> This should fix the problem.
>
> diff --git a/linux-user/strace.c b/linux-user/strace.c
> index bc3bb6b2f949..7b43668b9b0e 100644
> --- a/linux-user/strace.c
> +++ b/linux-user/strace.c
> @@ -11,6 +11,7 @@
> #include <netinet/udp.h>
> #include <linux/if_packet.h>
> #include <linux/netlink.h>
> +#include <linux/in6.h>
> #include <sched.h>
> #include "qemu.h"
Sounds good.
>
> I will try to reproduce it before re-sending the PR.
>
> Thanks,
> Laurent
>
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PULL 0/5] Linux user for 6.0 patches
2021-01-21 11:38 ` Philippe Mathieu-Daudé
@ 2021-01-21 11:43 ` Philippe Mathieu-Daudé
0 siblings, 0 replies; 17+ messages in thread
From: Philippe Mathieu-Daudé @ 2021-01-21 11:43 UTC (permalink / raw)
To: Laurent Vivier, Peter Maydell; +Cc: QEMU Developers
On 1/21/21 12:38 PM, Philippe Mathieu-Daudé wrote:
> On 1/21/21 12:07 PM, Laurent Vivier wrote:
>> Le 21/01/2021 à 11:44, Peter Maydell a écrit :
>>> On Wed, 20 Jan 2021 at 19:56, Laurent Vivier <laurent@vivier.eu> wrote:
>>>>
>>>> The following changes since commit 48202c712412c803ddb56365c7bca322aa4e7506:
>>>>
>>>> Merge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-2021011=
>>>> 9-1' into staging (2021-01-19 15:47:23 +0000)
>>>>
>>>> are available in the Git repository at:
>>>>
>>>> git://github.com/vivier/qemu.git tags/linux-user-for-6.0-pull-request
>>>>
>>>> for you to fetch changes up to 8a7e49050b8d5477a567b0ec5d764a564481abdb:
>>>>
>>>> linux-user: Remove obsolete F_SHLCK and F_EXLCK translation (2021-01-20 18:=
>>>> 26:46 +0100)
>>>>
>>>> ----------------------------------------------------------------
>>>> linux-user pull request 20210119-v2
>>>>
>>>> Remove obsolete F_SHLCK and F_EXLCK translation
>>>> Update sockopt
>>>> Add F_ADD_SEALS and F_GET_SEALS
>>>>
>>> Now fails with:
>>>
>>> ../../linux-user/strace.c: In function ‘do_print_sockopt’:
>>> ../../linux-user/strace.c:2831:14: error: ‘IPV6_ADDR_PREFERENCES’
>>> undeclared (first use in this function)
>>> case IPV6_ADDR_PREFERENCES:
I could reproduce building qemu-ppc64 (--target-list=ppc64-linux-user).
> I checked on CentOS7 and this part isn't compiled because
> TARGET_NR_socketcall is not defined, but I only build the
> x86_64-linux-user target there.
>
>>
>> Probably the same cause, in a different file.
>>
>> This should fix the problem.
>>
>> diff --git a/linux-user/strace.c b/linux-user/strace.c
>> index bc3bb6b2f949..7b43668b9b0e 100644
>> --- a/linux-user/strace.c
>> +++ b/linux-user/strace.c
>> @@ -11,6 +11,7 @@
>> #include <netinet/udp.h>
>> #include <linux/if_packet.h>
>> #include <linux/netlink.h>
>> +#include <linux/in6.h>
This build with your fix:
Tested-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
>> #include <sched.h>
>> #include "qemu.h"
>
> Sounds good.
>
>>
>> I will try to reproduce it before re-sending the PR.
>>
>> Thanks,
>> Laurent
>>
>
>
^ permalink raw reply [flat|nested] 17+ messages in thread