[PATCH v7 06/13] linux-user: Add support for read/clear RTC voltage low detector using ioctls

2020-01-15 Thread Filip Bozuta
, their implementation was straightforward. Signed-off-by: Filip Bozuta --- linux-user/ioctls.h | 2 ++ linux-user/syscall_defs.h | 2 ++ 2 files changed, 4 insertions(+) diff --git a/linux-user/ioctls.h b/linux-user/ioctls.h index 0a4e3f1..1f1f3e6 100644 --- a/linux-user/ioctls.h +++ b/linux-user

[PATCH v7 00/13] linux-user: Add support for real time clock and

2020-01-15 Thread Filip Bozuta
comprehensible v3: * changed two instances of MK_PTR(TYPE_ULONG) to TYPE_ULONG v2: * added description of each ioctl in patches * wrote a more detailed cover letter with description of testing * changed one instance of TYPE_INT to MK_PTR(TYPE_INT) Filip Bozuta (13): linux-user

[PATCH v8 07/13] linux-user: Add support for getting alsa timer version and id

2020-01-15 Thread Filip Bozuta
Signed-off-by: Filip Bozuta --- linux-user/ioctls.h| 4 linux-user/syscall.c | 1 + linux-user/syscall_defs.h | 5 + linux-user/syscall_types.h | 7 +++ 4 files changed, 17 insertions(+) diff --git a/linux-user/ioctls.h b/linux-user/ioctls.h index 1f1f3e6..ed1bd4c 100644 -

[PATCH v8 05/13] linux-user: Add support for getting/setting RTC PLL correction using ioctls

2020-01-15 Thread Filip Bozuta
are of type 'int', except the last one that is of type 'long'. That is the reason why a separate target structure (target_rtc_pll_info) is defined in linux-user/syscall_defs. The rest of the implementation is straightforward. Reviewed-by: Laurent Vivier Signed-off-by: Filip Bozuta --- linux

[PATCH 2/2] tests/tcg/multiarch: Add tests for implemented alsa sound timer ioctls

2020-01-20 Thread Filip Bozuta
at which test the program aborts. It was also modified so that it doesn't have styling problems detected by 'scripts/checkpatch.pl'. Signed-off-by: Filip Bozuta --- .../Disable/disableEnhancedRead.c | 29 .../EnhancedRead-test/Enable/enableEnhancedRead.c | 29 .

[PATCH 1/2] tests/tcg/multiarch: Add tests for implemented rtc ioctls

2020-01-20 Thread Filip Bozuta
roblems identified by "scripts/checkpatch.pl". It is used to further test functionalities of some rtc ioctls by running rtc clock at different frequencies. Signed-off-by: Filip Bozuta --- .../Alarm-time-test/ReadAlarm/getAlarm.c | 33 +++ .../Alarm-time-test/ReadTime/getTime.c

[PATCH 0/2] tests/tcg/multiarch: Add tests for implemented real

2020-01-20 Thread Filip Bozuta
global program that tests multiple ioctls at once. Individual tests were written manually while the global tests were obtained remotely and modified so that they fit the QEMU coding style. Filip Bozuta (2): tests/tcg/multiarch: Add tests for implemented rtc ioctls tests/tcg/multiarch: Add tests

[PATCH] linux-user: Protect btrfs ioctl target definitions

2020-09-05 Thread Filip Bozuta
the 'btrfs.h' header is available as to not cause build errors on older Linux systems. Signed-off-by: Filip Bozuta --- linux-user/syscall_defs.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/linux-user/syscall_defs.h b/linux-user/syscall_defs.h index 33a414c50f..731c3d5341 100644 --- a/linux-user

Re: [PULL 0/8] Linux user for 5.2 patches

2020-09-01 Thread Filip Bozuta
On 1.9.20. 15:06, Peter Maydell wrote: On Mon, 31 Aug 2020 at 12:08, Laurent Vivier wrote: The following changes since commit 39335fab59e11cfda9b7cf63929825db2dd3a3e0: Merge remote-tracking branch 'remotes/vivier2/tags/linux-user-for-5.2-pull-= request' into staging (2020-08-28 22:30:11

[PATCH v2 0/2] linux-user: Introducing support for 'recvmmsg_time64()'

2020-08-25 Thread Filip Bozuta
method: The implementation was tested using existing tests from the LTP test suite which was build inside a chroot. Filip Bozuta (2): linux-user: Modify 'recvmmsg()' implementation linux-user: Add support for 'recvmmsg_time64()' linux-user/syscall.c | 56

[PATCH v2 2/2] linux-user: Add support for 'recvmmsg_time64()'

2020-08-25 Thread Filip Bozuta
. Signed-off-by: Filip Bozuta --- linux-user/syscall.c | 27 +++ 1 file changed, 19 insertions(+), 8 deletions(-) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index dc89bfacca..762eea0e5b 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -3197,7

[PATCH v2 1/2] linux-user: Modify 'recvmmsg()' implementation

2020-08-25 Thread Filip Bozuta
notes: Function 'clock_gettime()' is used to check the time before messages start getting received. After each message is received, 'clock_gettime()' is called and used to check whether the timeout is expired. Signed-off-by: Filip Bozuta --- linux-user/syscall.c | 45

[PATCH v3] linux-user: Fix 'semop()' and 'semtimedop()' implementation

2020-08-18 Thread Filip Bozuta
as added for 'SEMOPM' as to be sure in case the value is not available for some targets. Signed-off-by: Filip Bozuta --- linux-user/syscall.c | 13 +++-- linux-user/syscall_defs.h | 2 ++ 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/linux-user/syscall.c b/linux-

Re: [PULL 00/14] Linux user for 5.2 patches

2020-08-21 Thread Filip Bozuta
Hello, On 21.8.20. 20:45, Laurent Vivier wrote: Filip, could you have a look to see what's going wrong? Thanks, LAurent Le 21/08/2020 à 18:23, Peter Maydell a écrit : On Thu, 13 Aug 2020 at 07:51, Laurent Vivier wrote: The following changes since commit

Re: [PATCH] linux-user: fix target_to_host_timespec64()

2020-08-27 Thread Filip Bozuta
On 27.8.20. 09:04, Laurent Vivier wrote: in 32 bit mode, drop the padding in tv_nsec. If host is 64bit and target is 32bit, the padding bytes will be copied from the target and as the kernel checks the value, the syscall exits with EINVAL. Signed-off-by: Laurent Vivier ---

[PATCH] linux-user: Add support for a group of '_V2' btrfs ioctls

2020-08-23 Thread Filip Bozuta
, a separate printing function was defined in file 'strace.c' that is called instead of 'thunk_print()' to print the contents of the third argument. Signed-off-by: Filip Bozuta Based-on: <20200811164553.27713-2-filip.boz...@syrmia.com> Based-on: <20200723210233.349690-4-

[PATCH v3 1/8] linux-user: Add support for a group of btrfs ioctls used for subvolumes

2020-08-23 Thread Filip Bozuta
eter CONFIG_BTRFS which is defined in 'configure' if the header file is present. Signed-off-by: Filip Bozuta --- configure | 9 + linux-user/ioctls.h| 15 +++ linux-user/syscall.c | 3 +++ linux-user/syscall_defs.h | 8 +++

[PATCH v3 6/8] linux-user: Add support for two btrfs ioctls used for subvolume

2020-08-23 Thread Filip Bozuta
. Implementation notes: Ioctl BTRFS_IOC_GET_SUBVOL_ROOTREF uses the above mentioned structure type as third argument. That is the reason why a aproppriate thunk structure definition is added in file 'syscall_types.h'. Signed-off-by: Filip Bozuta --- linux-user/ioctls.h| 7

[PATCH v3 3/8] linux-user: Add support for btrfs ioctls used to manipulate with devices

2020-08-23 Thread Filip Bozuta
-user/syscall_types.h'. Since the thunk type for 'struct ioc_vol_args' was already added in a previous patch, the rest of the implementation was straightforward. Signed-off-by: Filip Bozuta --- linux-user/ioctls.h| 24 linux-user/syscall_defs.h | 6 ++

[PATCH v3 5/8] linux-user: Add support for a group of btrfs inode ioctls

2020-08-23 Thread Filip Bozuta
and treeid of the subvolume. Implementation notes: All of the ioctls in this patch use structure types as third arguments. That is the reason why aproppriate thunk definitions were added in file 'syscall_types.h'. Signed-off-by: Filip Bozuta --- linux-user/ioctls.h| 20

[PATCH v3 8/8] linux-user: Add support for btrfs ioctls used to scrub a filesystem

2020-08-23 Thread Filip Bozuta
in file 'syscall_types.h'. Signed-off-by: Filip Bozuta --- linux-user/ioctls.h| 11 +++ linux-user/syscall_defs.h | 3 +++ linux-user/syscall_types.h | 29 + 3 files changed, 43 insertions(+) diff --git a/linux-user/ioctls.h b/linux-user/ioctls.h

[PATCH v3 2/8] linux-user: Add support for a group of btrfs ioctls used for snapshots

2020-08-23 Thread Filip Bozuta
for the file descriptor and path of the subvolume for which the snapshot is to be deleted. Implementation notes: Since the thunk type 'struct btrfs_ioctl_vol_args' is defined in the previous patch, the implementation for these ioctls was straightforward. Signed-off-by: Filip Bozuta --- linux

[PATCH v3 4/8] linux-user: Add support for btrfs ioctls used to get/set features

2020-08-23 Thread Filip Bozuta
represent flags that can be safely clearead. Implementation notes: All of the implemented ioctls use 'struct btrfs_ioctl_feature_flags' as third argument. That is the reason why a corresponding defintion was added in file 'linux-user/syscall_types.h'. Signed-off-by: Filip Bozuta ---

[PATCH v3 7/8] linux-user: Add support for btrfs ioctls used to manage quota

2020-08-23 Thread Filip Bozuta
thunk definitions were added in file 'syscall_types.h'. Signed-off-by: Filip Bozuta --- linux-user/ioctls.h| 27 +++ linux-user/syscall_defs.h | 7 +++ linux-user/syscall_types.h | 29 + 3 files changed, 63 insertions(+) diff

[PATCH v3 2/2] linux-user: Add support for 'rt_sigtimedwait_time64()' and 'sched_rr_get_interval_time64()'

2020-08-24 Thread Filip Bozuta
()' and 'host_to_target_timespec64()' were used to convert values of 'struct timespec' between host and target. Signed-off-by: Filip Bozuta Reviewed-by: Laurent Vivier --- linux-user/syscall.c | 53 1 file changed, 53 insertions(+) diff --git a/linux-user

[PATCH v3 0/2] Introducing functionality for a group of 4 time64 syscalls

2020-08-24 Thread Filip Bozuta
unnecesary pointer to timex structure 'phtx' Filip Bozuta (2): linux-user: Add support for 'clock_nanosleep_time64()' and 'clock_adjtime64()' linux-user: Add support for 'rt_sigtimedwait_time64()' and 'sched_rr_get_interval_time64()' linux-user/syscall.c | 190

[PATCH v3 1/2] linux-user: Add support for 'clock_nanosleep_time64()' and 'clock_adjtime64()'

2020-08-24 Thread Filip Bozuta
'copy_from_user_timveal64()' was added in this patch and used to convert the 'time' field from target to host. Signed-off-by: Filip Bozuta --- linux-user/syscall.c | 137 +- linux-user/syscall_defs.h | 31 + 2 files changed, 166 insertions(+), 2 deletions

[PATCH v3 0/8] linux-user: Adding support for a group of btrfs ioctls

2020-08-23 Thread Filip Bozuta
on values which are defined in 'btrfs.h'. Filip Bozuta (8): linux-user: Add support for a group of btrfs ioctls used for subvolumes linux-user: Add support for a group of btrfs ioctls used for snapshots linux-user: Add support for btrfs ioctls used to manipulate with devices linux-user

[PATCH v2 2/2] linux-user: Add support for utimensat_time64() and semtimedop_time64()

2020-08-24 Thread Filip Bozuta
argument: 'TARGET_ABI_BITS == 64'. Signed-off-by: Filip Bozuta Reviewed-by: Laurent Vivier --- linux-user/syscall.c | 60 1 file changed, 50 insertions(+), 10 deletions(-) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index fc6a6e32e4

[PATCH v2 0/2] linux-user: Adding support for a group of 4 time64 syscalls

2020-08-24 Thread Filip Bozuta
was tested using tests from the LTP test suite which was built inside a chroot. v2: -Moved code of 'ppoll()' and 'pselect6()' to a separate function -Changed 'time64' from 'int' to 'bool' Filip Bozuta (2): linux-user: Add support for ppoll_time64() and pselect6_time64() linux-user

[PATCH v2 1/2] linux-user: Add support for ppoll_time64() and pselect6_time64()

2020-08-24 Thread Filip Bozuta
time64' from which a right 'struct timespec' converting function is called. (target_to_host/host_to_target_timespec() for regular and target_to_host/host_to_target_timespec64() for time64 variants) Signed-off-by: Filip Bozuta --- linux-user/syscall.c | 462

[PATCH v3 2/2] linux-user: Add support for 'mq_timedsend_time64()' and 'mq_timedreceive_time64()'

2020-08-24 Thread Filip Bozuta
'mq_timedsend()' and 'mq_timedreceive' except that functions 'target_to_host_timespec64()' and 'host_to_target_timespec64()' were used to convert values of 'struct timespec' between host and target. Signed-off-by: Filip Bozuta Reviewed-by: Laurent Vivier --- linux-user/syscall.c

[PATCH v3 0/2] linux-user: Introducing functionality for two time64 syscalls

2020-08-24 Thread Filip Bozuta
: The implementation of the implemented syscalls was tested using recently added time64 test in the LTP test suite. v3: -Added an error check before converting back the value of 'struct timespec/timespec64' from host to target Filip Bozuta (2): linux-user: Fix 'mq_timedsend

[PATCH v3 1/2] linux-user: Fix 'mq_timedsend()' and 'mq_timedreceive()'

2020-08-24 Thread Filip Bozuta
: mq_timedsend() failed expectedly: EFAULT (14) mq_timedreceive01.c:180: PASS: mq_timedreceive() failed expectedly: EFAULT (14) (Patch with this new test case will be sent to LTP mailing list soon) Signed-off-by: Filip Bozuta --- linux-user/syscall.c | 16 1 file changed, 12 insertions(+), 4

[PATCH v2] linux-user: Fix 'semop()' and 'semtimedop()' implementation

2020-08-17 Thread Filip Bozuta
as added for 'SEMOPM' as to be sure in case the value is not available for some targets. Signed-off-by: Filip Bozuta --- linux-user/syscall.c | 12 ++-- linux-user/syscall_defs.h | 2 ++ 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/linux-user/syscall.c b/linux-

[PATCH 4/5] linux-user: Add strace support for printing arguments of chown()/lchown()

2020-06-02 Thread Filip Bozuta
From: Filip Bozuta This patch implements strace argument printing functionality for syscalls: *chown, lchown - change ownership of a file int chown(const char *pathname, uid_t owner, gid_t group) int lchown(const char *pathname, uid_t owner, gid_t group) man page

[PATCH 5/5] linux-user: Add strace support for printing arguments of fallocate()

2020-06-02 Thread Filip Bozuta
From: Filip Bozuta This patch implements strace argument printing functionality for following syscall: *fallocate - manipulate file space int fallocate(int fd, int mode, off_t offset, off_t len) man page: https://www.man7.org/linux/man-pages/man2/fallocate.2.html

Re: [PATCH 1/2] mailmap: Change email address of Filip Bozuta

2020-06-02 Thread Filip Bozuta
On 2.6.20. 10:52, Aleksandar Markovic wrote: > Filip Buzuta wants to use his new email address for his future > work in QEMU. > > CC: Filip Bozuta > Signed-off-by: Aleksandar Markovic Reviewed-by: Filip Bozuta > --- > .mailmap | 1 + > 1 file changed, 1 insertion(+) &

[PATCH 2/5] linux-user: Add strace support for printing argument of syscalls used for extend attributes

2020-06-02 Thread Filip Bozuta
From: Filip Bozuta This patch implements strace argument printing functionality for following syscalls: *getxattr, lgetxattr, fgetxattr - retrieve an extended attribute value ssize_t getxattr(const char *path, const char *name, void *value, size_t size) ssize_t lgetxattr

[PATCH 3/5] linux-user: Add strace support for printing arguments of lseek()

2020-06-02 Thread Filip Bozuta
From: Filip Bozuta This patch implements strace argument printing functionality for syscall: *lseek - reposition read/write file offset off_t lseek(int fd, off_t offset, int whence) man page: https://www.man7.org/linux/man-pages/man2/lseek.2.html Implementation notes

[PATCH 0/5] Add strace support for printing arguments of selected syscalls

2020-06-02 Thread Filip Bozuta
From: Filip Bozuta This series covers strace support for printing arguments of following syscalls: *acct() *lgetxattr()*lseek() *fsync()*fgetxattr()*chown() *fdatasync()*listxattr()*lchown() *listen() *llistxattr

[PATCH 1/5] linux-user: Add strace support for a group of syscalls

2020-06-02 Thread Filip Bozuta
From: Filip Bozuta This patch implements strace argument printing functionality for following syscalls: *acct - switch process accounting on or off int acct(const char *filename) man page: https://www.man7.org/linux/man-pages/man2/acct.2.html *fsync, fdatasync

[PATCH 2/2] linux-user: Add support for a group of 2038 safe syscalls

2020-07-22 Thread Filip Bozuta
to 'host_to_target_itimerspec()' and 'target_to_host_itimerspec()' the only difference being that 'target_to_host_timespec64()' and 'host_to_target_timespec64()' were used. Signed-off-by: Filip Bozuta --- linux-user/syscall.c | 132 ++- 1 file changed, 131

[PATCH 1/2] linux-user: Modify 'target_to_host/host_to_target_itimerspec()'

2020-07-22 Thread Filip Bozuta
to be implemented using already existing functions that convert 'struct timespec': 'target_to_host_timespec()' and 'host_to_target_timespec()'. This makes the code of 'target_to_host_itimerspec()' and 'host_to_target_itimerspec()' more clean and readable. Signed-off-by: Filip Bozuta --- linux-user

[PATCH 0/2] Adding support for a group of year 2038 safe syscalls

2020-07-22 Thread Filip Bozuta
of the implemented syscalls was tested using already existing tests from LTP test suite which was built inside chroot. Filip Bozuta (2): linux-user: Modify 'target_to_host/host_to_target_itimerspec()' linux-user: Add support for a group of 2038 safe syscalls linux-user/syscall.c | 166

[PATCH v2 2/8] linux-user: Add support for a group of btrfs ioctls used for snapshots

2020-08-03 Thread Filip Bozuta
for the file descriptor and path of the subvolume for which the snapshot is to be deleted. Implementation notes: Since the thunk type 'struct btrfs_ioctl_vol_args' is defined in the previous patch, the implementation for these ioctls was straightforward. Signed-off-by: Filip Bozuta Reviewed

[PATCH v2 3/8] linux-user: Add support for btrfs ioctls used to manipulate with devices

2020-08-03 Thread Filip Bozuta
-user/syscall_types.h'. Since the thunk type for 'struct ioc_vol_args' was already added in a previous patch, the rest of the implementation was straightforward. Signed-off-by: Filip Bozuta Reviewed-by: Laurent Vivier --- linux-user/ioctls.h| 24 linux-user/

[PATCH v2 1/8] linux-user: Add support for a group of btrfs ioctls used for subvolumes

2020-08-03 Thread Filip Bozuta
eter CONFIG_BTRFS which is defined in 'configure' if the header file is present. Signed-off-by: Filip Bozuta Reviewed-by: Laurent Vivier --- configure | 9 + linux-user/ioctls.h| 15 +++ linux-user/syscall.c | 3 +++ linux-user/syscall

[PATCH v2 0/8] linux-user: Adding support for a group of btrfs ioctls

2020-08-03 Thread Filip Bozuta
through QEMU and the results obtained were the same ones gotten for native execution. v2: * Merged two series in one 8 patch series * Changed target ioctl definitions from IOR/IOW/IOWR to IORU/IOWU/IOWRU * Fixed some thunk struct definitions Filip Bozuta (8): linux-user: Add

[PATCH v2 8/8] linux-user: Add support for btrfs ioctls used to scrub a filesystem

2020-08-03 Thread Filip Bozuta
in file 'syscall_types.h'. Signed-off-by: Filip Bozuta Reviewed-by: Laurent Vivier --- linux-user/ioctls.h| 11 +++ linux-user/syscall_defs.h | 3 +++ linux-user/syscall_types.h | 27 +++ 3 files changed, 41 insertions(+) diff --git a/linux-user

[PATCH v2 7/8] linux-user: Add support for btrfs ioctls used to manage quota

2020-08-03 Thread Filip Bozuta
thunk definitions were added in file 'syscall_types.h'. Signed-off-by: Filip Bozuta Reviewed-by: Laurent Vivier --- linux-user/ioctls.h| 27 +++ linux-user/syscall_defs.h | 7 +++ linux-user/syscall_types.h | 29 + 3 files

[PATCH v2 6/8] linux-user: Add support for two btrfs ioctls used for subvolume

2020-08-03 Thread Filip Bozuta
. Implementation notes: Ioctl BTRFS_IOC_GET_SUBVOL_ROOTREF uses the above mentioned structure type as third argument. That is the reason why a aproppriate thunk structure definition is added in file 'syscall_types.h'. Signed-off-by: Filip Bozuta Reviewed-by: Laurent Vivier --- linux-user

[PATCH v2 5/8] linux-user: Add support for a group of btrfs inode ioctls

2020-08-03 Thread Filip Bozuta
and treeid of the subvolume. Implementation notes: All of the ioctls in this patch use structure types as third arguments. That is the reason why aproppriate thunk definitions were added in file 'syscall_types.h'. Signed-off-by: Filip Bozuta --- linux-user/ioctls.h| 20

[PATCH v2 4/8] linux-user: Add support for btrfs ioctls used to get/set features

2020-08-03 Thread Filip Bozuta
represent flags that can be safely clearead. Implementation notes: All of the implemented ioctls use 'struct btrfs_ioctl_feature_flags' as third argument. That is the reason why a corresponding defintion was added in file 'linux-user/syscall_types.h'. Signed-off-by: Filip Bozuta

[PATCH v4 4/5] linux-user: Add an api to print enumareted argument values with strace

2020-08-11 Thread Filip Bozuta
with enumerated values to use this new api. Signed-off-by: Filip Bozuta Reviewed-by: Laurent Vivier --- linux-user/strace.c | 31 +++ 1 file changed, 31 insertions(+) diff --git a/linux-user/strace.c b/linux-user/strace.c index 40f863c6e2..def92c4d73 100644 --- a/linux

[PATCH v4 2/5] linux-user: Add strace support for printing arguments of truncate()/ftruncate() and getsid()

2020-08-11 Thread Filip Bozuta
nction "regpairs_aligned()" was cut & pasted from "syscall.c" to "qemu.h" as it is used by functions "print_truncate64()" and "print_ftruncate64()" to print the offset arguments of "truncate64()" and "ftruncate64()".

[PATCH v4 0/5] Add strace support for printing arguments for a group of selected syscalls

2020-08-11 Thread Filip Bozuta
the new 'print_syscall_err()' v4: * modified 'print_itimerval()' function in 'syscall.c' Filip Bozuta (5): linux-user: Make cpu_env accessible in strace.c linux-user: Add strace support for printing arguments of truncate()/ftruncate() and getsid() linux-user: Add strace support f

[PATCH v4 1/5] linux-user: Make cpu_env accessible in strace.c

2020-08-11 Thread Filip Bozuta
o, all defined "print_*" and "print_syscall_ret*" functions in "strace.c" were changed to have the new "void *cpu_env". This was done to not cause build errors (even though none of these functions use this argument). Signed-off-by: Filip Bozuta

[PATCH v4 3/5] linux-user: Add strace support for printing arguments of syscalls used to lock and unlock memory

2020-08-11 Thread Filip Bozuta
ypes, so the rest of the implementation was handled by stating an appropriate printing format in file "strace.list". Syscall mlock2() is not implemented in "syscall.c" and thus it's argument printing is not implemented in this patch. Signed-off-by: Filip Bozuta

[PATCH v4 5/5] linux-user: Add strace support for printing arguments of some clock and time functions

2020-08-11 Thread Filip Bozuta
ed a little so that it prints the field names beside the values. Syscalls "clock_getres()" and "clock_gettime()" have the same number and types of arguments and thus their print functions "print_clock_getres" and "print_clock_gettime" shar

[PATCH] linux-user: Fix 'semop()' and 'semtimedop()' implementation

2020-08-12 Thread Filip Bozuta
EMOPM' as to be sure in case the value is not available for some targets. Signed-off-by: Filip Bozuta --- linux-user/syscall.c | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 1211e759c2..4743a5bef2 100644 --- a/linux-

[PATCH 2/2] linux-user: Add support for 'utimensat_time64()' and 'semtimedop_time64()'

2020-08-12 Thread Filip Bozuta
argument: 'TARGET_ABI_BITS == 64'. Signed-off-by: Filip Bozuta --- linux-user/syscall.c | 55 1 file changed, 46 insertions(+), 9 deletions(-) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 8f63a46f58..44a13c5ec2 100644 --- a/linux

[PATCH 1/2] linux-user: Add support for 'ppoll_time64()' and 'pselect6_time64()'

2020-08-12 Thread Filip Bozuta
timespec' between target and host. (target_to_host/host_to_target_timespec() for regular and target_to_host/host_to_target_timespec64() for time64 variants) Signed-off-by: Filip Bozuta --- linux-user/syscall.c | 101 --- 1 file changed, 86 insertions

[PATCH 0/2] linux-user: Adding support for a group of 4 time64 syscalls

2020-08-12 Thread Filip Bozuta
was tested using tests from the LTP test suite which was built inside a chroot. Filip Bozuta (2): linux-user: Add support for ppoll_time64() and pselect6_time64() linux-user: Add support for utimensat_time64() and semtimedop_time64() linux-user/syscall.c | 154

Re: [PATCH 1/1] linux-user: Add support for SG_IO and SG_GET_VERSION_NUM raw SCSI ioctls

2020-07-31 Thread Filip Bozuta
On 30.7.20. 04:55, Leif N Huhn wrote: This patch implements functionalities of following ioctls: SG_GET_VERSION_NUM - Returns SG driver version number The sg version numbers are of the form "x.y.z" and the single number given by the SG_GET_VERSION_NUM ioctl() is calculated by

Re: [PATCH 0/1] linux-user: Add support for SG_IO and SG_GET_VERSION_NUM raw SCSI ioctls

2020-07-31 Thread Filip Bozuta
Hello Leif, On 30.7.20. 04:55, Leif N Huhn wrote: Hi. This is my first time trying to contribute to qemu. This patch works correctly for architectures with the same bit-width, for example 32bit arm host and i386 user binary. Here is an example with the sg_simple2 executable from

[PATCH 2/3] linux-user: Fix 'recvmmsg()' implementation

2020-07-31 Thread Filip Bozuta
. This argument is only passed in case of 'TARGET_NR_recvmmsg' and for 'TARGENT_NR_sendmmsg' 0 is passed. Function 'do_sendrecvmmsg()' was also updated accordingly in 'do_socketcall()' for 'TARGET_SYS_recvmmsg' and 'TARGET_SYS_sendmmsg'. Signed-off-by: Filip Bozuta --- linux-user/syscall.c | 22

[PATCH 3/3] linux-user: Add support for 'recvmmsg_time64()'

2020-07-31 Thread Filip Bozuta
if 'TARGET_ABI_BITS == 32' and 1 otherwise). Signed-off-by: Filip Bozuta --- linux-user/syscall.c | 25 ++--- 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 420d7e7334..ed9c2cb7ab 100644 --- a/linux-user/syscall.c

[PATCH 1/3] linux-user: Modify 'sendmmsg()' and 'recvmmsg()' implementation

2020-07-31 Thread Filip Bozuta
. Signed-off-by: Filip Bozuta --- linux-user/syscall.c | 243 --- 1 file changed, 159 insertions(+), 84 deletions(-) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 05f03919ff..8cbefdb561 100644 --- a/linux-user/syscall.c +++ b/linux-user

[PATCH 0/3] linux-user: Introducing support for 'recvmmsg_time64()'

2020-07-31 Thread Filip Bozuta
suite where a timeout test case was added for 'recvmmsg()'. This modified test suite can be found at: https://github.com/bozutaf/ltp (A patch with this fix will be sent to LTP mailing list soon) Filip Bozuta (3): linux-user: Modify 'sendmmsg()' and 'recvmmsg()' implementation

[PATCH] linux-user: Fix 'utimensat()' implementation

2020-08-11 Thread Filip Bozuta
for all test cases. Signed-off-by: Filip Bozuta --- linux-user/syscall.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 05f03919ff..920656191b 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -11722,8

[PATCH v2] linux-user: Fix "print_fdset()" in "strace.c" to not print ", " after last value

2020-07-02 Thread Filip Bozuta
ot; which returns a "," or an empty string "" based on its argument (0 for "," and other for ""). Signed-off-by: Filip Bozuta Reviewed-by: Laurent Vivier --- linux-user/strace.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff -

[PATCH 4/4] linux-user: Add support for a group of btrfs ioctls used to get/set features

2020-07-09 Thread Filip Bozuta
represent flags that can be safely clearead. Implementation notes: All of the implemented ioctls use 'struct btrfs_ioctl_feature_flags' as third argument. That is the reason why a corresponding defintion was added in file 'linux-user/syscall_types.h'. Signed-off-by: Filip Bozuta ---

[PATCH 2/4] linux-user: Add support for a group of btrfs ioctls used for snapshots

2020-07-09 Thread Filip Bozuta
for the file descriptor and path of the subvolume for which the snapshot is to be deleted. Implementation notes: Since the thunk type 'struct btrfs_ioctl_vol_args' is defined in the previous patch, the implementation for these ioctls was straightforward. Signed-off-by: Filip Bozuta --- linux

[PATCH 0/4] Add support for a group of btrfs filesystem ioctl

2020-07-09 Thread Filip Bozuta
. All applicable compiled programs were in turn executed through QEMU and the results obtained were the same ones gotten for native execution. Filip Bozuta (4): linux-user: Add support for a group of btrfs ioctls used for subvolumes linux-user: Add support for a group of btrfs

[PATCH 1/4] linux-user: Add support for a group of btrfs ioctls used for subvolumes

2020-07-09 Thread Filip Bozuta
eter CONFIG_BTRFS which is defined in 'configure' if the header file is present. Signed-off-by: Filip Bozuta --- configure | 9 + linux-user/ioctls.h| 15 +++ linux-user/syscall.c | 3 +++ linux-user/syscall_defs.h | 10 +

[PATCH 3/4] linux-user: Add support for a group of btrfs ioctls used to manipulate with devices

2020-07-09 Thread Filip Bozuta
-user/syscall_types.h'. Since the thunk type for 'struct ioc_vol_args' was already added in a previous patch, the rest of the implementation was straightforward. Signed-off-by: Filip Bozuta --- linux-user/ioctls.h| 24 linux-user/syscall_defs.h | 12 +

[PATCH v2 1/4] linux-user: Make cpu_env accessible in strace.c

2020-07-13 Thread Filip Bozuta
o, all defined "print_*" and "print_syscall_ret*" functions in "strace.c" were changed to have the new "void *cpu_env". This was done to not cause build errors (even though none of these functions use this argument). Signed-off-by: Filip Bozut

[PATCH v2 2/4] linux-user: Add strace support for printing arguments of truncate()/ftruncate() and getsid()

2020-07-13 Thread Filip Bozuta
nction "regpairs_aligned()" was cut & pasted from "syscall.c" to "qemu.h" as it is used by functions "print_truncate64()" and "print_ftruncate64()" to print the offset arguments of "truncate64()" and "ftruncate6

[PATCH v2 3/4] linux-user: Add strace support for printing arguments of syscalls used to lock and unlock memory

2020-07-13 Thread Filip Bozuta
ypes, so the rest of the implementation was handled by stating an appropriate printing format in file "strace.list". Syscall mlock2() is not implemented in "syscall.c" and thus it's argument printing is not implemented in this patch. Signed-off-by: Filip Bozuta --- linux-

[PATCH v2 4/4] linux-user: Add strace support for printing arguments of some clock and time functions

2020-07-13 Thread Filip Bozuta
s()" and "clocK_gettime()" have the same number and types of arguments and thus their print functions "print_clock_getres" and "print_clock_gettime" shate a common definition in file "strace.c". Signed-off-by: Filip Bozuta --- linux-user/strace.c

[PATCH v2 0/4] Add strace support for printing arguments for a group of selected syscalls

2020-07-13 Thread Filip Bozuta
* added a function 'print_itimer_type' that prints the interval timer type Filip Bozuta (4): linux-user: Make cpu_env accessible in strace.c linux-user: Add strace support for printing arguments of truncate()/ftruncate() and getsid() linux-user: Add strace support for printing argume

Re: [PATCH v2 1/2] linux-user: fix the errno value in print_syscall_err()

2020-07-10 Thread Filip Bozuta
qemu_log("-1 errno=%d", (int)-ret); errstr = target_strerror(-ret); if (errstr) { qemu_log(" (%s)", errstr); Reviewed-by: Filip Bozuta

[PATCH] linux-user: Add strace support for printing arguments for ioctls used for terminals and serial lines

2020-07-14 Thread Filip Bozuta
quot;void print(void *arg)" was added in this structure as a special print function. Also, function "thunk_print()" was changed a little so that it uses this special print function in case it is defined. This printing function was instantiated with the defined "p

[PATCH] linux-user: Fix "print_fdset()" in "strace.c" to not print ", " after last value

2020-07-02 Thread Filip Bozuta
Function "print_fdset()" in "strace.c" is used to print the file descriptor values in "print__newselect()" which prints arguments of syscall _newselect(). Until changes from this patch, this function was printing "," even after the last value of the fd_set argument. This was changed in this patch

[PATCH v5 3/6] linux-user: Add strace support for printing argument of syscalls used for extended attributes

2020-06-19 Thread Filip Bozuta
From: Filip Bozuta This patch implements strace argument printing functionality for following syscalls: *getxattr, lgetxattr, fgetxattr - retrieve an extended attribute value ssize_t getxattr(const char *path, const char *name, void *value, size_t size) ssize_t lgetxattr

[PATCH v5 2/6] linux-user: Add strace support for a group of syscalls

2020-06-19 Thread Filip Bozuta
From: Filip Bozuta This patch implements strace argument printing functionality for following syscalls: *acct - switch process accounting on or off int acct(const char *filename) man page: https://www.man7.org/linux/man-pages/man2/acct.2.html *fsync, fdatasync

[PATCH v5 1/6] linux-user: Extend strace support to enable argument printing after syscall execution

2020-06-19 Thread Filip Bozuta
From: Filip Bozuta Structure "struct syscallname" in file "strace.c" is used for "-strace" to print arguments and return values of syscalls. The last field of this structure "result" represents the calling function that prints the

[PATCH v5 4/6] linux-user: Add strace support for printing arguments of lseek()

2020-06-19 Thread Filip Bozuta
From: Filip Bozuta This patch implements strace argument printing functionality for syscall: *lseek - reposition read/write file offset off_t lseek(int fd, off_t offset, int whence) man page: https://www.man7.org/linux/man-pages/man2/lseek.2.html Implementation notes

[PATCH v5 6/6] linux-user: Add strace support for printing arguments of fallocate()

2020-06-19 Thread Filip Bozuta
From: Filip Bozuta This patch implements strace argument printing functionality for following syscall: *fallocate - manipulate file space int fallocate(int fd, int mode, off_t offset, off_t len) man page: https://www.man7.org/linux/man-pages/man2/fallocate.2.html

[PATCH v5 5/6] linux-user: Add strace support for printing arguments of chown()/lchown()

2020-06-19 Thread Filip Bozuta
From: Filip Bozuta This patch implements strace argument printing functionality for syscalls: *chown, lchown - change ownership of a file int chown(const char *pathname, uid_t owner, gid_t group) int lchown(const char *pathname, uid_t owner, gid_t group) man page

[PATCH v5 0/6] Add strace support for printing arguments of selected syscalls

2020-06-19 Thread Filip Bozuta
From: Filip Bozuta This series covers strace support for printing arguments of following syscalls: *acct() *lgetxattr() *removexattr() *lchown() *fsync() *fgetxattr() *lremovexattr() *fallocate() *fdatasync() *listxattr

[PATCH v3 1/2] linux-user: Add thunk argument types for SIOCGSTAMP and SIOCGSTAMPNS

2020-06-19 Thread Filip Bozuta
From: Filip Bozuta Socket ioctls SIOCGSTAMP and SIOCGSTAMPNS, used for timestamping the socket connection, are defined in file "ioctls.h" differently from other ioctls. The reason for this difference is explained in the comments above their definition. These ioctls didn't have def

[PATCH v3 0/2] Add strace support for printing arguments for ioctls

2020-06-19 Thread Filip Bozuta
From: Filip Bozuta This series introduces the functionality in strace to print arguments for ioctls. This is gonna be a useful adittion as it indroduces a good debugging and diagnostic mechanism for user programs cross compiled for different architectures. The first patch in the series

[PATCH v3 2/2] linux-user: Add strace support for printing arguments of ioctl()

2020-06-19 Thread Filip Bozuta
From: Filip Bozuta This patch implements functionality for strace argument printing for ioctls. When running ioctls through qemu with "-strace", they get printed in format: "ioctl(fd_num,0x*,0x*) = ret_value" where the request code an the ioctl's third

[PATCH 0/3] Add strace support for printing arguments for a group of selected syscalls

2020-06-26 Thread Filip Bozuta
() *clock_settime() Filip Bozuta (3): linux-user: Add strace support for printing arguments of truncate()/ftruncate() and getsid() linux-user: Add strace support for printing arguments of syscalls used to lock and unlock memory linux-user: Add strace support for printing arguments of some

[PATCH 2/3] linux-user: Add strace support for printing arguments of syscalls used to lock and unlock memory

2020-06-26 Thread Filip Bozuta
ting format in file "strace.list". Syscall mlock2() is not implemented in "syscall.c" and thus it's argument printing is not implemented in this patch. Signed-off-by: Filip Bozuta --- linux-user/strace.c| 21 + linux-user/strace.list | 8 2 files changed

[PATCH 1/3] linux-user: Add strace support for printing arguments of truncate()/ftruncate() and getsid()

2020-06-26 Thread Filip Bozuta
s, so the rest of the implementation was handled by stating an appropriate printing format in file "strace.list". Signed-off-by: Filip Bozuta --- linux-user/strace.c| 14 ++ linux-user/strace.list | 10 +- 2 files changed, 19 insertions(+), 5 deletions(-) diff

[PATCH 3/3] linux-user: Add strace support for printing arguments of some clock and time functions

2020-06-26 Thread Filip Bozuta
int_timeval()" was changed a little so that it prints the field names beside the values. Syscalls "clock_getres()" and "clocK_gettime()" have the same number and types of arguments and thus their print functions "print_clock_ge

[PATCH v4 6/6] linux-user: Add strace support for printing arguments of fallocate()

2020-06-16 Thread Filip Bozuta
From: Filip Bozuta This patch implements strace argument printing functionality for following syscall: *fallocate - manipulate file space int fallocate(int fd, int mode, off_t offset, off_t len) man page: https://www.man7.org/linux/man-pages/man2/fallocate.2.html

<    1   2   3   >