[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen master] xen/xsplice: add ELFOSABI_FREEBSD as a supported OSABI for payloads



commit f8c66c2ad2efdb281e4ebf15bf329d73c4f02ce7
Author:     Roger Pau Monne <roger.pau@xxxxxxxxxx>
AuthorDate: Tue May 3 12:55:09 2016 +0200
Commit:     Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>
CommitDate: Fri May 6 12:32:02 2016 -0400

    xen/xsplice: add ELFOSABI_FREEBSD as a supported OSABI for payloads
    
    The calling convention used by the FreeBSD ELF OSABI is exactly the same as
    the the one defined by System V, so payloads with a FreeBSD OSABI should be
    accepted by the xsplice machinery.
    
    Specifically "the FreeBSD ELF OSABI only has a meaning for userspace
    applications, it's used by FreeBSD in order to detect if an application
    is native or if it needs to be run in the linuxator (the Linux emulator,
    or any other emulator that is available and matches the ELF OSABI specified
    in the binary FWIW).
    
    The only difference from SYSV to FreeBSD OSABI is the sysentvec that's
    selected inside of the FreeBSD kernel (the ABI between the kernel and the
    user-space application), but of course this doesn't apply to kernel code,
    which is what Xen and the xsplice payloads are. Sadly this is not written
    anywhere. " And since the ELF tools on FreeBSD by default build with
    this - they would stick this OSABI entry.
    
    Signed-off-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>
    Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>
    Reviewed-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
    Acked-by: Ross Lagerwall <ross.lagerwall@xxxxxxxxxx>
---
 xen/common/xsplice_elf.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/xen/common/xsplice_elf.c b/xen/common/xsplice_elf.c
index 1e1f167..d59759f 100644
--- a/xen/common/xsplice_elf.c
+++ b/xen/common/xsplice_elf.c
@@ -397,7 +397,8 @@ 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_NONE ||
+         (hdr->e_ident[EI_OSABI] != ELFOSABI_NONE &&
+          hdr->e_ident[EI_OSABI] != ELFOSABI_FREEBSD) ||
          hdr->e_type != ET_REL ||
          hdr->e_phnum != 0 )
     {
--
generated by git-patchbot for /home/xen/git/xen.git#master

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.