All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 0/2] linux-user: some patches for hppa
@ 2017-01-25 20:38 Laurent Vivier
  2017-01-25 20:38 ` [Qemu-devel] [PATCH 1/2] linux-user: add hppa magic numbers in qemu-binfmt-conf.sh Laurent Vivier
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Laurent Vivier @ 2017-01-25 20:38 UTC (permalink / raw)
  To: qemu-devel; +Cc: Riku Voipio, John Paul Adrian Glaubitz, Laurent Vivier

This short series enables hppa in qemu-binfmt-conf.sh, and fixes
a bug in the netlink functions that has been found by Adrian Glaubitz
while he was testing a debian chroot with qemu-hppa. I think the problem
doesn't appear on other architectures I have tested as they should use
NR_socketcall syscall instead of NR_socket syscall.

Laurent Vivier (2):
  linux-user: add hppa magic numbers in qemu-binfmt-conf.sh
  linux-user: fix "apt-get update" on linux-user hppa

 linux-user/syscall.c        | 1 -
 scripts/qemu-binfmt-conf.sh | 9 +++++++--
 2 files changed, 7 insertions(+), 3 deletions(-)

-- 
2.9.3

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Qemu-devel] [PATCH 1/2] linux-user: add hppa magic numbers in qemu-binfmt-conf.sh
  2017-01-25 20:38 [Qemu-devel] [PATCH 0/2] linux-user: some patches for hppa Laurent Vivier
@ 2017-01-25 20:38 ` Laurent Vivier
  2017-01-25 21:25   ` Richard Henderson
  2017-01-25 20:38 ` [Qemu-devel] [PATCH 2/2] linux-user: fix "apt-get update" on linux-user hppa Laurent Vivier
  2017-01-25 20:42 ` [Qemu-devel] [PATCH 0/2] linux-user: some patches for hppa no-reply
  2 siblings, 1 reply; 7+ messages in thread
From: Laurent Vivier @ 2017-01-25 20:38 UTC (permalink / raw)
  To: qemu-devel; +Cc: Riku Voipio, John Paul Adrian Glaubitz, Laurent Vivier

As we have now a linux-user HPPA target, we can add it to the list of
supported targets in qemu-binfmt-conf.sh

Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
 scripts/qemu-binfmt-conf.sh | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/scripts/qemu-binfmt-conf.sh b/scripts/qemu-binfmt-conf.sh
index de4d1c1..0f1aa63 100755
--- a/scripts/qemu-binfmt-conf.sh
+++ b/scripts/qemu-binfmt-conf.sh
@@ -1,9 +1,10 @@
 #!/bin/sh
-# enable automatic i386/ARM/M68K/MIPS/SPARC/PPC/s390 program execution by the kernel
+# enable automatic i386/ARM/M68K/MIPS/SPARC/PPC/s390/HPPA
+# program execution by the kernel
 
 qemu_target_list="i386 i486 alpha arm sparc32plus ppc ppc64 ppc64le m68k \
 mips mipsel mipsn32 mipsn32el mips64 mips64el \
-sh4 sh4eb s390x aarch64"
+sh4 sh4eb s390x aarch64 hppa"
 
 i386_magic='\x7fELF\x01\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x03\x00'
 i386_mask='\xff\xff\xff\xff\xff\xfe\xfe\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff'
@@ -91,6 +92,10 @@ aarch64_magic='\x7fELF\x02\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x
 aarch64_mask='\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff'
 aarch64_family=arm
 
+hppa_magic='\x7f\x45\x4c\x46\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x0f'
+hppa_mask='\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff'
+hppa_family=hppa
+
 qemu_get_family() {
     cpu=${HOST_ARCH:-$(uname -m)}
     case "$cpu" in
-- 
2.9.3

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [Qemu-devel] [PATCH 2/2] linux-user: fix "apt-get update" on linux-user hppa
  2017-01-25 20:38 [Qemu-devel] [PATCH 0/2] linux-user: some patches for hppa Laurent Vivier
  2017-01-25 20:38 ` [Qemu-devel] [PATCH 1/2] linux-user: add hppa magic numbers in qemu-binfmt-conf.sh Laurent Vivier
@ 2017-01-25 20:38 ` Laurent Vivier
  2017-01-25 20:45   ` John Paul Adrian Glaubitz
  2017-01-25 20:42 ` [Qemu-devel] [PATCH 0/2] linux-user: some patches for hppa no-reply
  2 siblings, 1 reply; 7+ messages in thread
From: Laurent Vivier @ 2017-01-25 20:38 UTC (permalink / raw)
  To: qemu-devel; +Cc: Riku Voipio, John Paul Adrian Glaubitz, Laurent Vivier

apt-get was hanging on linux-user hppa.

strace has shown the netlink data stream was not correctly byte swapped.

It appears the fd translator function is unregistered just after it
has been registered, so the translator function is not called.

This patch removes the fd_trans_unregister() after the do_socket()
in the TARGET_NR_socket case.

This fd_trans_unregister() was added by commit
    e36800c linux-user: add signalfd/signalfd4 syscalls
when do_socket() was not registering any fd translator.
And as now it is, we must remove this fd_trans_unregister() to keep them.

Reported-by: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
---
 linux-user/syscall.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index 11a311f..9be8e95 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -9343,7 +9343,6 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1,
 #ifdef TARGET_NR_socket
     case TARGET_NR_socket:
         ret = do_socket(arg1, arg2, arg3);
-        fd_trans_unregister(ret);
         break;
 #endif
 #ifdef TARGET_NR_socketpair
-- 
2.9.3

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [Qemu-devel] [PATCH 0/2] linux-user: some patches for hppa
  2017-01-25 20:38 [Qemu-devel] [PATCH 0/2] linux-user: some patches for hppa Laurent Vivier
  2017-01-25 20:38 ` [Qemu-devel] [PATCH 1/2] linux-user: add hppa magic numbers in qemu-binfmt-conf.sh Laurent Vivier
  2017-01-25 20:38 ` [Qemu-devel] [PATCH 2/2] linux-user: fix "apt-get update" on linux-user hppa Laurent Vivier
@ 2017-01-25 20:42 ` no-reply
  2017-01-25 20:51   ` Laurent Vivier
  2 siblings, 1 reply; 7+ messages in thread
From: no-reply @ 2017-01-25 20:42 UTC (permalink / raw)
  To: laurent; +Cc: famz, qemu-devel, riku.voipio, glaubitz

Hi,

Your series seems to have some coding style problems. See output below for
more information:

Type: series
Subject: [Qemu-devel] [PATCH 0/2] linux-user: some patches for hppa
Message-id: 20170125203852.19254-1-laurent@vivier.eu

=== TEST SCRIPT BEGIN ===
#!/bin/bash

BASE=base
n=1
total=$(git log --oneline $BASE.. | wc -l)
failed=0

# Useful git options
git config --local diff.renamelimit 0
git config --local diff.renames True

commits="$(git log --format=%H --reverse $BASE..)"
for c in $commits; do
    echo "Checking PATCH $n/$total: $(git log -n 1 --format=%s $c)..."
    if ! git show $c --format=email | ./scripts/checkpatch.pl --mailback -; then
        failed=1
        echo
    fi
    n=$((n+1))
done

exit $failed
=== TEST SCRIPT END ===

Updating 3c8cf5a9c21ff8782164d1def7f44bd888713384
From https://github.com/patchew-project/qemu
 * [new tag]         patchew/20170125203852.19254-1-laurent@vivier.eu -> patchew/20170125203852.19254-1-laurent@vivier.eu
Switched to a new branch 'test'
4995cf7 linux-user: fix "apt-get update" on linux-user hppa
2d71add linux-user: add hppa magic numbers in qemu-binfmt-conf.sh

=== OUTPUT BEGIN ===
Checking PATCH 1/2: linux-user: add hppa magic numbers in qemu-binfmt-conf.sh...
ERROR: line over 90 characters
#33: FILE: scripts/qemu-binfmt-conf.sh:95:
+hppa_magic='\x7f\x45\x4c\x46\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x0f'

ERROR: line over 90 characters
#34: FILE: scripts/qemu-binfmt-conf.sh:96:
+hppa_mask='\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff'

total: 2 errors, 0 warnings, 22 lines checked

Your patch has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

Checking PATCH 2/2: linux-user: fix "apt-get update" on linux-user hppa...
=== OUTPUT END ===

Test command exited with code: 1


---
Email generated automatically by Patchew [http://patchew.org/].
Please send your feedback to patchew-devel@freelists.org

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Qemu-devel] [PATCH 2/2] linux-user: fix "apt-get update" on linux-user hppa
  2017-01-25 20:38 ` [Qemu-devel] [PATCH 2/2] linux-user: fix "apt-get update" on linux-user hppa Laurent Vivier
@ 2017-01-25 20:45   ` John Paul Adrian Glaubitz
  0 siblings, 0 replies; 7+ messages in thread
From: John Paul Adrian Glaubitz @ 2017-01-25 20:45 UTC (permalink / raw)
  To: Laurent Vivier, qemu-devel; +Cc: Riku Voipio, Helge Deller

On 01/25/2017 09:38 PM, Laurent Vivier wrote:
> Reported-by: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
> Signed-off-by: Laurent Vivier <laurent@vivier.eu>

Tested-by: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>

CC'ing Helge Deller so he can verify this as well.

-- 
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer - glaubitz@debian.org
`. `'   Freie Universitaet Berlin - glaubitz@physik.fu-berlin.de
  `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Qemu-devel] [PATCH 0/2] linux-user: some patches for hppa
  2017-01-25 20:42 ` [Qemu-devel] [PATCH 0/2] linux-user: some patches for hppa no-reply
@ 2017-01-25 20:51   ` Laurent Vivier
  0 siblings, 0 replies; 7+ messages in thread
From: Laurent Vivier @ 2017-01-25 20:51 UTC (permalink / raw)
  To: qemu-devel; +Cc: famz, riku.voipio, glaubitz

Le 25/01/2017 à 21:42, no-reply@patchew.org a écrit :
> Hi,
> 
> Your series seems to have some coding style problems. See output below for
> more information:
> 
> Type: series
> Subject: [Qemu-devel] [PATCH 0/2] linux-user: some patches for hppa
> Message-id: 20170125203852.19254-1-laurent@vivier.eu
...
> Checking PATCH 1/2: linux-user: add hppa magic numbers in qemu-binfmt-conf.sh...
> ERROR: line over 90 characters
> #33: FILE: scripts/qemu-binfmt-conf.sh:95:
> +hppa_magic='\x7f\x45\x4c\x46\x01\x02\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x0f'
> 
> ERROR: line over 90 characters
> #34: FILE: scripts/qemu-binfmt-conf.sh:96:
> +hppa_mask='\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff'
>

This error is not relevant for this file...

Thanks,
Laurent

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Qemu-devel] [PATCH 1/2] linux-user: add hppa magic numbers in qemu-binfmt-conf.sh
  2017-01-25 20:38 ` [Qemu-devel] [PATCH 1/2] linux-user: add hppa magic numbers in qemu-binfmt-conf.sh Laurent Vivier
@ 2017-01-25 21:25   ` Richard Henderson
  0 siblings, 0 replies; 7+ messages in thread
From: Richard Henderson @ 2017-01-25 21:25 UTC (permalink / raw)
  To: Laurent Vivier, qemu-devel; +Cc: Riku Voipio, John Paul Adrian Glaubitz

On 01/25/2017 12:38 PM, Laurent Vivier wrote:
> As we have now a linux-user HPPA target, we can add it to the list of
> supported targets in qemu-binfmt-conf.sh
> 
> Signed-off-by: Laurent Vivier <laurent@vivier.eu>
> ---
>  scripts/qemu-binfmt-conf.sh | 9 +++++++--
>  1 file changed, 7 insertions(+), 2 deletions(-)

Reviewed-by: Richard Henderson <rth@twiddle.net>


r~

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2017-01-25 21:25 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-25 20:38 [Qemu-devel] [PATCH 0/2] linux-user: some patches for hppa Laurent Vivier
2017-01-25 20:38 ` [Qemu-devel] [PATCH 1/2] linux-user: add hppa magic numbers in qemu-binfmt-conf.sh Laurent Vivier
2017-01-25 21:25   ` Richard Henderson
2017-01-25 20:38 ` [Qemu-devel] [PATCH 2/2] linux-user: fix "apt-get update" on linux-user hppa Laurent Vivier
2017-01-25 20:45   ` John Paul Adrian Glaubitz
2017-01-25 20:42 ` [Qemu-devel] [PATCH 0/2] linux-user: some patches for hppa no-reply
2017-01-25 20:51   ` Laurent Vivier

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.