linux-user/generic/fcntl.h | 8 +-- linux-user/mips/cpu_loop.c | 6 +++ linux-user/mips/target_fcntl.h | 17 +++++- linux-user/strace.c | 86 ++++++++++++++++++++++++++++++ linux-user/strace.list | 3 ++ linux-user/syscall.c | 115 ++++++++++++++++++++++++++++++++++++++++- linux-user/syscall_defs.h | 37 +++++++++++++ 7 files changed, 266 insertions(+), 6 deletions(-)
From: Aleksandar Markovic <amarkovic@wavecomp.com> This is a collection of misc patches for Linux user that I recently accumulated from variuous sources. All of them originate from problems observed on mips target. However, most of these changes actually affect and fix linux-user problems on multiple targets. There are three checkpatch warninhs and two checkpatch errors that sould be ignored in the given circumstances. NOTE: Two checkpatch errors and three warnings are false alarms. v12->v13: - removed two patches that got accepted - simplified the patch on statx() - added a patch on TARGET_HAVE_ARCH_STRUCT_FLOCK - added a patch on fixing EXCP_FPE handling on MIPS v11->v12: - used the preffered Laurent's email address for linux-user - added a note on checkpetch warnings and errors in the commit letter v10->v11: - patch on <ADD|DROP>_MEMEBERSHIP basically reverted to its first version - corrected patch on statx() - added patch on strace support for statx() - added patch on fixing flock structure for MIPS O64 ABI v9->v10: - improved commit messages for patches 2 and 3 v8->v9: - fixed build error on some systems related to SOL_ALG v7->v8: - added a patch on setsockopt() option SOL_ALG v6->v7: - fixed a build error for older kernels related to the patch on setsockopt() options - removed four patches that on the meantime got accepted into the main source tree v5->v6: - fixed a mistake in patch #4 - improved commit messages in patches #4 and #6 v4->v5: - added the patch on statx() support - improved the patch on IPV6_<ADD|DROP>_MEMBERSHIP to take into account the possibility of different names for a field - minor corrections in commit messages v3->v4: - improved commit messages (fixed some typos, improved relevance) v2->v3: - updated and improved commit messages - added IPV6_DROP_MEMBERSHIP support to the patch on setsockopt()'s option v1->v2: - added the patch on setsockopt()'s option IPV6_ADD_MEMBERSHIP - improved the commit messages Aleksandar Markovic (3): linux-user: Fix flock structure for MIPS O64 ABI linux-user: Introduce TARGET_HAVE_ARCH_STRUCT_FLOCK linux-user: Handle EXCP_FPE properly for MIPS Aleksandar Rikalo (1): linux-user: Add support for translation of statx() syscall Jim Wilson (1): linux-user: Add support for strace for statx() syscall linux-user/generic/fcntl.h | 8 +-- linux-user/mips/cpu_loop.c | 6 +++ linux-user/mips/target_fcntl.h | 17 +++++- linux-user/strace.c | 86 ++++++++++++++++++++++++++++++ linux-user/strace.list | 3 ++ linux-user/syscall.c | 115 ++++++++++++++++++++++++++++++++++++++++- linux-user/syscall_defs.h | 37 +++++++++++++ 7 files changed, 266 insertions(+), 6 deletions(-) -- 2.7.4
Patchew URL: https://patchew.org/QEMU/1561648298-18100-1-git-send-email-aleksandar.markovic@rt-rk.com/ Hi, This series failed build test on s390x host. Please find the details below. === TEST SCRIPT BEGIN === #!/bin/bash # Testing script will be invoked under the git checkout with # HEAD pointing to a commit that has the patches applied on top of "base" # branch set -e CC=$HOME/bin/cc INSTALL=$PWD/install BUILD=$PWD/build mkdir -p $BUILD $INSTALL SRC=$PWD cd $BUILD $SRC/configure --cc=$CC --prefix=$INSTALL make -j4 # XXX: we need reliable clean up # make check -j4 V=1 make install echo echo "=== ENV ===" env echo echo "=== PACKAGES ===" rpm -qa === TEST SCRIPT END === CC i386-linux-user/linux-user/uname.o CCAS i386-linux-user/linux-user/safe-syscall.o CC i386-linux-user/linux-user/i386/signal.o /var/tmp/patchew-tester-tmp-zqhqa95y/src/linux-user/syscall.c:323:16: error: conflicting types for ‘statx’ 323 | _syscall5(int, statx, int, dirfd, const char *, pathname, int, flags, | ^~~~~ /var/tmp/patchew-tester-tmp-zqhqa95y/src/linux-user/syscall.c:214:13: note: in definition of macro ‘_syscall5’ The full log is available at http://patchew.org/logs/1561648298-18100-1-git-send-email-aleksandar.markovic@rt-rk.com/testing.s390x/?type=message. --- Email generated automatically by Patchew [https://patchew.org/]. Please send your feedback to patchew-devel@redhat.com
Le 27/06/2019 à 21:27, no-reply@patchew.org a écrit : > Patchew URL: https://patchew.org/QEMU/1561648298-18100-1-git-send-email-aleksandar.markovic@rt-rk.com/ > > > > Hi, > > This series failed build test on s390x host. Please find the details below. > > === TEST SCRIPT BEGIN === > #!/bin/bash > # Testing script will be invoked under the git checkout with > # HEAD pointing to a commit that has the patches applied on top of "base" > # branch > set -e > CC=$HOME/bin/cc > INSTALL=$PWD/install > BUILD=$PWD/build > mkdir -p $BUILD $INSTALL > SRC=$PWD > cd $BUILD > $SRC/configure --cc=$CC --prefix=$INSTALL > make -j4 > # XXX: we need reliable clean up > # make check -j4 V=1 > make install > > echo > echo "=== ENV ===" > env > > echo > echo "=== PACKAGES ===" > rpm -qa > === TEST SCRIPT END === > > CC i386-linux-user/linux-user/uname.o > CCAS i386-linux-user/linux-user/safe-syscall.o > CC i386-linux-user/linux-user/i386/signal.o > /var/tmp/patchew-tester-tmp-zqhqa95y/src/linux-user/syscall.c:323:16: error: conflicting types for ‘statx’ > 323 | _syscall5(int, statx, int, dirfd, const char *, pathname, int, flags, > | ^~~~~ > /var/tmp/patchew-tester-tmp-zqhqa95y/src/linux-user/syscall.c:214:13: note: in definition of macro ‘_syscall5’ > This is a real error. To avoid this you can rename it to "sys_statx" (see sys_gettid() for instance). Thanks, Laurent
> From: Laurent Vivier <laurent@vivier.eu> > Sent: Friday, June 28, 2019 9:21 AM > To: qemu-devel@nongnu.org; aleksandar.markovic@rt-rk.com > Cc: Aleksandar Markovic > Subject: Re: [Qemu-devel] [PATCH v13 0/5] linux-user: A set of miscellaneous patches > > Le 27/06/2019 à 21:27, no-reply@patchew.org a écrit : > > Patchew URL: https://patchew.org/> QEMU/1561648298-18100-1-git-send-email-aleksandar.markovic@rt-rk.com/ > > CC i386-linux-user/linux-user/uname.o > > CCAS i386-linux-user/linux-user/safe-syscall.o > > CC i386-linux-user/linux-user/i386/signal.o > > /var/tmp/patchew-tester-tmp-zqhqa95y/src/linux-user/syscall.c:323:16: error: > conflicting types for ‘statx’ > > 323 | _syscall5(int, statx, int, dirfd, const char *, pathname, int, flags, > > | ^~~~~ > > /var/tmp/patchew-tester-tmp-zqhqa95y/src/linux-user/syscall.c:214:13: note: in > definition of macro ‘_syscall5’ > > > > This is a real error. To avoid this you can rename it to "sys_statx" > (see sys_gettid() for instance). > Ok, Laurent. But the root cause is a little deeper, I would say - the error appears because <sys/stat.h> is superfluously included, and glibc defines statx() basically in that header (in fact, in a headed that is always included by stat.h) - hence the error, I guess only for build systems with glibc >= 2.28. I am going to remove #include <sys/stat.h> too from the patch, is that OK, in your opinion? (and, honestly, I am almost positive this line removal is sufficient for removing build error without any name changes etc.) Yours, Aleksandar > Thanks, > Laurent
Le 28/06/2019 à 09:46, Aleksandar Markovic a écrit : >> From: Laurent Vivier <laurent@vivier.eu> >> Sent: Friday, June 28, 2019 9:21 AM >> To: qemu-devel@nongnu.org; aleksandar.markovic@rt-rk.com >> Cc: Aleksandar Markovic >> Subject: Re: [Qemu-devel] [PATCH v13 0/5] linux-user: A set of miscellaneous patches >> >> Le 27/06/2019 à 21:27, no-reply@patchew.org a écrit : >>> Patchew URL: https://patchew.org/> QEMU/1561648298-18100-1-git-send-email-aleksandar.markovic@rt-rk.com/ >>> CC i386-linux-user/linux-user/uname.o >>> CCAS i386-linux-user/linux-user/safe-syscall.o >>> CC i386-linux-user/linux-user/i386/signal.o >>> /var/tmp/patchew-tester-tmp-zqhqa95y/src/linux-user/syscall.c:323:16: error: > conflicting types for ‘statx’ >>> 323 | _syscall5(int, statx, int, dirfd, const char *, pathname, int, flags, >>> | ^~~~~ >>> /var/tmp/patchew-tester-tmp-zqhqa95y/src/linux-user/syscall.c:214:13: note: in > definition of macro ‘_syscall5’ >>> >> >> This is a real error. To avoid this you can rename it to "sys_statx" >> (see sys_gettid() for instance). >> > > Ok, Laurent. But the root cause is a little deeper, I would say - the error appears because <sys/stat.h> is superfluously included, and glibc defines statx() basically in that header (in fact, in a headed that is always included by stat.h) - hence the error, I guess only for build systems with glibc >= 2.28. > > I am going to remove #include <sys/stat.h> too from the patch, is that OK, in your opinion? (and, honestly, I am almost positive this line removal is sufficient for removing build error without any name changes etc.) I'm OK with that. We'll add the name change only if it becomes needed (if we need stat.h for another stuff). Thanks, Laurent
> From: Aleksandar Markovic > Sent: Friday, June 28, 2019 9:46 AM > To: Laurent Vivier; qemu-devel@nongnu.org; aleksandar.markovic@rt-rk.com > Subject: Re: [Qemu-devel] [PATCH v13 0/5] linux-user: A set of miscellaneous patches > > > From: Laurent Vivier <laurent@vivier.eu> > > Sent: Friday, June 28, 2019 9:21 AM > > To: qemu-devel@nongnu.org; aleksandar.markovic@rt-rk.com > > Cc: Aleksandar Markovic > > Subject: Re: [Qemu-devel] [PATCH v13 0/5] linux-user: A set of miscellaneous patches > > > > Le 27/06/2019 à 21:27, no-reply@patchew.org a écrit : > > > Patchew URL: https://patchew.org/> > QEMU/1561648298-18100-1-git-send-email-aleksandar.markovic@rt-rk.com/ > > > CC i386-linux-user/linux-user/uname.o > > > CCAS i386-linux-user/linux-user/safe-syscall.o > > > CC i386-linux-user/linux-user/i386/signal.o > > > /var/tmp/patchew-tester-tmp-zqhqa95y/src/linux-user/syscall.c:323:16: error: > > conflicting types for ‘statx’ > > > 323 | _syscall5(int, statx, int, dirfd, const char *, pathname, int, flags, > > > | ^~~~~ > > > /var/tmp/patchew-tester-tmp-zqhqa95y/src/linux-user/syscall.c:214:13: note: in > > definition of macro ‘_syscall5’ > > > > > > > This is a real error. To avoid this you can rename it to "sys_statx" > > (see sys_gettid() for instance). > > > > Ok, Laurent. But the root cause is a little deeper, I would say - the error appears > because <sys/stat.h> is superfluously included, and glibc defines statx() basically in > that header (in fact, in a headed that is always included by stat.h) - hence the error, > I guess only for build systems with glibc >= 2.28. > > I am going to remove #include <sys/stat.h> too from the patch, is that OK, in your > opinion? (and, honestly, I am almost positive this line removal is sufficient for > removing build error without any name changes etc.) > Let me ask you more precisely, Laurent - would this addition to the patch be fine, or you think something else would be better? @@ -43,7 +43,7 @@ #include <sys/times.h> #include <sys/shm.h> #include <sys/sem.h> -#include <sys/stat.h> +//#include <sys/stat.h> #include <sys/statfs.h> #include <utime.h> #include <sys/sysinfo.h> @@ -320,7 +320,7 @@ _syscall5(int, kcmp, pid_t, pid1, pid_t, pid2, int, type, * It is assumed that struct statx is architecture independent. */ #if defined(TARGET_NR_statx) && defined(__NR_statx) -_syscall5(int, statx, int, dirfd, const char *, pathname, int, flags, +_syscall5(int, sys_statx, int, dirfd, const char *, pathname, int, flags, unsigned int, mask, struct target_statx *, statxbuf) #endif @@ -10194,7 +10194,7 @@ static abi_long do_syscall1(void *cpu_env, int num, abi_long arg1, struct target_statx host_stx; int mask = arg4; - ret = get_errno(statx(dirfd, p, flags, mask, &host_stx)); + ret = get_errno(sys_statx(dirfd, p, flags, mask, &host_stx)); if (!is_error(ret)) { if (host_to_target_statx(&host_stx, arg5) != 0) { unlock_user(p, arg2, 0); > Yours, > Aleksandar > > > Thanks, > > Laurent
Patchew URL: https://patchew.org/QEMU/1561648298-18100-1-git-send-email-aleksandar.markovic@rt-rk.com/ Hi, This series seems to have some coding style problems. See output below for more information: Subject: [Qemu-devel] [PATCH v13 0/5] linux-user: A set of miscellaneous patches Message-id: 1561648298-18100-1-git-send-email-aleksandar.markovic@rt-rk.com Type: series === TEST SCRIPT BEGIN === #!/bin/bash git rev-parse base > /dev/null || exit 0 git config --local diff.renamelimit 0 git config --local diff.renames True git config --local diff.algorithm histogram ./scripts/checkpatch.pl --mailback base.. === TEST SCRIPT END === Updating 3c8cf5a9c21ff8782164d1def7f44bd888713384 Switched to a new branch 'test' f092e1d linux-user: Handle EXCP_FPE properly for MIPS 27e9bdd linux-user: Introduce TARGET_HAVE_ARCH_STRUCT_FLOCK 475d61c linux-user: Fix flock structure for MIPS O64 ABI ae7dbb4 linux-user: Add support for strace for statx() syscall 3956339 linux-user: Add support for translation of statx() syscall === OUTPUT BEGIN === 1/5 Checking commit 39563390d2d9 (linux-user: Add support for translation of statx() syscall) WARNING: architecture specific defines should be avoided #60: FILE: linux-user/syscall.c:322: +#if defined(TARGET_NR_statx) && defined(__NR_statx) WARNING: architecture specific defines should be avoided #72: FILE: linux-user/syscall.c:6479: +#if defined(TARGET_NR_statx) && defined(__NR_statx) WARNING: architecture specific defines should be avoided #142: FILE: linux-user/syscall.c:10189: +#if defined(__NR_statx) total: 0 errors, 3 warnings, 186 lines checked Patch 1/5 has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS. 2/5 Checking commit ae7dbb4c21bf (linux-user: Add support for strace for statx() syscall) ERROR: storage class should be at the beginning of the declaration #27: FILE: linux-user/strace.c:979: +UNUSED static struct flags statx_flags[] = { ERROR: storage class should be at the beginning of the declaration #49: FILE: linux-user/strace.c:1001: +UNUSED static struct flags statx_mask[] = { total: 2 errors, 0 warnings, 104 lines checked Patch 2/5 has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS. 3/5 Checking commit 475d61cbdb89 (linux-user: Fix flock structure for MIPS O64 ABI) 4/5 Checking commit 27e9bdd1e949 (linux-user: Introduce TARGET_HAVE_ARCH_STRUCT_FLOCK) 5/5 Checking commit f092e1d90322 (linux-user: Handle EXCP_FPE properly for MIPS) === OUTPUT END === Test command exited with code: 1 The full log is available at http://patchew.org/logs/1561648298-18100-1-git-send-email-aleksandar.markovic@rt-rk.com/testing.checkpatch/?type=message. --- Email generated automatically by Patchew [https://patchew.org/]. Please send your feedback to patchew-devel@redhat.com
© 2016 - 2024 Red Hat, Inc.