From patchwork Tue May 3 10:55:08 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Roger_Pau_Monn=C3=A9?= X-Patchwork-Id: 9002761 Return-Path: X-Original-To: patchwork-xen-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 0029CBF29F for ; Tue, 3 May 2016 10:57:27 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 3B03A201B4 for ; Tue, 3 May 2016 10:57:26 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 4E2DF20219 for ; Tue, 3 May 2016 10:57:25 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1axXzF-0000Yu-HY; Tue, 03 May 2016 10:55:29 +0000 Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1axXzD-0000WN-J8 for xen-devel@lists.xenproject.org; Tue, 03 May 2016 10:55:27 +0000 Received: from [85.158.139.211] by server-9.bemta-5.messagelabs.com id 09/BC-21886-E9388275; Tue, 03 May 2016 10:55:26 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrOIsWRWlGSWpSXmKPExsXitHRDpO68Zo1 wgxvrpC2+b5nM5MDocfjDFZYAxijWzLyk/IoE1ozFl+6yFKzmrlh+7AF7A+NGzi5GTg4JAX+J r6fuMIHYbAI6Ehfn7mTrYuTgEBFQkbi916CLkYuDWaCdUaLz1w12kBphgUSJI3sPsoHYLEA1e 3esYAGxeQVcJO6umM4MMVNX4uTuTewgczgFXCUa7xmAhIWASmZO6GWDKBeUODnzCVgrs4CmRO v23+wQtrxE89bZzBD1ihL98x6wQYzklrh9eirzBEb+WUjaZyFpn4WkfQEj8ypG9eLUorLUIl1 jvaSizPSMktzEzBxdQwNTvdzU4uLE9NScxKRiveT83E2MwABkAIIdjHv/OR1ilORgUhLllbir Hi7El5SfUpmRWJwRX1Sak1p8iFGGg0NJgre6SSNcSLAoNT21Ii0zBxgLMGkJDh4lEd5mkDRvc UFibnFmOkTqFKOilDhvPUhCACSRUZoH1waLv0uMslLCvIxAhwjxFKQW5WaWoMq/YhTnYFQS5j 0JMoUnM68EbvoroMVMQIuz16uCLC5JREhJNTByX2CzPGxmasW37IJ3nNKSY6uLf9penLy94k1 E45Vtd4W3TmR4Nr/Wxsx/ao/oHvv7E+WEBcLm7mZlu5dUmvRkT4hgiM/upWbZpw2vPNNRLuJh +nVwmcT32Qcmtinc49ZJ5uhbMH3furZrk1Y5ZHPVXZuqs6HC4ZF06YdT/rXKGQwbJ5+e5flQi aU4I9FQi7moOBEAHFK9DroCAAA= X-Env-Sender: prvs=924d4b44a=roger.pau@citrix.com X-Msg-Ref: server-13.tower-206.messagelabs.com!1462272918!33733871!3 X-Originating-IP: [66.165.176.89] X-SpamReason: No, hits=0.0 required=7.0 tests=sa_preprocessor: VHJ1c3RlZCBJUDogNjYuMTY1LjE3Ni44OSA9PiAyMDMwMDc=\n, received_headers: No Received headers X-StarScan-Received: X-StarScan-Version: 8.34; banners=-,-,- X-VirusChecked: Checked Received: (qmail 64294 invoked from network); 3 May 2016 10:55:26 -0000 Received: from smtp.citrix.com (HELO SMTP.CITRIX.COM) (66.165.176.89) by server-13.tower-206.messagelabs.com with RC4-SHA encrypted SMTP; 3 May 2016 10:55:26 -0000 X-IronPort-AV: E=Sophos;i="5.24,572,1454976000"; d="scan'208";a="351336731" From: Roger Pau Monne To: Date: Tue, 3 May 2016 12:55:08 +0200 Message-ID: <1462272910-41200-5-git-send-email-roger.pau@citrix.com> X-Mailer: git-send-email 2.6.4 (Apple Git-63) In-Reply-To: <1462272910-41200-1-git-send-email-roger.pau@citrix.com> References: <1462272910-41200-1-git-send-email-roger.pau@citrix.com> MIME-Version: 1.0 X-DLP: MIA2 Cc: Ross Lagerwall , Roger Pau Monne Subject: [Xen-devel] [PATCH v2 for-4.7 4/6] xen/xsplice: check against ELFOSABI_NONE instead of ELFOSABI_SYSV X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP They are equivalent, but using ELFOSABI_NONE is more correct in this context. Signed-off-by: Roger Pau Monné Reviewed-by: Andrew Cooper --- Cc: Konrad Rzeszutek Wilk Cc: Ross Lagerwall --- xen/common/xsplice_elf.c | 2 +- xen/include/xen/elfstructs.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) 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 */