All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] x86: correct PT_NOTE file position
@ 2016-08-24 15:24 Jan Beulich
  2016-08-24 20:45 ` Konrad Rzeszutek Wilk
  0 siblings, 1 reply; 3+ messages in thread
From: Jan Beulich @ 2016-08-24 15:24 UTC (permalink / raw)
  To: xen-devel; +Cc: Andrew Cooper

[-- Attachment #1: Type: text/plain, Size: 656 bytes --]

Program and section headers disagreed about the file offset at which
the build ID note lives.

Reported-by: Sylvain Munaut <s.munaut@whatever-company.com>
Signed-off-by: Jan Beulich <jbeulich@suse.com>

--- a/xen/arch/x86/boot/mkelf32.c
+++ b/xen/arch/x86/boot/mkelf32.c
@@ -394,7 +394,7 @@ int main(int argc, char **argv)
         note_phdr.p_paddr   = note_base;
         note_phdr.p_filesz  = note_sz;
         note_phdr.p_memsz   = note_sz;
-        note_phdr.p_offset  = offset;
+        note_phdr.p_offset  = RAW_OFFSET + offset;
 
         /* Tack on the .note\0 */
         out_shdr[2].sh_size += sizeof(out_shstrtab_extra);




[-- Attachment #2: x86-ELF-note-phdr-fileoffs.patch --]
[-- Type: text/plain, Size: 688 bytes --]

x86: correct PT_NOTE file position

Program and section headers disagreed about the file offset at which
the build ID note lives.

Reported-by: Sylvain Munaut <s.munaut@whatever-company.com>
Signed-off-by: Jan Beulich <jbeulich@suse.com>

--- a/xen/arch/x86/boot/mkelf32.c
+++ b/xen/arch/x86/boot/mkelf32.c
@@ -394,7 +394,7 @@ int main(int argc, char **argv)
         note_phdr.p_paddr   = note_base;
         note_phdr.p_filesz  = note_sz;
         note_phdr.p_memsz   = note_sz;
-        note_phdr.p_offset  = offset;
+        note_phdr.p_offset  = RAW_OFFSET + offset;
 
         /* Tack on the .note\0 */
         out_shdr[2].sh_size += sizeof(out_shstrtab_extra);

[-- Attachment #3: Type: text/plain, Size: 127 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] x86: correct PT_NOTE file position
  2016-08-24 15:24 [PATCH] x86: correct PT_NOTE file position Jan Beulich
@ 2016-08-24 20:45 ` Konrad Rzeszutek Wilk
  2016-09-02 10:48   ` Andrew Cooper
  0 siblings, 1 reply; 3+ messages in thread
From: Konrad Rzeszutek Wilk @ 2016-08-24 20:45 UTC (permalink / raw)
  To: Jan Beulich; +Cc: xen-devel, Andrew Cooper

On Wed, Aug 24, 2016 at 09:24:38AM -0600, Jan Beulich wrote:
> Program and section headers disagreed about the file offset at which
> the build ID note lives.

Gosh. That was an oversight.
> 
> Reported-by: Sylvain Munaut <s.munaut@whatever-company.com>

'whatever-company'? Really?

Huh. Imagine that.

> Signed-off-by: Jan Beulich <jbeulich@suse.com>

Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
> 
> --- a/xen/arch/x86/boot/mkelf32.c
> +++ b/xen/arch/x86/boot/mkelf32.c
> @@ -394,7 +394,7 @@ int main(int argc, char **argv)
>          note_phdr.p_paddr   = note_base;
>          note_phdr.p_filesz  = note_sz;
>          note_phdr.p_memsz   = note_sz;
> -        note_phdr.p_offset  = offset;
> +        note_phdr.p_offset  = RAW_OFFSET + offset;
>  
>          /* Tack on the .note\0 */
>          out_shdr[2].sh_size += sizeof(out_shstrtab_extra);
> 
> 
> 

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] x86: correct PT_NOTE file position
  2016-08-24 20:45 ` Konrad Rzeszutek Wilk
@ 2016-09-02 10:48   ` Andrew Cooper
  0 siblings, 0 replies; 3+ messages in thread
From: Andrew Cooper @ 2016-09-02 10:48 UTC (permalink / raw)
  To: Konrad Rzeszutek Wilk, Jan Beulich; +Cc: xen-devel

On 24/08/16 21:45, Konrad Rzeszutek Wilk wrote:
> On Wed, Aug 24, 2016 at 09:24:38AM -0600, Jan Beulich wrote:
>> Program and section headers disagreed about the file offset at which
>> the build ID note lives.
> Gosh. That was an oversight.
>> Reported-by: Sylvain Munaut <s.munaut@whatever-company.com>
> 'whatever-company'? Really?
>
> Huh. Imagine that.
>
>> Signed-off-by: Jan Beulich <jbeulich@suse.com>
> Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>

Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-09-02 10:48 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-24 15:24 [PATCH] x86: correct PT_NOTE file position Jan Beulich
2016-08-24 20:45 ` Konrad Rzeszutek Wilk
2016-09-02 10:48   ` Andrew Cooper

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.