From: Sylvain Munaut <s.munaut@whatever-company.com>
To: "xen-devel@lists.xen.org" <xen-devel@lists.xen.org>
Subject: mkelf32 incorrectly filling out the program headers for NOTE
Date: Wed, 24 Aug 2016 12:07:57 +0200 [thread overview]
Message-ID: <CAF6-1L7QvVYhr=9dcrdRND6aF-E-qD4mShAmVBvQPOwZUaiHmA@mail.gmail.com> (raw)
Hi,
Here's the readelf output (snipped) on a xen-4.7 build :
Section Headers:
[Nr] Name Type Addr Off Size ES Flg Lk Inf Al
[ 0] NULL 00000000 000000 000000 00 0 0 0
[ 1] .text PROGBITS 00100000 000080 1d0220 00 WAX 0 0 64
[ 2] .shstrtab STRTAB 00000000 1d0340 000018 00 0 0 1
[ 3] .note NOTE 00168e58 168ed8 000024 00 0 0 4
Program Headers:
Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align
LOAD 0x000080 0x00100000 0x00100000 0x1d0220 0x216000 RWE 0x40
NOTE 0x168e58 0x00168e58 0x00168e58 0x00024 0x00024 R 0x4
If you look at the "offset" value for the .note section and the NOTE
program headers, they don't match ... but both should represent an
offset inside the file image and to the same thing, so they should
match.
The correct one is the one of the .note and the incorrect value of the
program header one causes kexec to parse the header wrongly and just
plain crash. (granted it should be more robust and not segfault, but
still)
Cheers,
Sylvain Munaut,
Whatever s.a.
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
next reply other threads:[~2016-08-24 10:07 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-24 10:07 Sylvain Munaut [this message]
2016-08-24 10:33 ` mkelf32 incorrectly filling out the program headers for NOTE Jan Beulich
2016-08-24 12:42 ` Sylvain Munaut
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAF6-1L7QvVYhr=9dcrdRND6aF-E-qD4mShAmVBvQPOwZUaiHmA@mail.gmail.com' \
--to=s.munaut@whatever-company.com \
--cc=xen-devel@lists.xen.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).