All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Jan Beulich" <JBeulich@suse.com>
To: Daniel Kiper <daniel.kiper@oracle.com>
Cc: Andrew Cooper <andrew.cooper3@citrix.com>,
	xen-devel <xen-devel@lists.xenproject.org>
Subject: Re: [PATCH RFC 2/7] xen/x86: Manually build PE header
Date: Tue, 15 May 2018 02:01:40 -0600	[thread overview]
Message-ID: <5AFA93E402000078001C2BF7@prv1-mh.provo.novell.com> (raw)
In-Reply-To: <20180514165201.GO12135@olila.local.net-space.pl>

>>> On 14.05.18 at 18:52, <daniel.kiper@oracle.com> wrote:
> On Mon, May 14, 2018 at 04:40:39AM -0600, Jan Beulich wrote:
>> >>> On 08.05.18 at 14:47, <daniel.kiper@oracle.com> wrote:
>> > On Fri, May 04, 2018 at 09:38:03AM -0600, Jan Beulich wrote:
>> >> >>> On 08.07.17 at 23:53, <daniel.kiper@oracle.com> wrote:
>> >> > +        /*
>> >> > +         * DOS message.
>> >> > +         *
>> >> > +         * It is copied from binutils package, version 2.28,
>> >> > +         * include/coff/pe.h:struct external_PEI_filehdr and
>> >> > +         * bfd/peXXigen.c:_bfd_XXi_only_swap_filehdr_out().
>> >> > +         */
>> >> > +        .long   0x0eba1f0e
>> >> > +        .long   0xcd09b400
>> >> > +        .long   0x4c01b821
>> >> > +        .long   0x685421cd
>> >> > +        .long   0x70207369
>> >> > +        .long   0x72676f72
>> >> > +        .long   0x63206d61
>> >> > +        .long   0x6f6e6e61
>> >> > +        .long   0x65622074
>> >> > +        .long   0x6e757220
>> >> > +        .long   0x206e6920
>> >> > +        .long   0x20534f44
>> >> > +        .long   0x65646f6d
>> >> > +        .long   0x0a0d0d2e
>> >> > +        .long   0x24
>> >> > +        .long   0
>> >>
>> >> Other than what the comment says, this isn't just a message (or else you
>> >> could have used .asciz for the whole thing). I'm not convinced we need
>> >> any of this.
>> >
>> > Potentially we can drop this. However, ld from binutils put this into
>> > EFI binary. And IIRC this is exactly what is embedded by other linkers
>> > into PE/COFF compatible files, e.g. *.efi, *.exe, *.dll, etc. So,
>> > I would leave this just for the sake of compatibility.
>>
>> Having this in .exe files is indeed helpful (or at least was back when DOS still
>> played some sort of a role). In .dll it is already highly questionable, and
>> hence even more so in .efi. Let's not encode and carry cruft that's not
>> needed for anything.
> 
> OK, but I think that we should leave at least one or two instructions here, e.g.
> hlt and jmp back to it or something like that. Or int 0x21 with 0x4c00 in %ax.
> Latter seems better for me.

I certainly don't mind you doing something minimalistic like what you propose.

Jan



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

  reply	other threads:[~2018-05-15  8:01 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-08 21:53 [PATCH RFC 0/7] Change xen.efi build and add SHIM_LOCK verification into efi_multiboot2() Daniel Kiper
2017-07-08 21:53 ` [PATCH RFC 1/7] xen: Introduce XEN_COMPILE_POSIX_TIME Daniel Kiper
2018-04-30 15:56   ` Jan Beulich
2018-05-08 12:18     ` Daniel Kiper
2018-05-14 10:30       ` Jan Beulich
2018-05-14 16:25         ` Daniel Kiper
2018-05-15  7:47           ` Jan Beulich
2017-07-08 21:53 ` [PATCH RFC 2/7] xen/x86: Manually build PE header Daniel Kiper
2018-05-04 15:38   ` Jan Beulich
2018-05-08 12:47     ` Daniel Kiper
2018-05-14 10:40       ` Jan Beulich
2018-05-14 16:52         ` Daniel Kiper
2018-05-15  8:01           ` Jan Beulich [this message]
2017-07-08 21:53 ` [PATCH RFC 3/7] xen/x86: Add some addresses to the Multiboot header Daniel Kiper
2018-05-04 15:40   ` Jan Beulich
2018-05-08 13:01     ` Daniel Kiper
2017-07-08 21:53 ` [PATCH RFC 4/7] xen/x86: Add some addresses to the Multiboot2 header Daniel Kiper
2017-07-08 21:53 ` [PATCH RFC 5/7] efi: split out efi_shim_lock() Daniel Kiper
2017-07-08 21:53 ` [PATCH RFC 6/7] xen/x86/efi: Verify dom0 kernel with SHIM_LOCK protocol in efi_multiboot2() Daniel Kiper
2018-05-04 15:46   ` Jan Beulich
2018-05-08 13:09     ` Daniel Kiper
2018-05-14 10:43       ` Jan Beulich
2018-05-14 16:56         ` Daniel Kiper
2018-05-15  8:06           ` Jan Beulich
2017-07-08 21:53 ` [PATCH RFC 7/7] xen/x86: Build xen.mb.efi directly from xen-syms Daniel Kiper

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=5AFA93E402000078001C2BF7@prv1-mh.provo.novell.com \
    --to=jbeulich@suse.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=daniel.kiper@oracle.com \
    --cc=xen-devel@lists.xenproject.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 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.