From patchwork Thu May 20 12:30:10 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Roger_Pau_Monn=C3=A9?= X-Patchwork-Id: 12270121 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A70ECC433B4 for ; Thu, 20 May 2021 12:30:45 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 4D753611ED for ; Thu, 20 May 2021 12:30:45 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4D753611ED Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=citrix.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from list by lists.xenproject.org with outflank-mailman.130928.244971 (Exim 4.92) (envelope-from ) id 1ljhos-00076W-PI; Thu, 20 May 2021 12:30:30 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 130928.244971; Thu, 20 May 2021 12:30:30 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1ljhos-00076P-LM; Thu, 20 May 2021 12:30:30 +0000 Received: by outflank-mailman (input) for mailman id 130928; Thu, 20 May 2021 12:30:29 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1ljhor-00076J-0Z for xen-devel@lists.xenproject.org; Thu, 20 May 2021 12:30:29 +0000 Received: from esa4.hc3370-68.iphmx.com (unknown [216.71.155.144]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 1c89876f-37e6-41c3-b55c-1262c17a5cb3; Thu, 20 May 2021 12:30:27 +0000 (UTC) X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 1c89876f-37e6-41c3-b55c-1262c17a5cb3 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1621513827; h=from:to:cc:subject:date:message-id: content-transfer-encoding:mime-version; bh=S6R9/4+ouCIYKdaAg20d3aEyrHyjFZM5VLIj6sTkVjA=; b=KN19loinZsyYzZqwwvk9rS/aR0O+gPSJ+zEUv/KIiLQUuByh7cKpAi6I l17c4IOhCO3VAkHwuk17o2KHrl1RSY4MXdl0sOQrC9YXHHSbPrXB/vePg gEJzxelO2AdEdrjW64VtLV1bUhvvw9VAbAO0/o0J0xeIwkzp0ln7ZfiEe U=; Authentication-Results: esa4.hc3370-68.iphmx.com; dkim=pass (signature verified) header.i=@citrix.onmicrosoft.com IronPort-SDR: ingEAIdoWJ4amoCfXnaXqwCfpqXOGuDL8Go/9mxVmtzuQsI9GYJ/2cean/rDTaSQhEVDI4u+J3 OPBW8YLvwofcVf3dKj2LNyx9yrkx5tvsHyXPVZ4a9Av3UPIqTCOwtdxDWEt+dy+0HN7M4JuzN/ VqXV8hZUKznBlTdB9JWuMhnR3udXoIUCfzkjIJacbZNqeXfj3ULTk0uWSbNdECdnr1Ios2ydZX oM1iR+lKC2Cpd3UfZdx+iuyprGBuy58WZ/3HnRmQcSsX/1CJ72J2ZebsZ8kNOKFPpNsbqs+rkM k7Q= X-SBRS: 5.1 X-MesageID: 45773330 X-Ironport-Server: esa4.hc3370-68.iphmx.com X-Remote-IP: 162.221.158.21 X-Policy: $RELAYED IronPort-Data: A9a23:8xppoqgwj5qMiPuwrhCuMMnbX161fRAKZh0ujC45NGQN5FlHY01je htvWmGGPffcYjP0f4t0Oom0oEMH75aBz4cwSwtr/ywyHywb9cadCdqndUqhZCn6wu8v7a5EA 2fyTvGacajYm1eF/k/F3oDJ9CI6iufQLlbFILas1hpZHGeIcw98z0I58wIFqtQw24HhXlrc4 Y2aT/D3YzdJ5RYlagr41IrbwP9flKyaVOQw5wFWiVhj5TcyplFNZH4tDfjZw0jQG+G4KtWSV efbpIxVy0uCl/sb5nFJpZ6gGqECaua60QFjERO6UYD66vRJjnRaPqrWqJPwwKqY4tmEt4kZ9 TlDiXC/YR14Evzuofk8bxBzOiB5F/UB5Z3jeVHq5KR/z2WeG5ft6/BnDUVwNowE4OdnR2pJ8 JT0KhhUMErF3bjvhuvmGq8236zPL+GyVG8bkmtnwjzDS+4vXLjIQrnQ5M8e1zA17ixLNaqDO JVCMmE3BPjGS0x+Jg0sKoATpvmxqnWheBJI80io/4NitgA/yyQuieOwYbI5YOeiVchT20qVu G/C12D4GQ0BcsySzyKf9XChjfOJmjn0MKoTC7+Q5vNsmEeUxGEYFFsRT1TTifuzh1O6WtlfA 1cJ4Sdopq83nGSpU938UhuQsHOC+BkGVLJ4CPYm4QuAzq7V5QexBWUeSDNFLts8u6ceWjgCx lKP2dTzClRSXKa9ECzHsO3O9HXrZHhTdzZqiTI4oRUt+YjP8aMKkzPzR/1KEamf1proOxWo6 mXfxMQhvIn/nfLnxo3iowqe2WP998CUJuImzl+JBzr4t2uVcKbgN9TxswmDhRpVBNvBFjG8U G44d99yBQzkJb+KjjDFZOwQELyz6/+BPVUwanY0RMJ4qVxBF5O5FL28AQ2Sxm8yaK7omhezO ic/XD+9A7cJbROXgVdfOd7ZNijT5fGI+S7ZuhXogj1mPsAZSeN61HgxNBT4M57FyRd8+U3AB XtrWZn1VitLYUiW5BG3W/0cwdcWKtMWnjqOLa0XOy+PjOrPDFbIGOxtGAbfMYgEAFas/Vy9H yB3bJDRlX2ykYTWP0HqzGLkBQBbdSRkXciu9aS6tIere2JbJY3oMNeIqZsJcI15haVF0ODO+ 3C2QEhDz1Tjw3bALG23hrpLMdsDgb4XQaoHABER IronPort-HdrOrdr: A9a23:ymSPMKxrJ6Um06LSKKtYKrPw5b1zdoMgy1knxilNoNJuEvBw9v re/sjzuiWYtN98Yh4dcJW7SdC9qBDnhP1ICOsqV4tKNTOO0FdAbrsSi7cKpQePJ8SXzIVgPM xbH5SWZueQMXFKyevCpCyCP/lI+qjjzImYwcrT1XVVdicvQL1h6goRMHf9LmRGACRLH5gBL7 zZwsZcvTKvdU8aYa2Adx04Y9Q= X-IronPort-AV: E=Sophos;i="5.82,313,1613451600"; d="scan'208";a="45773330" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Q7wkF3/MW7GkQuMsxmqZ7BuYd9ZxXKi0bEc+SWX3PevcmSru6Sfez0kyhZeam3i3Al7UaRnemSyiGbpFpD+Qqon22RVrKhF1VlvkikhR+Fl2ONzifYuATYd85ZgAsOH4tNZMD8B8IKEhxfIeOKHsCkKFUeyVlEbgtmbdDhg4TYPg8vjiyPNTEVE5q7I5dyinEaKnNXqI40Yb4B+qQBn36DUy/RQ3OnkYebEFp7/h1HLZw9gjy1exZCrNkYqL0DjAk1cThYNTbqFQraiP85OnusOJNeOT8rX6nxnPObn4xphRqw3yOQPhsiPhysE7DgGGEpBqj0+BAbN0eeOknTpbRg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=WHxq2OPylvnc+qBbuMabDm0op4+VbArYNpTBZ2saP6I=; b=dVThx6r+9iDIWoX+Di9n4xUXP8Abcqlzxg7E7Cka8DapmGK/tSLVqRBZTgAS3JSVy5DX4M4oY9hJBWmhO1nOXQpHzdjs7xRDA3FHCQwgaP+ISXUVOiOiuR/kBmXyzrsWtcBqVYkOvwHMzzn+GyRxR2CvKGWf5fD3G//Yqqx9sQrGS9k3CXvYg2NEyJCUvnNHQN0BSF9zz32GqpnWty3RggwXiFgSeggCe72VtEZH3zIvHcprtFIcVgNOl7TY7DO/urJxMwvKDgrceObeawVl4AbnysOTw26vGAxi3i6XrrH6kkTxZ5WQpF7LNv8FkIexWiLTdiFkJd7vYchqIZ29vQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=citrix.onmicrosoft.com; s=selector2-citrix-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=WHxq2OPylvnc+qBbuMabDm0op4+VbArYNpTBZ2saP6I=; b=lfjq1AXBssrsXCUzjmB5Wdc1qmEBo11d4E8JbSFXsGlFThLPbnGkM0DXiONZ6ntzOkD6gmQZiV1LRK9iNLRK1S1e806BrFpR6wFv0Xx+EdqUrJSAzIsDeEmpLEYhsmn0E2kCvUOqXnSl9svAcYgPeG0rD7VwintNhfhiQXm8Dtk= From: Roger Pau Monne To: CC: Roger Pau Monne , Andrew Cooper , George Dunlap , "Ian Jackson" , Jan Beulich , Julien Grall , Stefano Stabellini , Wei Liu Subject: [PATCH v3 0/2] libelf: small fixes for PVH Date: Thu, 20 May 2021 14:30:10 +0200 Message-ID: <20210520123012.89855-1-roger.pau@citrix.com> X-Mailer: git-send-email 2.31.1 X-ClientProxiedBy: MRXP264CA0033.FRAP264.PROD.OUTLOOK.COM (2603:10a6:500:14::21) To DS7PR03MB5608.namprd03.prod.outlook.com (2603:10b6:5:2c9::18) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 1584a063-ca12-4813-f9ba-08d91b8b09f8 X-MS-TrafficTypeDiagnostic: DM6PR03MB4218: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:8882; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: L9nL3Wyb91xTA3qbCewHlZUaniCgdzRDcZ0mvS282rNAGUS96W+kmb823rWFBHL0IB+9mrY/a9wQeLRAlGBcp0sBrR0cP5H+a+iiFiUt/Rmlyr7MlJSL8CogOnJ8VySRvaWbWhHxMAELdRdi057v1u88DnVDPRUTu9n+Jcb5vh8KWh/zQaVmviPoRq2rw7yYc23ygi/l4k/wS9GaqPSHSe313psqUvNExBa6680PbYPAVxPDJEN2WfX1+BYoIzqMlo+7V9Zri5CJ2aX0WRz1r+bjXAIMdIoIxKNsLDRRdeNANKR+sTWUZziGwmiW15wchdau09aMNfwqqy4JCdYo/wl1iZlr5ysEdwU0xqYB3Sx8r/C+JlgC26e1Omv5YPtnbnckSbGNseYXqjGQdmOPniHLjJIFg30kMhFNxLMGq9KWmlWXY6q6xo/yfwrkhQ52cHrq2nhuE8jX28mY5qZQtZSnegS6iT1ARrSgWz+ic9mEhe576NLGtNUdhuW9N5aqMI3ovBEVhF6OLCDG0Nx1jUBLA6X+/ogZnFd9ubhVKmGR0qiBxiWJT4sTN5bj6x/GFcoUpvZ/wrWcw8vLVxDjyfku5BPatngdcNe47uDSDdw= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DS7PR03MB5608.namprd03.prod.outlook.com;PTR:;CAT:NONE;SFS:(4636009)(39860400002)(366004)(396003)(376002)(136003)(346002)(6496006)(16526019)(8676002)(5660300002)(8936002)(186003)(2906002)(2616005)(6666004)(66556008)(66476007)(956004)(66946007)(1076003)(4744005)(26005)(86362001)(478600001)(6916009)(6486002)(38100700002)(36756003)(316002)(4326008)(83380400001)(54906003);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData: =?utf-8?q?M3GyAG1BT8zP2+sfXEvsVNcOm9NWUv?= =?utf-8?q?Z6VF4bs6OSdyogWVEub559+tMxRdISIwSx+0lU5RoRUT82Z0rR0wAFeBiCI0TAfcl?= =?utf-8?q?wpmn+cVwN9XTNxQHa3emBzUPPI4jX98I6yLEhIY1uXbQTJNO/9IL3jDXKBgqkdKQX?= =?utf-8?q?oEkICpNbx7wkSIUpjtOl3jBc37REr8sq81hoJDoBakM0m4h2mGPq385L4F86sf/Ov?= =?utf-8?q?3gVlat8WPFVybM4LcVUBkm+8kQ6Gvr26Kd16x0bBl/ZfBYIF760K+Grqan4UlAewT?= =?utf-8?q?S2ZaC5rWzppszWX25i11xhZUEpancevN9V3eK9C5ctZDmyjRrxM6INXMKdfP17pY5?= =?utf-8?q?t+oRD+ROnyj6fHUeOcPz2DPenhm8fnqZt2CY38W4mdiPWgmscvtOb5igIW7y+33F6?= =?utf-8?q?3i20VhsifDU0Ecu+o1MOYcB2tEPJyhTD8bqS88Rm2jPwuHRN9CQIa2LNuCzyWI++P?= =?utf-8?q?dYZVoiCfRmRFSc+Tf+GZmQIIk2vg3EDIg7J/Wsz10mgYt1PnaLtMyQs9a+uNH9+l1?= =?utf-8?q?nT3GTxhw6OySOooV+x7tmTucFqboJzJS6k0PfbBmS4r1g2pqFaanivE2EOIQRC96y?= =?utf-8?q?7d/Lvx9GGoQ3MHVytHJmBnpLUFJvGkvlH6FSTGmZ4i2UT1H55eP0gx2trz6PQ71TT?= =?utf-8?q?ecR9IRXmi+Iznfvqe9L+pL6LcVvJRlUHtMW5ObXu1yxY0OVCAGhy7e113kU5hOwwT?= =?utf-8?q?cAW5DymoUuuDFQm0YBGqrre/0Bu8MWbXUd+pMQkPH6tbgXlIjR/BJqEMuuPtcCTY8?= =?utf-8?q?CyDy1E/UESORU5YOQ5HOfja9Q3JwFkycls+U1JkDBpGxd6N0oUZiOwn16549XZcXn?= =?utf-8?q?JSL/vCmIxrswY7lSchuJc2Cyu9veO/U4ySgpWYr8iNbFr10Q6NjmBBQQj4O1ZeVWq?= =?utf-8?q?d15M7DhbfGTfHG1Fxp92n2Ec7dqm52WtYF/UNX8HZOdgJLzreivDKPGu4w8eAozkU?= =?utf-8?q?clG6JoycASh0FOXWb+23ZofTgLs57sH96EmJMwXPOgTE1Ow+rb18+/9zdEocjrrtM?= =?utf-8?q?M9ljfA0SKnPrgBA/TwfuDTt8G06lQpN81YcjNPL4y0CvgVpVrw9i4i1/YzcpM2IhA?= =?utf-8?q?+/8YAoi51l28px6QtQtHG6LJm2mbVtXxi+md+kX7qtk6A+lrvBtTU0DwvnvpaqFzs?= =?utf-8?q?pPYeVKA4Gu18DdTDxv/jvurNcfsJOnugGiwXsvjMCZrKERhoaUaEhKD+tNguKoQcW?= =?utf-8?q?Z2bUazLFacsswG8kUgSGeCIwW1tVO9GFsWav7jj5f0njpybwj7Tuk49tjAC4RKuOj?= =?utf-8?q?n9egklIOukLZ5N?= X-MS-Exchange-CrossTenant-Network-Message-Id: 1584a063-ca12-4813-f9ba-08d91b8b09f8 X-MS-Exchange-CrossTenant-AuthSource: DS7PR03MB5608.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 May 2021 12:30:23.2377 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 335836de-42ef-43a2-b145-348c2ee9ca5b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: DDrVkTruokSL9KYxtYBFQsRxNzq9Me39syvq9qZ5Cxws2l5wdhrKbNJdK3LyAh6R5rOIFJs3a3Wj5bOa6YwmEQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR03MB4218 X-OriginatorOrg: citrix.com Hello, A couple of small fixes for PVH loading. The first one is likely not very relevant, since PVH couldn't be booted anyway with the data in the __xen_guest section, so it's mostly a cleanup. Second patch fixes the checks for PVH loading, as in that case physical addresses must always be used to perform the bound calculations. Thanks, Roger. Roger Pau Monne (2): libelf: don't attempt to parse __xen_guest for PVH libelf: improve PVH elfnote parsing tools/fuzz/libelf/libelf-fuzzer.c | 3 +- tools/libs/guest/xg_dom_elfloader.c | 6 ++-- tools/libs/guest/xg_dom_hvmloader.c | 2 +- xen/arch/x86/hvm/dom0_build.c | 2 +- xen/arch/x86/pv/dom0_build.c | 2 +- xen/common/libelf/libelf-dominfo.c | 49 +++++++++++++++++------------ xen/include/xen/libelf.h | 2 +- 7 files changed, 39 insertions(+), 27 deletions(-)