[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-arm] recvfrom error with linux-user emulating armhf on aarch64

From: Guido Günther
Subject: [Qemu-arm] recvfrom error with linux-user emulating armhf on aarch64
Date: Tue, 23 Jan 2018 12:07:18 +0100
User-agent: Mutt/1.9.2 (2017-12-15)

Running the attached program⁰ in a armhf chroot on a arm64 host¹ like:

    chroot . /usr/bin/qemu-arm-static tmp/nl-bad-addr

fails with "Bad address" when invoking audit_log_acct_message. strace looks 

  31572 sendto(3, {{len=124, type=0x454 /* NLMSG_??? */, 
flags=NLM_F_REQUEST|NLM_F_ACK, seq=1, pid=0}, "op=test:message acct=\"?\" 
exe=\"/tmp/nl-bad-addr\" hostname=localhost addr=? terminal=/dev/pts/2 
res=success\0\0\0"}, 124, 0, 0xfffffa3897d0, 0) = 124
  31572 ppoll([{fd=3, events=POLLIN}], 1, {tv_sec=0, tv_nsec=500000000}, NULL, 
0) = 1 ([{fd=3, revents=POLLIN}], left {tv_sec=0, tv_nsec=499993180})
  31572 recvfrom(3, 0x112a50eb4, 8988, MSG_PEEK|MSG_DONTWAIT, 0xfffffa3897e0, 
0x42) = -1 EFAULT (Bad address)

And it fails in

   ret = get_errno(safe_recvfrom(fd, host_msg, len, flags,
                                      addr, &addrlen));

in linux-user/syscall.c:do_recvfrom but I have no idea yet what causes this.

However the same works without problems when the host is a x86_64 box.
Any pointers in debugging this further would be appreciated.

The issue is also present in qemu master. The overall goal is to get

   qemu-debootstrap --arch armhf buster chroot

to succeed on an aarch64 host as it does on x86_64.
 -- Guido

P.S.: Please cc: me on replies since I'm currently not subscribed to qemu-arm.

⁹: which is a stripped down testcase for /usr/bin/chfn failing
¹: the scaleway server this runs on doesn't support armhf.

Attachment: audit.c
Description: Text Data

reply via email to

[Prev in Thread] Current Thread [Next in Thread]