Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 02 Jun 2016 21:17:57 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-ports-bugs@FreeBSD.org
Subject:   [Bug 209983] [rc.d] emulators/qemu-user-static: incorrect ELF magic to run powerpc64 binaries
Message-ID:  <bug-209983-13@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D209983

            Bug ID: 209983
           Summary: [rc.d] emulators/qemu-user-static: incorrect ELF magic
                    to run powerpc64 binaries
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Keywords: patch
          Severity: Affects Only Me
          Priority: ---
         Component: Individual Port(s)
          Assignee: sbruno@FreeBSD.org
          Reporter: jbeich@FreeBSD.org
                CC: sbruno@FreeBSD.org
 Attachment #170961 maintainer-approval?(sbruno@FreeBSD.org)
             Flags:
             Flags: maintainer-feedback?(sbruno@FreeBSD.org)
                CC: sbruno@FreeBSD.org
          Assignee: sbruno@FreeBSD.org

Created attachment 170961
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D170961&action=
=3Dedit
fix

rc.d/qemu_user_static assumes powerpc and powerpc64 have the same ELF magic
which is actually false, at least on 11.0-CURRENT.

$ poudriere jail -cj head-powerpc64 -a powerpc.powerpc64 -m svn+https -v he=
ad
[...]

$ service qemu_user_static onestart

$ chroot /poudriere/jails/head-powerpc64 /rescue/date
chroot: /rescue/date: Exec format error

$ binmiscctl list
[...]
name: powerpc64
interpreter: /usr/local/bin/qemu-ppc64-static
flags: ENABLED USE_MASK
magic size: 20
magic offset: 0
magic: 0x7f 0x45 0x4c 0x46  0x01 0x02 0x01 0x00  0x00 0x00 0x00 0x00
       0x00 0x00 0x00 0x00  0x00 0x02 0x00 0x15
mask:  0xff 0xff 0xff 0xff  0xff 0xff 0xff 0x00  0xff 0xff 0xff 0xff
       0xff 0xff 0xff 0xff  0xff 0xfe 0xff 0xff
[...]

$ hd -n20 /poudriere/jails/head-powerpc64/rescue/date
00000000  7f 45 4c 46 02 02 01 09  00 00 00 00 00 00 00 00  |.ELF..........=
..|
00000010  00 02 00 15                                       |....|
00000014

$ poudriere jail -l | fgrep powerpc64
head-powerpc64 11.0-CURRENT r300425 powerpc.powerpc64 svn+https 2016-05-22
18:46:03 /poudriere/jails/head-powerpc64

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-209983-13>