From patchwork Tue May 3 10:55:09 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: 9002801 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 4B46BBF29F for ; Tue, 3 May 2016 10:58:21 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 65B0A20222 for ; Tue, 3 May 2016 10:58:20 +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 85EB4201B4 for ; Tue, 3 May 2016 10:58:19 +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 1axXzG-0000aA-Pe; Tue, 03 May 2016 10:55:30 +0000 Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1axXzF-0000YP-Bz for xen-devel@lists.xenproject.org; Tue, 03 May 2016 10:55:29 +0000 Received: from [85.158.139.211] by server-6.bemta-5.messagelabs.com id E1/53-00612-0A388275; Tue, 03 May 2016 10:55:28 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrGIsWRWlGSWpSXmKPExsXitHRDpO6CZo1 wg3XLRC2+b5nM5MDocfjDFZYAxijWzLyk/IoE1oyTj74xF2ziqFg7/TJzA+Mzti5GTg4JAX+J E5cbwWw2AR2Ji3N3AtkcHCICKhK39xp0MXJxMAu0M0p0/rrBDlIjLJAsMWnbJCYQmwWo5tPur awgNq+Ai8THV1MYIWbqSpzcvYkdZA6ngKtE4z0DkLAQUMnMCb1sEOWCEidnPmEBsZkFNCVat/ 9mh7DlJZq3zmaGqFeU6J/3AOwcCQFuib/d9hMY+Wch6Z6FpHsWku4FjMyrGNWLU4vKUot0jfW SijLTM0pyEzNzdA0NTPVyU4uLE9NTcxKTivWS83M3MQLDjwEIdjDu/ed0iFGSg0lJlFfirnq4 EF9SfkplRmJxRnxRaU5q8SFGGQ4OJQne6iaNcCHBotT01Iq0zBxgJMCkJTh4lER4m0HSvMUFi bnFmekQqVOMilLivPUgCQGQREZpHlwbLPouMcpKCfMyAh0ixFOQWpSbWYIq/4pRnINRSZj3JM gUnsy8Erjpr4AWMwEtzl6vCrK4JBEhJdXAuDo1bOE8x706Px2F939bX5vvnfOvPTdF62hV7VY Pye9ys2P91/mJdF+a+yPINPIvc9Dzoyy2eTf0ZL7aTS5MzrxtefBeZpXaxTnrTWN9Nn6+lris 8fid6msMDlbvrtuYxplf9ZPIqP39dOuF/QuDwmt3WfTzr0j5Jrb77F/xicfso45P2b2aQYmlO CPRUIu5qDgRAHPbyTu5AgAA X-Env-Sender: prvs=924d4b44a=roger.pau@citrix.com X-Msg-Ref: server-13.tower-206.messagelabs.com!1462272918!33733871!4 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 64569 invoked from network); 3 May 2016 10:55:28 -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:28 -0000 X-IronPort-AV: E=Sophos;i="5.24,572,1454976000"; d="scan'208";a="351336742" From: Roger Pau Monne To: Date: Tue, 3 May 2016 12:55:09 +0200 Message-ID: <1462272910-41200-6-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: MIA1 Cc: Ross Lagerwall , Roger Pau Monne Subject: [Xen-devel] [PATCH v2 for-4.7 5/6] xen/xsplice: add ELFOSABI_FREEBSD as a supported OSABI for payloads 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 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. Signed-off-by: Roger Pau Monné Acked-by: Ross Lagerwall --- Cc: Konrad Rzeszutek Wilk Cc: Ross Lagerwall --- 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..918a1bf 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 ) {