diff mbox

[v2,for-4.7,4/6] xen/xsplice: check against ELFOSABI_NONE instead of ELFOSABI_SYSV

Message ID 1462272910-41200-5-git-send-email-roger.pau@citrix.com (mailing list archive)
State New, archived
Headers show

Commit Message

Roger Pau Monne May 3, 2016, 10:55 a.m. UTC
They are equivalent, but using ELFOSABI_NONE is more correct in this
context.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
---
Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: Ross Lagerwall <ross.lagerwall@citrix.com>
---
 xen/common/xsplice_elf.c     | 2 +-
 xen/include/xen/elfstructs.h | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

Comments

Andrew Cooper May 3, 2016, 12:22 p.m. UTC | #1
On 03/05/16 11:55, Roger Pau Monne wrote:
> They are equivalent, but using ELFOSABI_NONE is more correct in this
> context.
>
> Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>

Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
Jan Beulich May 3, 2016, 2:13 p.m. UTC | #2
>>> On 03.05.16 at 12:55, <roger.pau@citrix.com> wrote:
> They are equivalent, but using ELFOSABI_NONE is more correct in this
> context.
> 
> Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>

Pick one of
{Acked,Suggested}-by: Jan Beulich <jbeulich@suse.com>
Jan Beulich May 4, 2016, 7:50 a.m. UTC | #3
>>> On 03.05.16 at 12:55, <roger.pau@citrix.com> wrote:
> They are equivalent, but using ELFOSABI_NONE is more correct in this
> context.
> 
> Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>

I've committed this as benign to the resulting binary and obvious
improvement to the source, without waiting for further acks.

Roger - please try to remember to Cc Wei on patches you want to
go into 4.7.

Jan
diff mbox

Patch

diff --git a/xen/common/xsplice_elf.c b/xen/common/xsplice_elf.c
index e403a0e..1e1f167 100644
--- a/xen/common/xsplice_elf.c
+++ b/xen/common/xsplice_elf.c
@@ -397,7 +397,7 @@  static int xsplice_header_check(const struct xsplice_elf *elf)
     if ( hdr->e_version != EV_CURRENT ||
          hdr->e_ident[EI_VERSION] != EV_CURRENT ||
          hdr->e_ident[EI_ABIVERSION] != 0 ||
-         hdr->e_ident[EI_OSABI] != ELFOSABI_SYSV ||
+         hdr->e_ident[EI_OSABI] != ELFOSABI_NONE ||
          hdr->e_type != ET_REL ||
          hdr->e_phnum != 0 )
     {
diff --git a/xen/include/xen/elfstructs.h b/xen/include/xen/elfstructs.h
index 615eb06..68954b0 100644
--- a/xen/include/xen/elfstructs.h
+++ b/xen/include/xen/elfstructs.h
@@ -81,6 +81,7 @@  typedef uint64_t	Elf64_Xword;
 
 /* e_ident[] Operating System/ABI */
 #define ELFOSABI_SYSV		0	/* UNIX System V ABI */
+#define ELFOSABI_NONE		0	/* Same as ELFOSABI_SYSV */
 #define ELFOSABI_HPUX		1	/* HP-UX operating system */
 #define ELFOSABI_NETBSD		2	/* NetBSD */
 #define ELFOSABI_LINUX		3	/* GNU/Linux */