* [Qemu-devel] [Bug 1317090] Re: qemu fails on ELF files with no section headers
[not found] <20140507130845.21362.34400.malonedeb@chaenomeles.canonical.com>
@ 2014-05-07 14:34 ` Paul Jimenez
2014-05-07 14:48 ` Peter Maydell
2014-08-09 4:44 ` Serge Hallyn
` (2 subsequent siblings)
3 siblings, 1 reply; 9+ messages in thread
From: Paul Jimenez @ 2014-05-07 14:34 UTC (permalink / raw)
To: qemu-devel
** Also affects: qemu
Importance: Undecided
Status: New
--
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1317090
Title:
qemu fails on ELF files with no section headers
Status in QEMU:
New
Status in “qemu” package in Ubuntu:
New
Bug description:
Using the latest version of qemu-user-static from trusty, 2.0.0+dfsg-
2ubuntu1.
Reported to qemu and patch submitted long ago by the guy who wrote http://www.devttys0.com/2011/12/qemu-vs-sstrip/
but apparently dropped on the floor - at least, I can't find it in any qemu bug tracker anywhere. It's now keeping me from running openwrt binaries under qemu-arm-static (because the openwrt guys strip section headers to save space on their teeny embedded boxes). It's a one-line patch, reproduced here:
--- qemu/linux-user/elfload.c 2011-12-02 15:16:07.637541215 -0500
+++ qemu-patched/linux-user/elfload.c 2011-12-02 15:27:24.061522798 -0500
@@ -1068,7 +1068,6 @@ static bool elf_check_ehdr(struct elfhdr
return (elf_check_arch(ehdr->e_machine)
&& ehdr->e_ehsize == sizeof(struct elfhdr)
&& ehdr->e_phentsize == sizeof(struct elf_phdr)
- && ehdr->e_shentsize == sizeof(struct elf_shdr)
&& (ehdr->e_type == ET_EXEC || ehdr->e_type == ET_DYN));
}
And I hope you'll consider patching ubuntu and maybe helping it get
pushed upstream. Thanks!
To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1317090/+subscriptions
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Qemu-devel] [Bug 1317090] Re: qemu fails on ELF files with no section headers
2014-05-07 14:34 ` [Qemu-devel] [Bug 1317090] Re: qemu fails on ELF files with no section headers Paul Jimenez
@ 2014-05-07 14:48 ` Peter Maydell
2014-05-07 14:53 ` Peter Maydell
0 siblings, 1 reply; 9+ messages in thread
From: Peter Maydell @ 2014-05-07 14:48 UTC (permalink / raw)
To: Bug 1317090; +Cc: QEMU Developers
On 7 May 2014 15:34, Paul Jimenez <1317090@bugs.launchpad.net> wrote:
> Bug description:
> Using the latest version of qemu-user-static from trusty, 2.0.0+dfsg-
> 2ubuntu1.
>
> Reported to qemu and patch submitted long ago by the guy who wrote http://www.devttys0.com/2011/12/qemu-vs-sstrip/
> but apparently dropped on the floor - at least, I can't find it in any qemu bug tracker anywhere. It's now keeping me from running openwrt binaries under qemu-arm-static (because the openwrt guys strip section headers to save space on their teeny embedded boxes). It's a one-line patch, reproduced here:
>
> --- qemu/linux-user/elfload.c 2011-12-02 15:16:07.637541215 -0500
> +++ qemu-patched/linux-user/elfload.c 2011-12-02 15:27:24.061522798 -0500
> @@ -1068,7 +1068,6 @@ static bool elf_check_ehdr(struct elfhdr
> return (elf_check_arch(ehdr->e_machine)
> && ehdr->e_ehsize == sizeof(struct elfhdr)
> && ehdr->e_phentsize == sizeof(struct elf_phdr)
> - && ehdr->e_shentsize == sizeof(struct elf_shdr)
> && (ehdr->e_type == ET_EXEC || ehdr->e_type == ET_DYN));
> }
Yeah; the equivalent kernel code:
http://lxr.linux.no/#linux+v3.14.3/fs/binfmt_elf.c#L595
doesn't check the section header size, and nor should QEMU.
thanks
-- PMM
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Qemu-devel] [Bug 1317090] Re: qemu fails on ELF files with no section headers
2014-05-07 14:48 ` Peter Maydell
@ 2014-05-07 14:53 ` Peter Maydell
2014-05-09 8:14 ` Riku Voipio
0 siblings, 1 reply; 9+ messages in thread
From: Peter Maydell @ 2014-05-07 14:53 UTC (permalink / raw)
To: Bug 1317090; +Cc: Riku Voipio, QEMU Developers
On 7 May 2014 15:48, Peter Maydell <peter.maydell@linaro.org> wrote:
> On 7 May 2014 15:34, Paul Jimenez <1317090@bugs.launchpad.net> wrote:
>> Bug description:
>> Using the latest version of qemu-user-static from trusty, 2.0.0+dfsg-
>> 2ubuntu1.
>>
>> Reported to qemu and patch submitted long ago by the guy who wrote http://www.devttys0.com/2011/12/qemu-vs-sstrip/
>> but apparently dropped on the floor - at least, I can't find it in any qemu bug tracker anywhere. It's now keeping me from running openwrt binaries under qemu-arm-static (because the openwrt guys strip section headers to save space on their teeny embedded boxes). It's a one-line patch, reproduced here:
>>
>> --- qemu/linux-user/elfload.c 2011-12-02 15:16:07.637541215 -0500
>> +++ qemu-patched/linux-user/elfload.c 2011-12-02 15:27:24.061522798 -0500
>> @@ -1068,7 +1068,6 @@ static bool elf_check_ehdr(struct elfhdr
>> return (elf_check_arch(ehdr->e_machine)
>> && ehdr->e_ehsize == sizeof(struct elfhdr)
>> && ehdr->e_phentsize == sizeof(struct elf_phdr)
>> - && ehdr->e_shentsize == sizeof(struct elf_shdr)
>> && (ehdr->e_type == ET_EXEC || ehdr->e_type == ET_DYN));
>> }
>
> Yeah; the equivalent kernel code:
> http://lxr.linux.no/#linux+v3.14.3/fs/binfmt_elf.c#L595
> doesn't check the section header size, and nor should QEMU.
Original 2011 patch:
http://lists.gnu.org/archive/html/qemu-trivial/2011-12/msg00025.html
(hitting the 'reply' button gets us back the original email
address to fix up the signed-off-by line with, so we can
credit the fix to Craig properly.)
thanks
-- PMM
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Qemu-devel] [Bug 1317090] Re: qemu fails on ELF files with no section headers
2014-05-07 14:53 ` Peter Maydell
@ 2014-05-09 8:14 ` Riku Voipio
2014-05-09 8:20 ` Peter Maydell
0 siblings, 1 reply; 9+ messages in thread
From: Riku Voipio @ 2014-05-09 8:14 UTC (permalink / raw)
To: Craig; +Cc: Peter Maydell, QEMU Developers, Bug 1317090
Hi Craig,
On Wed, May 07, 2014 at 03:53:38PM +0100, Peter Maydell wrote:
> On 7 May 2014 15:48, Peter Maydell <peter.maydell@linaro.org> wrote:
> > On 7 May 2014 15:34, Paul Jimenez <1317090@bugs.launchpad.net> wrote:
> >> Bug description:
> >> Using the latest version of qemu-user-static from trusty, 2.0.0+dfsg-
> >> 2ubuntu1.
> >>
> >> Reported to qemu and patch submitted long ago by the guy who wrote http://www.devttys0.com/2011/12/qemu-vs-sstrip/
> >> but apparently dropped on the floor - at least, I can't find it in any qemu bug tracker anywhere. It's now keeping me from running openwrt binaries under qemu-arm-static (because the openwrt guys strip section headers to save space on their teeny embedded boxes). It's a one-line patch, reproduced here:
> >>
> >> --- qemu/linux-user/elfload.c 2011-12-02 15:16:07.637541215 -0500
> >> +++ qemu-patched/linux-user/elfload.c 2011-12-02 15:27:24.061522798 -0500
> >> @@ -1068,7 +1068,6 @@ static bool elf_check_ehdr(struct elfhdr
> >> return (elf_check_arch(ehdr->e_machine)
> >> && ehdr->e_ehsize == sizeof(struct elfhdr)
> >> && ehdr->e_phentsize == sizeof(struct elf_phdr)
> >> - && ehdr->e_shentsize == sizeof(struct elf_shdr)
> >> && (ehdr->e_type == ET_EXEC || ehdr->e_type == ET_DYN));
> >> }
> >
> > Yeah; the equivalent kernel code:
> > http://lxr.linux.no/#linux+v3.14.3/fs/binfmt_elf.c#L595
> > doesn't check the section header size, and nor should QEMU.
>
> Original 2011 patch:
> http://lists.gnu.org/archive/html/qemu-trivial/2011-12/msg00025.html
> (hitting the 'reply' button gets us back the original email
> address to fix up the signed-off-by line with, so we can
> credit the fix to Craig properly.)
Can you resend the patch with your Signed-Off-By: ?
Riku
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Qemu-devel] [Bug 1317090] Re: qemu fails on ELF files with no section headers
2014-05-09 8:14 ` Riku Voipio
@ 2014-05-09 8:20 ` Peter Maydell
2014-05-09 8:57 ` Riku Voipio
0 siblings, 1 reply; 9+ messages in thread
From: Peter Maydell @ 2014-05-09 8:20 UTC (permalink / raw)
To: Riku Voipio; +Cc: Bug 1317090, QEMU Developers, Craig
On 9 May 2014 09:14, Riku Voipio <riku.voipio@iki.fi> wrote:
> Hi Craig,
>
> On Wed, May 07, 2014 at 03:53:38PM +0100, Peter Maydell wrote:
>> Original 2011 patch:
>> http://lists.gnu.org/archive/html/qemu-trivial/2011-12/msg00025.html
>
>> (hitting the 'reply' button gets us back the original email
>> address to fix up the signed-off-by line with, so we can
>> credit the fix to Craig properly.)
>
> Can you resend the patch with your Signed-Off-By: ?
Seems a bit unnecessary to force a resend -- the original
has the signoff, it's just the mailing list archive has mangled
it, so we can just restore it...
thanks
-- PMM
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Qemu-devel] [Bug 1317090] Re: qemu fails on ELF files with no section headers
2014-05-09 8:20 ` Peter Maydell
@ 2014-05-09 8:57 ` Riku Voipio
0 siblings, 0 replies; 9+ messages in thread
From: Riku Voipio @ 2014-05-09 8:57 UTC (permalink / raw)
To: Peter Maydell; +Cc: Riku Voipio, Bug 1317090, QEMU Developers, Craig
On Fri, May 09, 2014 at 09:20:54AM +0100, Peter Maydell wrote:
> On 9 May 2014 09:14, Riku Voipio <riku.voipio@iki.fi> wrote:
> > Hi Craig,
> >
> > On Wed, May 07, 2014 at 03:53:38PM +0100, Peter Maydell wrote:
> >> Original 2011 patch:
> >> http://lists.gnu.org/archive/html/qemu-trivial/2011-12/msg00025.html
> >
> >> (hitting the 'reply' button gets us back the original email
> >> address to fix up the signed-off-by line with, so we can
> >> credit the fix to Craig properly.)
> >
> > Can you resend the patch with your Signed-Off-By: ?
> Seems a bit unnecessary to force a resend -- the original
> has the signoff, it's just the mailing list archive has mangled
> it, so we can just restore it...
Right, missed that bit. Reconstructing the patch..
Riku
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Qemu-devel] [Bug 1317090] Re: qemu fails on ELF files with no section headers
[not found] <20140507130845.21362.34400.malonedeb@chaenomeles.canonical.com>
2014-05-07 14:34 ` [Qemu-devel] [Bug 1317090] Re: qemu fails on ELF files with no section headers Paul Jimenez
@ 2014-08-09 4:44 ` Serge Hallyn
2014-08-09 5:29 ` Michael Tokarev
2014-08-11 16:01 ` Serge Hallyn
3 siblings, 0 replies; 9+ messages in thread
From: Serge Hallyn @ 2014-08-09 4:44 UTC (permalink / raw)
To: qemu-devel
I see this patch now applied in the git tree around June time frame, so
marking Fix Released
** Changed in: qemu (Ubuntu)
Importance: Undecided => Medium
** Changed in: qemu (Ubuntu)
Status: New => Triaged
** Changed in: qemu (Ubuntu)
Status: Triaged => Fix Released
** Changed in: qemu
Status: New => Fix Released
--
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1317090
Title:
qemu fails on ELF files with no section headers
Status in QEMU:
Fix Released
Status in “qemu” package in Ubuntu:
Fix Released
Bug description:
Using the latest version of qemu-user-static from trusty, 2.0.0+dfsg-
2ubuntu1.
Reported to qemu and patch submitted long ago by the guy who wrote http://www.devttys0.com/2011/12/qemu-vs-sstrip/
but apparently dropped on the floor - at least, I can't find it in any qemu bug tracker anywhere. It's now keeping me from running openwrt binaries under qemu-arm-static (because the openwrt guys strip section headers to save space on their teeny embedded boxes). It's a one-line patch, reproduced here:
--- qemu/linux-user/elfload.c 2011-12-02 15:16:07.637541215 -0500
+++ qemu-patched/linux-user/elfload.c 2011-12-02 15:27:24.061522798 -0500
@@ -1068,7 +1068,6 @@ static bool elf_check_ehdr(struct elfhdr
return (elf_check_arch(ehdr->e_machine)
&& ehdr->e_ehsize == sizeof(struct elfhdr)
&& ehdr->e_phentsize == sizeof(struct elf_phdr)
- && ehdr->e_shentsize == sizeof(struct elf_shdr)
&& (ehdr->e_type == ET_EXEC || ehdr->e_type == ET_DYN));
}
And I hope you'll consider patching ubuntu and maybe helping it get
pushed upstream. Thanks!
To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1317090/+subscriptions
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Qemu-devel] [Bug 1317090] Re: qemu fails on ELF files with no section headers
[not found] <20140507130845.21362.34400.malonedeb@chaenomeles.canonical.com>
2014-05-07 14:34 ` [Qemu-devel] [Bug 1317090] Re: qemu fails on ELF files with no section headers Paul Jimenez
2014-08-09 4:44 ` Serge Hallyn
@ 2014-08-09 5:29 ` Michael Tokarev
2014-08-11 16:01 ` Serge Hallyn
3 siblings, 0 replies; 9+ messages in thread
From: Michael Tokarev @ 2014-08-09 5:29 UTC (permalink / raw)
To: qemu-devel
Hmm. Speaking of "wrong" executables. We have another bugreport in
debian, -- https://bugs.debian.org/754336 -- which might be related. But
I tried qemu-2.1-rc and it didn't run these binaries. Is it not the
same thing? (The debian bugreport has sample files attached).
** Bug watch added: Debian Bug tracker #754336
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=754336
--
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1317090
Title:
qemu fails on ELF files with no section headers
Status in QEMU:
Fix Released
Status in “qemu” package in Ubuntu:
Fix Released
Bug description:
Using the latest version of qemu-user-static from trusty, 2.0.0+dfsg-
2ubuntu1.
Reported to qemu and patch submitted long ago by the guy who wrote http://www.devttys0.com/2011/12/qemu-vs-sstrip/
but apparently dropped on the floor - at least, I can't find it in any qemu bug tracker anywhere. It's now keeping me from running openwrt binaries under qemu-arm-static (because the openwrt guys strip section headers to save space on their teeny embedded boxes). It's a one-line patch, reproduced here:
--- qemu/linux-user/elfload.c 2011-12-02 15:16:07.637541215 -0500
+++ qemu-patched/linux-user/elfload.c 2011-12-02 15:27:24.061522798 -0500
@@ -1068,7 +1068,6 @@ static bool elf_check_ehdr(struct elfhdr
return (elf_check_arch(ehdr->e_machine)
&& ehdr->e_ehsize == sizeof(struct elfhdr)
&& ehdr->e_phentsize == sizeof(struct elf_phdr)
- && ehdr->e_shentsize == sizeof(struct elf_shdr)
&& (ehdr->e_type == ET_EXEC || ehdr->e_type == ET_DYN));
}
And I hope you'll consider patching ubuntu and maybe helping it get
pushed upstream. Thanks!
To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1317090/+subscriptions
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Qemu-devel] [Bug 1317090] Re: qemu fails on ELF files with no section headers
[not found] <20140507130845.21362.34400.malonedeb@chaenomeles.canonical.com>
` (2 preceding siblings ...)
2014-08-09 5:29 ` Michael Tokarev
@ 2014-08-11 16:01 ` Serge Hallyn
3 siblings, 0 replies; 9+ messages in thread
From: Serge Hallyn @ 2014-08-11 16:01 UTC (permalink / raw)
To: qemu-devel
Yes, it's the same bug or same class of bugs where qemu is being
stricter than the kernel, for better or worse.
--
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1317090
Title:
qemu fails on ELF files with no section headers
Status in QEMU:
Fix Released
Status in “qemu” package in Ubuntu:
Fix Released
Bug description:
Using the latest version of qemu-user-static from trusty, 2.0.0+dfsg-
2ubuntu1.
Reported to qemu and patch submitted long ago by the guy who wrote http://www.devttys0.com/2011/12/qemu-vs-sstrip/
but apparently dropped on the floor - at least, I can't find it in any qemu bug tracker anywhere. It's now keeping me from running openwrt binaries under qemu-arm-static (because the openwrt guys strip section headers to save space on their teeny embedded boxes). It's a one-line patch, reproduced here:
--- qemu/linux-user/elfload.c 2011-12-02 15:16:07.637541215 -0500
+++ qemu-patched/linux-user/elfload.c 2011-12-02 15:27:24.061522798 -0500
@@ -1068,7 +1068,6 @@ static bool elf_check_ehdr(struct elfhdr
return (elf_check_arch(ehdr->e_machine)
&& ehdr->e_ehsize == sizeof(struct elfhdr)
&& ehdr->e_phentsize == sizeof(struct elf_phdr)
- && ehdr->e_shentsize == sizeof(struct elf_shdr)
&& (ehdr->e_type == ET_EXEC || ehdr->e_type == ET_DYN));
}
And I hope you'll consider patching ubuntu and maybe helping it get
pushed upstream. Thanks!
To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1317090/+subscriptions
^ permalink raw reply [flat|nested] 9+ messages in thread