Message ID | 1461939680-32574-5-git-send-email-roger.pau@citrix.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
>>> On 29.04.16 at 16:21, <roger.pau@citrix.com> wrote: > FreeBSD linker sets the OS ABI to ELFOSABI_FREEBSD, but the payload can > still be loaded without issues. > > All the ELF OS ABIs follow the System V calling convention, and the OS ABI > doesn't really matter because Xen is a standalone kernel. Well, first of all our name is wrong. The correct one is ELFOSABI_NONE, as I did also write in one of the xSplice patch reviews. And this _is_ the correct thing to expect here, as other settings may imply behavioral changes. If other ABIs are also fine, they can be added, but we can't ignore that field. Jan > 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 | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/xen/common/xsplice_elf.c b/xen/common/xsplice_elf.c > index e403a0e..de68d29 100644 > --- a/xen/common/xsplice_elf.c > +++ b/xen/common/xsplice_elf.c > @@ -397,7 +397,6 @@ 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_type != ET_REL || > hdr->e_phnum != 0 ) > { > -- > 2.6.4 (Apple Git-63) > > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xen.org > http://lists.xen.org/xen-devel
On Fri, Apr 29, 2016 at 08:48:39AM -0600, Jan Beulich wrote: > >>> On 29.04.16 at 16:21, <roger.pau@citrix.com> wrote: > > FreeBSD linker sets the OS ABI to ELFOSABI_FREEBSD, but the payload can > > still be loaded without issues. > > > > All the ELF OS ABIs follow the System V calling convention, and the OS ABI > > doesn't really matter because Xen is a standalone kernel. > > Well, first of all our name is wrong. The correct one is > ELFOSABI_NONE, as I did also write in one of the xSplice patch > reviews. And this _is_ the correct thing to expect here, as other > settings may imply behavioral changes. If other ABIs are also > fine, they can be added, but we can't ignore that field. Thanks for the review. I'm going to change it to ELFOSABI_NONE and then add ELFOSABI_FREEBSD as a supported OSABI also. Roger.
diff --git a/xen/common/xsplice_elf.c b/xen/common/xsplice_elf.c index e403a0e..de68d29 100644 --- a/xen/common/xsplice_elf.c +++ b/xen/common/xsplice_elf.c @@ -397,7 +397,6 @@ 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_type != ET_REL || hdr->e_phnum != 0 ) {
FreeBSD linker sets the OS ABI to ELFOSABI_FREEBSD, but the payload can still be loaded without issues. All the ELF OS ABIs follow the System V calling convention, and the OS ABI doesn't really matter because Xen is a standalone kernel. 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 | 1 - 1 file changed, 1 deletion(-)