From nobody Wed May 1 21:45:54 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org ARC-Seal: i=1; a=rsa-sha256; t=1557920519; cv=none; d=zoho.com; s=zohoarc; b=XAhgN0yImRlekOoM1Fl2Gt1O4zPKrGc9BzdyzdzXMyXxiapcIhZr3PuM1E8/GQwW/l1hrJRvePhckURghcwYEzqpQKMp8siclYiTDfhkAKyvtTnO8dn//t0DH2raH4MuOS9ekWU2JMq56EpD3ITXC5mn1t577aASrt499GYk454= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1557920519; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To:ARC-Authentication-Results; bh=3pAVZncg7fU2AC3iCa3lGEpwyCCFEgBb2e6mtrcdmIg=; b=HjZu9s4h7YOmlJ1yGowhZOMVLBD2nmW6SoH2+Ne9h9+qjDukiaTTmfx2dHTHYNLSyVuxKeoi0Fkvn3CBNDf1L5NGuZ/nDD6KyK0eyAUYY+TO1T0BsNdsQyffq3fwbLNDeHXp+wBOVzD6tpci+G4zNl85nS+EZ595GPGmyHsVRUM= ARC-Authentication-Results: i=1; mx.zoho.com; spf=none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1557920519181793.3218396396993; Wed, 15 May 2019 04:41:59 -0700 (PDT) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hQsGz-0004Sk-JP; Wed, 15 May 2019 11:40:37 +0000 Received: from us1-rack-dfw2.inumbo.com ([104.130.134.6]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hQsGy-0004SY-AW for xen-devel@lists.xenproject.org; Wed, 15 May 2019 11:40:36 +0000 Received: from esa3.hc3370-68.iphmx.com (unknown [216.71.145.155]) by us1-rack-dfw2.inumbo.com (Halon) with ESMTPS id 40a9aa70-7706-11e9-8980-bc764e045a96; Wed, 15 May 2019 11:40:35 +0000 (UTC) X-Inumbo-ID: 40a9aa70-7706-11e9-8980-bc764e045a96 Authentication-Results: esa3.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none; spf=None smtp.pra=anthony.perard@citrix.com; spf=SoftFail smtp.mailfrom=anthony.perard@citrix.com; spf=None smtp.helo=postmaster@MIAPEX02MSOL02.citrite.net Received-SPF: none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Received-SPF: None (esa3.hc3370-68.iphmx.com: no sender authenticity information available from domain of anthony.perard@citrix.com) identity=pra; client-ip=23.29.105.83; receiver=esa3.hc3370-68.iphmx.com; envelope-from="anthony.perard@citrix.com"; x-sender="anthony.perard@citrix.com"; x-conformance=sidf_compatible Received-SPF: SoftFail (esa3.hc3370-68.iphmx.com: domain of anthony.perard@citrix.com is inclined to not designate 23.29.105.83 as permitted sender) identity=mailfrom; client-ip=23.29.105.83; receiver=esa3.hc3370-68.iphmx.com; envelope-from="anthony.perard@citrix.com"; x-sender="anthony.perard@citrix.com"; x-conformance=sidf_compatible; x-record-type="v=spf1"; x-record-text="v=spf1 mx include:spf.citrix.com include:spf2.citrix.com include:ironport.citrix.com include:_spf.salesforce.com ~all" Received-SPF: None (esa3.hc3370-68.iphmx.com: no sender authenticity information available from domain of postmaster@MIAPEX02MSOL02.citrite.net) identity=helo; client-ip=23.29.105.83; receiver=esa3.hc3370-68.iphmx.com; envelope-from="anthony.perard@citrix.com"; x-sender="postmaster@MIAPEX02MSOL02.citrite.net"; x-conformance=sidf_compatible IronPort-SDR: ncXw90FgGqkDGu/2VA9OL0JeCSJC5S2AJH2ZdqKqhvUH3x19fOWIAys688HirFlAbUezoaUP5u jNMcu6rOJiwwA3tSi4VJp3t8GkAtcVv1YZOYDXz3RU23odCzfFuZb+VqYRpLGtSdhf/BXjQIGH sQoHtoru6F3HxIQZz/ObgGJ7E9DUGDeOkQmu7MLFUA8UwabLGFwJc/DhA8Iw3NPx5ewE3Bwln+ jkpjNcbrszK8ax5SWFRqyrMpaLtlR8/VzK+6teeoS29iRqc9qsscxaq0H9F2mJ6qxaqw8MiwOT VK4= X-SBRS: 2.7 X-MesageID: 463370 X-Ironport-Server: esa3.hc3370-68.iphmx.com X-Remote-IP: 23.29.105.83 X-Policy: $RELAYED X-IronPort-AV: E=Sophos;i="5.60,472,1549947600"; d="scan'208";a="463370" From: Anthony PERARD To: Date: Wed, 15 May 2019 12:40:15 +0100 Message-ID: <20190515114015.25492-1-anthony.perard@citrix.com> X-Mailer: git-send-email 2.21.0 MIME-Version: 1.0 Subject: [Xen-devel] [PATCH] libxc: elf_kernel loader: Remove check for shstrtab X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Anthony PERARD , Wei Liu , Ian Jackson Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" This was probably useful to load ELF Note, but now ELF notes "should live in a PT_NOTE segment" (elfnote.h). With notes living in segment, there are no need for sections, so there is nothing to be stored in the shstrtab. This patch would allow to write a simpler ELF header for an OVMF blob (which isn't an ELF) and allow it to be loaded as a PVH kernel. The header only needs to declare two program segments: - one to tell an ELF loader where to put the blob, - one for a Xen ELFNOTE. The ELFNOTE is to comply to the pvh design which wants the XEN_ELFNOTE_PHYS32_ENTRY to declare a blob as compaptible with the PVH boot ABI. Note that without the ELFNOTE, libxc will load an ELF but with the plain ELF loader, which doesn't check for shstrtab. Signed-off-by: Anthony PERARD Acked-by: Wei Liu --- tools/libxc/xc_dom_elfloader.c | 9 --------- 1 file changed, 9 deletions(-) diff --git a/tools/libxc/xc_dom_elfloader.c b/tools/libxc/xc_dom_elfloader.c index 82b5f2ee79..b327db219d 100644 --- a/tools/libxc/xc_dom_elfloader.c +++ b/tools/libxc/xc_dom_elfloader.c @@ -165,15 +165,6 @@ static elf_negerrnoval xc_dom_parse_elf_kernel(struct = xc_dom_image *dom) return rc; } =20 - /* Find the section-header strings table. */ - if ( ELF_PTRVAL_INVALID(elf->sec_strtab) ) - { - xc_dom_panic(dom->xch, XC_INVALID_KERNEL, "%s: ELF image" - " has no shstrtab", __FUNCTION__); - rc =3D -EINVAL; - goto out; - } - /* parse binary and get xen meta info */ elf_parse_binary(elf); if ( elf_xen_parse(elf, &dom->parms) !=3D 0 ) --=20 Anthony PERARD _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel