From patchwork Wed Aug 24 15:24:38 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Beulich X-Patchwork-Id: 9298011 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 8C528607D0 for ; Wed, 24 Aug 2016 15:27:26 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7CC0028FD4 for ; Wed, 24 Aug 2016 15:27:26 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 713F4290D8; Wed, 24 Aug 2016 15:27:26 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 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.wl.linuxfoundation.org (Postfix) with ESMTPS id F011628FD4 for ; Wed, 24 Aug 2016 15:27: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 1bca2m-0003tK-MG; Wed, 24 Aug 2016 15:24:44 +0000 Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bca2l-0003tE-18 for xen-devel@lists.xenproject.org; Wed, 24 Aug 2016 15:24:43 +0000 Received: from [85.158.137.68] by server-5.bemta-3.messagelabs.com id 61/2F-03281-A3CBDB75; Wed, 24 Aug 2016 15:24:42 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrMIsWRWlGSWpSXmKPExsXS6fjDS9dyz95 wg5dn5C2+b5nM5MDocfjDFZYAxijWzLyk/IoE1oyGV9/ZCubwV7zd9IWpgfE6TxcjJ4eQQJ7E hqftLCA2r4CdxNzfTcwgtoSAocTT99fZQGwWAVWJR9M+sILYbALqEm3PtgPZHBwiAgYS544mg YSZBZIk2r+2sYPYwgLGEjPuT2UEKeEVEJT4u0MYosRO4sy+TSwTGLlmIWRmIclA2FoSD3/dgr K1JZYtfM0MUs4sIC2x/B8HhOkoMfu1G6YKH4nbX7MXMHKsYtQoTi0qSy3SNTTVSyrKTM8oyU3 MzNE1NDDWy00tLk5MT81JTCrWS87P3cQIDDwGINjBuGa75yFGSQ4mJVHe8Ka94UJ8SfkplRmJ xRnxRaU5qcWHGGU4OJQkeJfsAsoJFqWmp1akZeYAYwAmLcHBoyTCOxckzVtckJhbnJkOkTrFq CglzvsfJCEAksgozYNrg8XdJUZZKWFeRqBDhHgKUotyM0tQ5V8xinMwKgnz8u8GmsKTmVcCN/ 0V0GImoMUt93eDLC5JREhJNTDOLt96RXmN3JTA67KPKw7xrllzv/WAz235Nsngb6c+VZVKZ77 aa72W51Xt5J+CeoWPM0JPrVw4zUbT80fiJf4rmR/2P6s+o6LlvLPqxf0KNtWv6peWppb+adTj aqh7xJjUovRWO1q50cp3caP/6qdh6qbCR7jOJG1aH/UtlvfiHIU0/p3L+xWUWIozEg21mIuKE wFQy9SCtgIAAA== X-Env-Sender: JBeulich@suse.com X-Msg-Ref: server-4.tower-31.messagelabs.com!1472052279!6981695!1 X-Originating-IP: [137.65.248.74] X-SpamReason: No, hits=0.0 required=7.0 tests= X-StarScan-Received: X-StarScan-Version: 8.84; banners=-,-,- X-VirusChecked: Checked Received: (qmail 1176 invoked from network); 24 Aug 2016 15:24:41 -0000 Received: from prv-mh.provo.novell.com (HELO prv-mh.provo.novell.com) (137.65.248.74) by server-4.tower-31.messagelabs.com with DHE-RSA-AES256-GCM-SHA384 encrypted SMTP; 24 Aug 2016 15:24:41 -0000 Received: from INET-PRV-MTA by prv-mh.provo.novell.com with Novell_GroupWise; Wed, 24 Aug 2016 09:24:38 -0600 Message-Id: <57BDD8560200007800108B7C@prv-mh.provo.novell.com> X-Mailer: Novell GroupWise Internet Agent 14.2.1 Date: Wed, 24 Aug 2016 09:24:38 -0600 From: "Jan Beulich" To: "xen-devel" Mime-Version: 1.0 Cc: Andrew Cooper Subject: [Xen-devel] [PATCH] x86: correct PT_NOTE file position 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-Virus-Scanned: ClamAV using ClamSMTP Program and section headers disagreed about the file offset at which the build ID note lives. Reported-by: Sylvain Munaut Signed-off-by: Jan Beulich x86: correct PT_NOTE file position Program and section headers disagreed about the file offset at which the build ID note lives. Reported-by: Sylvain Munaut Signed-off-by: Jan Beulich --- a/xen/arch/x86/boot/mkelf32.c +++ b/xen/arch/x86/boot/mkelf32.c @@ -394,7 +394,7 @@ int main(int argc, char **argv) note_phdr.p_paddr = note_base; note_phdr.p_filesz = note_sz; note_phdr.p_memsz = note_sz; - note_phdr.p_offset = offset; + note_phdr.p_offset = RAW_OFFSET + offset; /* Tack on the .note\0 */ out_shdr[2].sh_size += sizeof(out_shstrtab_extra); Reviewed-by: Konrad Rzeszutek Wilk Reviewed-by: Andrew Cooper --- a/xen/arch/x86/boot/mkelf32.c +++ b/xen/arch/x86/boot/mkelf32.c @@ -394,7 +394,7 @@ int main(int argc, char **argv) note_phdr.p_paddr = note_base; note_phdr.p_filesz = note_sz; note_phdr.p_memsz = note_sz; - note_phdr.p_offset = offset; + note_phdr.p_offset = RAW_OFFSET + offset; /* Tack on the .note\0 */ out_shdr[2].sh_size += sizeof(out_shstrtab_extra);