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

2020-09-05 Thread Filip Bozuta
to check whether 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..731c

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 +

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 --- linux-user/syscall.

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

2020-08-25 Thread Filip Bozuta
eived message. Implementation 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-of

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

2020-08-25 Thread Filip Bozuta
he 'TARGET_ABI_BITS' was checked to know what value for 'time64' argument to pass. 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/sysca

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

2020-08-25 Thread Filip Bozuta
ntation of 'recvmmsg_time64()'. Testing 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

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

2020-08-24 Thread Filip Bozuta
that take a 'bool 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

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

2020-08-24 Thread Filip Bozuta
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

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

2020-08-24 Thread Filip Bozuta
4()). For 'do_ipc()' a check was added as that additional 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 deletio

[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 Revi

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

2020-08-24 Thread Filip Bozuta
ULT as expected, which is the same test result that is received with native execution: mq_timedsend01.c:187: PASS: 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)

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

2020-08-24 Thread Filip Bozuta
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_t

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

2020-08-24 Thread Filip Bozuta
g for 'PPC' *v3: -Removed 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()&

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

2020-08-24 Thread Filip Bozuta
ser_timeval64()' was used to convert the field 'time' which if of type 'struct timeval' from host to target. Function 'copy_from_user_timveal64()' was added in this patch and used to convert the 'time' field from target to host. Signed-off-by: Filip Bozut

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

2020-08-24 Thread Filip Bozuta
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 | 53 1 file

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

2020-08-23 Thread Filip Bozuta
some structures depend 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

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

2020-08-23 Thread Filip Bozuta
of 'thunk_convert()' to convert the values of the third argument from target to host. All of the ioctls in this patch are of type 'IOW' which is why a converting function from host to target is not required. Also, a separate printing function was define

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

2020-08-23 Thread Filip Bozuta
at is the reason why an aproppriate thunk type definition is added 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 c

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

2020-08-23 Thread Filip Bozuta
can be safely set and third element 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-use

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

2020-08-23 Thread Filip Bozuta
ioctls argument is ignored. Implementation notes: Almost 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

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

2020-08-23 Thread Filip Bozuta
aproppriate values 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.

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

2020-08-23 Thread Filip Bozuta
t is the reason why corresponding structure definitions were added in file 'linux-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 Bozut

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

2020-08-23 Thread Filip Bozuta
id' and 'treeid' field should be filled with aproppriate values which represent the inode number of the directory that contains the subvolume and treeid of the subvolume. Implementation notes: All of the ioctls in this patch use structure types as third argument

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

2020-08-23 Thread Filip Bozuta
resent the minimum value for the tree id. 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:

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

2020-08-23 Thread Filip Bozuta
enwrapped in an #ifdef statement with parameter 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/sysca

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 d0ed6a69d399ae193959225cdeaa9382746c

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

2020-08-18 Thread Filip Bozuta
testcases for 'semop()'): semop02.c:126: PASS: semop failed as expected: E2BIG (7) Implementation notes: A target value ('TARGET_SEMOPM') was added for 'SEMOPM' as to be sure in case the value is not available for some targets. Signed-off-by: Filip Bozuta

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

2020-08-17 Thread Filip Bozuta
testcases for 'semop()'): semop02.c:126: PASS: semop failed as expected: E2BIG (7) Implementation notes: A target value ('TARGET_SEMOPM') was added for 'SEMOPM' as to be sure in case the value is not available for some targets. Signed-off-by: Filip Bozuta

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

2020-08-12 Thread Filip Bozuta
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

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

2020-08-12 Thread Filip Bozuta
or 'semop()'): semop02.c:126: PASS: semop failed as expected: E2BIG (7) Implementation notes: A target value ('TARGET_SEMOPM') was added for 'SEMOPM' as to be sure in case the value is not available for some targets. Signed-off-by: Filip Bozuta --- linux-use

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

2020-08-12 Thread Filip Bozuta
()). For 'do_ipc()' an check was added as that additional 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/

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

2020-08-12 Thread Filip Bozuta
truct 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

[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
ment types, 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

[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 v4 4/5] linux-user: Add an api to print enumareted argument values with strace

2020-08-11 Thread Filip Bozuta
dify all existing print functions in 'strace.c' that print arguments of syscalls 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

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

2020-08-11 Thread Filip Bozuta
i to print certain arguments of syscalls in patch 4 * rebased the series to use 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

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

2020-08-11 Thread Filip Bozuta
on "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] linux-user: Fix 'utimensat()' implementation

2020-08-11 Thread Filip Bozuta
ted. After changes from this patch, the test passes 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/linu

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

2020-08-03 Thread Filip Bozuta
n executed 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

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

2020-08-03 Thread Filip Bozuta
ioctls argument is ignored. Implementation notes: Almost 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 Reviewed-by: Laurent

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

2020-08-03 Thread Filip Bozuta
resent the minimum value for the tree id. 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 Bo

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

2020-08-03 Thread Filip Bozuta
can be safely set and third element 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

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

2020-08-03 Thread Filip Bozuta
at is the reason why an aproppriate thunk type definition is added 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 +++

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

2020-08-03 Thread Filip Bozuta
id' and 'treeid' field should be filled with aproppriate values which represent the inode number of the directory that contains the subvolume and treeid of the subvolume. Implementation notes: All of the ioctls in this patch use structure types as third argument

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

2020-08-03 Thread Filip Bozuta
enwrapped in an #ifdef statement with parameter 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

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

2020-08-03 Thread Filip Bozuta
t is the reason why corresponding structure definitions were added in file 'linux-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

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

2020-08-03 Thread Filip Bozuta
aproppriate values 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.

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

2020-07-31 Thread Filip Bozuta
f a new argument which represents the timeout. 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_S

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

2020-07-31 Thread Filip Bozuta
; argument. Memory allocation for the 'iovec' field is done outside of these functions as to ensure that the memory is freed after the syscall execution. Signed-off-by: Filip Bozuta --- linux-user/syscall.c | 243 --- 1 file changed, 15

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

2020-07-31 Thread Filip Bozuta
27;TARGET_ABI_BITS' was checked to know what value for 'time64' argument to pass (0 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

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

2020-07-31 Thread Filip Bozuta
x27; itself. Testing method: The implementation was tested using a modified LTP test 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 mai

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 https://github.c

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

2020-07-27 Thread Filip Bozuta
LTP suite can be found at: https://github.com/bozutaf/ltp (Patch with this new test case will be sent to LTP mailing list soon) Signed-off-by: Filip Bozuta --- linux-user/syscall.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/linux-user/syscall.c b/linux-user/sysc

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

2020-07-27 Thread Filip Bozuta
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 --- linux-user/syscall.c | 53 1 file changed, 53 insertions(+) diff -

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

2020-07-27 Thread Filip Bozuta
tests from LTP test suite which was built inside chroot. *v2: -Added check for 'clock_nanosleep_time64()' which returns '-TARGET_EFAULT' if conversion of 'struct timespec64' between host and target fails -Removed unnecesary special errno handl

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

2020-07-27 Thread Filip Bozuta
ser_timeval64()' was used to convert the field 'time' which if of type 'struct timeval' from host to target. Function 'copy_from_user_timveal64()' was added in this patch and used to convert the 'time' field from target to host. Signed-off-by: Filip Bozut

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

2020-07-26 Thread Filip Bozuta
ULT as expected, which is the same test result that is received with native execution: mq_timedsend01.c:187: PASS: 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)

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

2020-07-26 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-of

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

2020-07-26 Thread Filip Bozuta
implementation of the implemented syscalls was tested using recently added time64 test in the LTP test suite. Filip Bozuta (2): linux-user: Fix 'mq_timedsend()' and 'mq_timedreceive()' linux-user: Add support for 'mq_timedsend_time64()' and 'mq_timedrecei

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

2020-07-25 Thread Filip Bozuta
tation in this patch was tested using recently added LTP time64 test variants for "mq_timedsend()" and "mq_timedsendreceive()". Signed-off-by: Filip Bozuta --- linux-user/syscall.c | 50 +--- 1 file changed, 47 insertions(+), 3

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

2020-07-25 Thread Filip Bozuta
tests from LTP test suite which was built inside chroot. Filip Bozuta (2): linux-user: Add support for two 'clock_nanosleep_time64()' and 'clock_adjtime64()' linux-user: Add support for 'rt_sigtimedwait_time64()' and 'sched_rr_get_interval_time64()

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

2020-07-25 Thread Filip Bozuta
ser_timeval64()' was used to convert the field 'time' which if of type 'struct timeval' from host to target. Function '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 ---

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

2020-07-25 Thread Filip Bozuta
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 --- linux-user/syscall.c | 53 1 file changed, 53 insertions(+) diff -

[PATCH] linux-user: Fix syscall rt_sigtimedwait() implementation

2020-07-24 Thread Filip Bozuta
the expected EFAULT. After the changes from this patch, the test case is executed successfully along with the other LTP test cases for 'rt_sigtimedwait()': PASS: test_bad_address3 (349): Test passed Signed-off-by: Filip Bozuta --- linux-user/syscall.c | 4 +++- 1 file changed,

[PATCH v2 0/3] Adding support for printing contents of 'struct termios' which is used by ioctls of group 'ioctl_tty'

2020-07-23 Thread Filip Bozuta
7; were used. These programs were cross executed with QEMU with "-strace" to check if the contents 'struct termios' are getting correctly printed. Based-on: <20200722200437.312767-1-filip.boz...@syrmia.com> Filip Bozuta (5): linux-user: Add generic 'termbits.h

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

2020-07-23 Thread Filip Bozuta
h" contains information that is used to decode structure values. Field "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 c

[PATCH v2 1/3] linux-user: Add generic 'termbits.h' for some archs

2020-07-23 Thread Filip Bozuta
n every arch 'termbits.h' file. Also, some of the flag values that were missing were added in this generic file so that it matches the generic 'termibts.h' and 'ioctls.h' files from the kernel: 'asm-generic/termbits.h' and 'asm-generic/ioctls.h'. Sign

[PATCH v2 2/3] linux-user: Add missing termbits types and values definitions

2020-07-23 Thread Filip Bozuta
dded in file 'syscall.c' in bitmask tables 'iflag_tbl[]' and 'lflag_tbl[]' which are used to convert values of 'struct termios' between target and host. Signed-off-by: Filip Bozuta --- linux-user/alpha/termbits.h | 1 + linux-user/cris/termbits.h|

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

2020-07-22 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 v3 4/5] linux-user: Add an api to print enumareted argument values with strace

2020-07-22 Thread Filip Bozuta
dify all existing print functions in 'strace.c' that print arguments of syscalls with enumerated values to use this new api. Signed-off-by: Filip Bozuta --- linux-user/strace.c | 31 +++ 1 file changed, 31 insertions(+) diff --git a/linux-user/strace.c b/lin

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

2020-07-22 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 v3 3/5] linux-user: Add strace support for printing arguments of syscalls used to lock and unlock memory

2020-07-22 Thread Filip Bozuta
ment types, 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

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

2020-07-22 Thread Filip Bozuta
t_syscall_ret_setitimer' for old value of the interval timer * added a function 'print_itimer_type' that prints the interval timer type v3: * added patch that introduces an api that prints enumarted values with strace * used this new introduced api to p

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

2020-07-22 Thread Filip Bozuta
on "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 v2 0/2] This two patch series introduces functionality for a group

2020-07-22 Thread Filip Bozuta
tests from LTP test suite which was built inside chroot. v2: *changed 'target_to_host/host_to_target_itimerspec/64()' to use 'offsetof()' to determine converting adress for 'timespec' instead of 'sizeof()' Filip Bozuta (2): linux-user: Modi

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

2020-07-22 Thread Filip Bozuta
itimerspec' type is used in these new converting functions. These new functions were defined similarly to 'host_to_target_itimerspec()' and 'target_to_host_itimerspec()' the only difference being that 'target_to_host_timespec64()' and 'ho

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

2020-07-22 Thread Filip Bozuta
ification to the converting functions 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

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

2020-07-22 Thread Filip Bozuta
mplementation 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 syscall

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

2020-07-22 Thread Filip Bozuta
itimerspec' type is used in these new converting functions. These new functions were defined similarly to 'host_to_target_itimerspec()' and 'target_to_host_itimerspec()' the only difference being that 'target_to_host_timespec64()' and 'host_to_tar

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

2020-07-22 Thread Filip Bozuta
ification to the converting functions 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

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

2020-07-17 Thread Filip Bozuta
id' and 'treeid' field should be filled with aproppriate values which represent the inode number of the directory that contains the subvolume and treeid of the subvolume. Implementation notes: All of the ioctls in this patch use structure types as third argument

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

2020-07-17 Thread Filip Bozuta
ioctls argument is ignored. Implementation notes: Almost 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

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

2020-07-17 Thread Filip Bozuta
resent the minimum value for the tree id. 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:

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

2020-07-17 Thread Filip Bozuta
at is the reason why an aproppriate thunk type definition is added in file 'syscall_types.h'. Signed-off-by: Filip Bozuta --- linux-user/ioctls.h| 11 +++ linux-user/syscall_defs.h | 6 ++ linux-user/syscall_types.h | 26 ++ 3 files c

[PATCH v2 0/4] Add support for a group of btrfs ioctls - 2

2020-07-17 Thread Filip Bozuta
grams were in turn executed through QEMU and the results obtained were the same ones gotten for native execution v2: * added Signed-off-by tag (forgot in v1...) Based-on: <20200709155203.21106-1-filip.boz...@syrmia.com> Filip Bozuta (4): linux-user: Add support for a group of bt

[PATCH 0/4] Add support for a group of btrfs ioctls - 2

2020-07-17 Thread Filip Bozuta
execution. Based-on: <20200709155203.21106-1-filip.boz...@syrmia.com> Filip Bozuta (4): linux-user: Add support for a group of btrfs inode ioctls linux-user: Add support for two btrfs ioctls used for subvolume linux-user: Add support for btrfs ioctls used to manage quota linux-user:

[PATCH 3/4] linux-user: Add support for btrfs ioctls used to manage quota

2020-07-17 Thread Filip Bozuta
This patch implements functionality for following ioctls: BTRFS_IOC_QUOTA_CTL - Enabling/Disabling quota support Enable or disable quota support for a btrfs filesystem. Quota support is enabled or disabled using the ioctls third argument which represents a pointer to a following type:

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

2020-07-17 Thread Filip Bozuta
This patch implements functionality for following ioctls: BTRFS_IOC_SCRUB - Starting a btrfs filesystem scrub Start a btrfs filesystem scrub. The third ioctls argument is a pointer to a following type: struct btrfs_ioctl_scrub_args { __u64 devid;/*

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

2020-07-17 Thread Filip Bozuta
This patch implements functionality of following ioctls: BTRFS_IOC_INO_LOOKUP - Reading tree root id and path Read tree root id and path for a given file or directory. The name and tree root id are returned in an ioctl's third argument that represents a pointer to a following type:

[PATCH 2/4] linux-user: Add support for two btrfs ioctls used for subvolume

2020-07-17 Thread Filip Bozuta
This patch implements functionality for following ioctl: BTRFS_IOC_DEFAULT_SUBVOL - Setting a default subvolume Set a default subvolume for a btrfs filesystem. The third ioctl's argument is a '__u64' (unsigned long long) which represents the id of a subvolume that is to be set as

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

2020-07-14 Thread Filip Bozuta
Field "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

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

2020-07-13 Thread Filip Bozuta
t_syscall_ret_setitimer' for old value of the interval timer * 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

[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 3/4] linux-user: Add strace support for printing arguments of syscalls used to lock and unlock memory

2020-07-13 Thread Filip Bozuta
ment types, 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 Bozu

[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
on "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

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 0/4] Add support for a group of btrfs filesystem ioctl

2020-07-09 Thread Filip Bozuta
86_64 host. 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 grou

  1   2   3   >