All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Roger Pau Monne <roger.pau@citrix.com>, <xen-devel@lists.xenproject.org>
Cc: Wei Liu <wl@xen.org>, Jan Beulich <jbeulich@suse.com>
Subject: Re: [Xen-devel] [PATCH v2 2/3] x86: check for multiboot{1, 2} header presence
Date: Fri, 21 Jun 2019 18:20:54 +0100	[thread overview]
Message-ID: <bcd1e204-89ab-6337-e432-6ecd8bb5e53c@citrix.com> (raw)
In-Reply-To: <20190621163802.29808-3-roger.pau@citrix.com>

On 21/06/2019 17:38, Roger Pau Monne wrote:
> After building the hypervisor binary. Note that the check is performed
> by searching for the magic header value at the start of the binary.
>
> Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
> ---
> Cc: Jan Beulich <jbeulich@suse.com>
> Cc: Andrew Cooper <andrew.cooper3@citrix.com>
> Cc: Wei Liu <wl@xen.org>

While the change is ok, won't this break the gitlab CI which is
currently using the llvm-8 toolchain?

> ---
> Changes since v1:
>  - Use an intermediate file to perform the header checks.
> ---
>  xen/arch/x86/Makefile | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/xen/arch/x86/Makefile b/xen/arch/x86/Makefile
> index 8a8d8f060f..5c908c49e3 100644
> --- a/xen/arch/x86/Makefile
> +++ b/xen/arch/x86/Makefile
> @@ -100,8 +100,12 @@ syms-warn-dup-y := --warn-dup
>  syms-warn-dup-$(CONFIG_SUPPRESS_DUPLICATE_SYMBOL_WARNINGS) :=
>  
>  $(TARGET): $(TARGET)-syms $(efi-y) boot/mkelf32
> -	./boot/mkelf32 $(notes_phdrs) $(TARGET)-syms $(TARGET) $(XEN_IMG_OFFSET) \
> +	./boot/mkelf32 $(notes_phdrs) $(TARGET)-syms $(@D)/.$(@F) $(XEN_IMG_OFFSET) \
>  	               `$(NM) $(TARGET)-syms | sed -ne 's/^\([^ ]*\) . __2M_rwdata_end$$/0x\1/p'`
> +	# Check for multiboot{1,2} headers
> +	od -t x4 -N 8192 $(@D)/.$(@F) | grep 1badb002 > /dev/null
> +	od -t x4 -N 32768 $(@D)/.$(@F) | grep e85250d6 > /dev/null
> +	mv $(@D)/.$(@F) $(TARGET)

This might be a bit cleaner to read as

$(TARGET): tmp=$(@D)/.$(@F)
$(TARGET): $(TARGET)-syms $(efi-y) boot/mkelf32

rather than having $(@D)/.$(@F) spread throughout the rule.

~Andrew

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

  reply	other threads:[~2019-06-21 17:21 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-21 16:37 [Xen-devel] [PATCH v2 0/3] misc improvements Roger Pau Monne
2019-06-21 16:38 ` [Xen-devel] [PATCH v2 1/3] x86/linker: use DECL_SECTION uniformly Roger Pau Monne
2019-06-21 16:38 ` [Xen-devel] [PATCH v2 2/3] x86: check for multiboot{1, 2} header presence Roger Pau Monne
2019-06-21 17:20   ` Andrew Cooper [this message]
2019-06-21 17:30     ` Roger Pau Monné
2019-06-21 16:38 ` [Xen-devel] [PATCH v2 3/3] x86/linker: add a reloc section to ELF binary Roger Pau Monne
2019-06-24  7:35   ` Jan Beulich

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=bcd1e204-89ab-6337-e432-6ecd8bb5e53c@citrix.com \
    --to=andrew.cooper3@citrix.com \
    --cc=jbeulich@suse.com \
    --cc=roger.pau@citrix.com \
    --cc=wl@xen.org \
    --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.