[Bug 1143725] qemu-aarch64-binfmt, from qemu-linux-user, not working (no output)
https://bugzilla.suse.com/show_bug.cgi?id=1143725 https://bugzilla.suse.com/show_bug.cgi?id=1143725#c7 --- Comment #7 from Dario Faggioli <dfaggioli@suse.com> --- (In reply to Arnav Singh from comment #6)
(qemu-linux-user 7.0.0-55.1)
I had the same issue with binaries exiting with code 255. I found that using qemu-aarch64 instead works perfectly:
$ echo ':qemu-aarch64:M:: \x7fELF\x02\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\xb7\x00: \xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\ xff:/usr/bin/qemu-aarch64:POCF' > /proc/sys/fs/binfmt_misc/register
$ cat /proc/sys/fs/binfmt_misc/qemu-aarch64
enabled interpreter /usr/bin/qemu-aarch64 flags: POCF offset 0 magic 7f454c460201010000000000000000000200b700 mask ffffffffffffff00fffffffffffffffffeffffff
Now Docker containers are able to run aarch64 binaries just fine.
Yes! And thanks for the report. In fact, we've been working on removing some [open]SUSE specific handling of binfmt, which made things simpler, back then where they were introduced, but were instead complicating them a lot, now that we have containers! In fact, this works well for me as well now, just out of the box:
$ podman pull --arch=arm64 docker.io/library/httpd $ sudo qemu-binfmt-conf.sh --systemd aarch64 --persistent yes $ sudo systemctl daemon-reload $ sudo systemctl start systemd-binfmt.service $ podman run --rm -it docker.io/library/httpd uname -a WARNING: image platform ({arm64 linux [] v8}) does not match the expected platform ({amd64 linux [] }) Linux 827190b5981e 5.18.11-1-default #1 SMP PREEMPT_DYNAMIC Fri Jul 15 05:36:11 UTC 2022 (4fcb983) aarch64 GNU/Linux
I did not test with a chroot to see if it behaves differently.
Yeah, no need to do that. I'll get rid of the qemu-binfmt binary, and of all the symlinks, from the package ASAP. They're no longer needed and are only confusing people! -- You are receiving this mail because: You are on the CC list for the bug.
participants (1)
-
bugzilla_noreply@suse.com