The ioctl numeric values are platform-independent and determined by
the file include/uapi/linux/sockios.h in Linux kernel source code:
#define SIOCETHTOOL 0x8946
These ioctls get (or set) various structures pointed by the field
ifr_data in the structure ifreq depending on the first 4 bytes of
Flexible arrays may appear in the last field of a struct and are heavily
used in the ioctl(SIOCETHTOOL) system call on Linux. E.g.
struct ethtool_regs {
__u32 cmd;
__u32 version; /* driver-specific, indicates different chips/revs */
__u32 len; /* bytes */
__u8da
Hi Riku and Laurent,
These two patches together implements the SIOCETHTOOL ioctl operations. Many of
the kernel structures in this operations make use of flexible arrays (array with
no size / zero size at the end of the structure), so I extended thunk to handle
these fields natively.
This patch s
This change supports SO_TIMESTAMPNS_OLD/NEW and SO_TIMESTAMPING_OLD/NEW
for setsocketopt() with SOL_SOCKET. Based on the SO_TIMESTAMP_OLD/NEW
framework. The three pairs share the same flag `SOCK_TSTAMP_NEW` in
linux kernel for deciding if the old or the new format is used.
Signed-off-by: Shu-Chun
Both guest options map to host SO_TIMESTAMP while keeping a global bit to
remember if the guest expects the old or the new format. Don't support
programs mixing two formats.
Added a multiarch test to verify.
Signed-off-by: Shu-Chun Weng
---
v1 -> v2:
Only keep track of old or new format global
Hi Laurent,
This is the two timestamp-related patches splitted off per
https://lists.nongnu.org/archive/html/qemu-devel/2020-12/msg05149.html
v1 -> v2:
Address comments on the first 5 (was 3) patches.
Fix style problems.
v2 -> v3:
Split off into own group per
https://lists.nongnu.org/arc
Signed-off-by: Shu-Chun Weng
Reviewed-by: Laurent Vivier
---
v1 -> v2:
New: Add all IPV6 options to do_print_sockopt(), including the newly supported
IPV6_ADDR_PREFERENCES.
v2 -> v3:
Rebase to master on Dec 18, 2020
linux-user/strace.c | 108
IPV6_ADDR_PREFERENCES (RFC5014: Source address selection) was not supported.
Signed-off-by: Shu-Chun Weng
Reviewed-by: Laurent Vivier
---
v1 -> v2:
Split out IPV6 options into own patch.
do_print_sockopt() changes added in a separate patch since a large number of
unrelated changes are invo
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
Reviewed-by: Laurent Vivier
---
v1 -> v2:
Split out SOL_UDP into own patch.
Updated do_print_sockopt().
v2 -> v3:
Rebase to
Hi Laurent,
This is a series of 4 patches in 2 groups, putting into a single thread for
easier tracking.
[PATCH v3 1/4] linux-user: Support F_ADD_SEALS and F_GET_SEALS fcntls
An incidental follow up on
https://lists.nongnu.org/archive/html/qemu-devel/2019-09/msg01925.html
[PATCH v3 2/4] linu
Also reorder blocks so that they are all in the same order everywhere.
Signed-off-by: Shu-Chun Weng
---
v1 -> v2:
Updated print_fcntl().
v2 -> v3:
Rebase to master on Dec 18, 2020
linux-user/strace.c | 39 ---
linux-user/syscall.c | 10 +++
The three options handling `struct sock_fprog` (TUNATTACHFILTER,
TUNDETACHFILTER, and TUNGETFILTER) are not implemented. Linux kernel
keeps a user space pointer in them which we cannot correctly handle.
Signed-off-by: Josh Kunz
Signed-off-by: Shu-Chun Weng
---
v2->v3:
IOCTL_SPECIAL(TUNSETTXFIL
The three options handling `struct sock_fprog` (TUNATTACHFILTER,
TUNDETACHFILTER, and TUNGETFILTER) are not implemented. Linux kernel
keeps a user space pointer in them which we cannot correctly handle.
Signed-off-by: Josh Kunz
Signed-off-by: Shu-Chun Weng
---
v3:
IOCTL_SPECIAL(TUNSETTXFILTER)
Ping. Patchwork links:
http://patchwork.ozlabs.org/patch/1151884/
http://patchwork.ozlabs.org/patch/1151883/
On Thu, Aug 22, 2019 at 4:14 PM Shu-Chun Weng wrote:
> Shu-Chun Weng (2):
> linux-user: add missing UDP and IPv6 setsockopt options
> linux-user: time stamping options for setsockopt
Ping. Any comments on this? Patchwork:
http://patchwork.ozlabs.org/patch/1151167/
On Wed, Aug 21, 2019 at 1:19 PM Shu-Chun Weng wrote:
> Besides /proc/self|, files under /proc/thread-self and
> /proc/self|/task/ also expose host information to the guest
> program. This patch adds them to the hij
UDP: SOL_UDP manipulate options at UDP level. All six options currently
defined in linux source include/uapi/linux/udp.h take integer values.
IPv6: IPV6_ADDR_PREFERENCES (RFC5014: Source address selection) was not
supported.
Signed-off-by: Shu-Chun Weng
---
linux-user/syscall.c | 6 +-
1 fi
This change supports SO_TIMESTAMPNS and SO_TIMESTAMPING for
setsocketopt() with SOL_SOCKET.
The TARGET_SO_TIMESTAMP{NS,ING} constants are already defined for
alpha, hppa, and sparc. In include/uapi/asm-generic/socket.h:
In arch/mips/include/uapi/asm/socket.h:
Signed-off-by: Shu-Chun Weng
---
l
Shu-Chun Weng (2):
linux-user: add missing UDP and IPv6 setsockopt options
linux-user: time stamping options for setsockopt()
linux-user/generic/sockbits.h | 4
linux-user/mips/sockbits.h| 4
linux-user/syscall.c | 16 +---
3 files changed, 21 insertions(+
Besides /proc/self|, files under /proc/thread-self and
/proc/self|/task/ also expose host information to the guest
program. This patch adds them to the hijack infrastracture. Note that
is_proc_myself() does not check if the matches the current thread
and is thus only suitable for procfs files that
timer_getoverrun returns the "overrun count" for the timer, which is not
a file descriptor and thus should not call fd_trans_unregister on it.
Signed-off-by: Shu-Chun Weng
---
linux-user/syscall.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
inde
Add support for the memfd_create syscall. If the host does not have the
libc wrapper, translate to a direct syscall with NC-macro.
Buglink: https://bugs.launchpad.net/qemu/+bug/1734792
Signed-off-by: Shu-Chun Weng
---
include/qemu/memfd.h | 4
linux-user/syscall.c | 12
util/m
Add support for the memfd_create syscall. If the host does not have the
libc wrapper, translate to a direct syscall with NC-macro.
Buglink: https://bugs.launchpad.net/qemu/+bug/1734792
Signed-off-by: Shu-Chun Weng
---
include/qemu/memfd.h | 4
linux-user/syscall.c | 11 +++
util/me
The ioctl numeric values are platform-independent and determined by
the file include/uapi/linux/sockios.h in Linux kernel source code:
#define SIOCETHTOOL 0x8946
These ioctls get (or set) the field ifr_data of type char* in the
structure ifreq. Such functionality is achieved in QEMU by using
Shu-Chun
On Fri, Aug 16, 2019 at 3:37 PM Aleksandar Markovic <
aleksandar.m.m...@gmail.com> wrote:
>
> 16.08.2019. 23.28, "Shu-Chun Weng via Qemu-devel"
> је написао/ла:
> >
> > The ioctl numeric values are platform-independent and determined by
> >
Add support for the memfd_create syscall. If the host does not have the
libc wrapper, translate to a direct syscall with NC-macro.
Buglink: https://bugs.launchpad.net/qemu/+bug/1734792
Signed-off-by: Shu-Chun Weng
---
include/qemu/memfd.h | 4
linux-user/syscall.c | 11 +++
util/me
The ioctl numeric values are platform-independent and determined by
the file include/uapi/linux/sockios.h in Linux kernel source code:
#define SIOCETHTOOL 0x8946
These ioctls get (or set) the field ifr_data of type char* in the
structure ifreq. Such functionality is achieved in QEMU by using
26 matches
Mail list logo