From patchwork Mon Mar 21 08:40:16 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Bader X-Patchwork-Id: 87719 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from chlorine.canonical.com (chlorine.canonical.com [91.189.94.204]) by ozlabs.org (Postfix) with ESMTP id 8B92BB6F0B for ; Mon, 21 Mar 2011 19:40:33 +1100 (EST) Received: from localhost ([127.0.0.1] helo=chlorine.canonical.com) by chlorine.canonical.com with esmtp (Exim 4.71) (envelope-from ) id 1Q1aey-0001bq-07; Mon, 21 Mar 2011 08:40:20 +0000 Received: from adelie.canonical.com ([91.189.90.139]) by chlorine.canonical.com with esmtp (Exim 4.71) (envelope-from ) id 1Q1aev-0001bk-C5 for kernel-team@lists.ubuntu.com; Mon, 21 Mar 2011 08:40:17 +0000 Received: from youngberry.canonical.com ([91.189.89.112]) by adelie.canonical.com with esmtp (Exim 4.71 #1 (Debian)) id 1Q1aev-0000et-9l for ; Mon, 21 Mar 2011 08:40:17 +0000 Received: from p5b2e55f8.dip.t-dialin.net ([91.46.85.248] helo=[192.168.2.121]) by youngberry.canonical.com with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1Q1aev-0000xl-4Q for kernel-team@lists.ubuntu.com; Mon, 21 Mar 2011 08:40:17 +0000 Message-ID: <4D870EF0.60100@canonical.com> Date: Mon, 21 Mar 2011 09:40:16 +0100 From: Stefan Bader User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.14) Gecko/20110223 Lightning/1.0b2 Thunderbird/3.1.8 MIME-Version: 1.0 To: Ubuntu Kernel Team Subject: Fwd: [stable] [heukelum@fastmail.fm: [tip:x86/asm] x86, binutils, xen: Fix another wrong size directive] X-Enigmail-Version: 1.1.2 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.13 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: kernel-team-bounces@lists.ubuntu.com Errors-To: kernel-team-bounces@lists.ubuntu.com While this fix is only related to Xen, the story may be interesting/good to know generally. -Stefan -------- Original Message -------- Subject: [stable] [heukelum@fastmail.fm: [tip:x86/asm] x86, binutils, xen: Fix another wrong size directive] Date: Sat, 19 Mar 2011 18:57:37 +0100 From: Ingo Molnar To: stable kernel team hi, Please apply the commit below to -stable: new binutils broke the kernel build back to and including v2.6.27. Thanks! Ingo ----- Forwarded message from tip-bot for Alexander van Heukelum ----- Date: Sat, 12 Mar 2011 08:04:00 GMT From: tip-bot for Alexander van Heukelum To: linux-tip-commits@vger.kernel.org Cc: linux-kernel@vger.kernel.org, hpa@zytor.com, mingo@redhat.com, torvalds@linux-foundation.org, heukelum@fastmail.fm, jeremy@goop.org, akpm@linux-foundation.org, jbeulich@novell.com, kees.cook@canonical.com, tglx@linutronix.de, mingo@elte.hu, hjl.tools@gmail.com Subject: [tip:x86/asm] x86, binutils, xen: Fix another wrong size directive Commit-ID: 371c394af27ab7d1e58a66bc19d9f1f3ac1f67b4 Gitweb: http://git.kernel.org/tip/371c394af27ab7d1e58a66bc19d9f1f3ac1f67b4 Author: Alexander van Heukelum AuthorDate: Fri, 11 Mar 2011 21:59:38 +0100 Committer: Ingo Molnar CommitDate: Sat, 12 Mar 2011 09:02:29 +0100 x86, binutils, xen: Fix another wrong size directive The latest binutils (2.21.0.20110302/Ubuntu) breaks the build yet another time, under CONFIG_XEN=y due to a .size directive that refers to a slightly differently named (hence, to the now very strict and unforgiving assembler, non-existent) symbol. [ mingo: This unnecessary build breakage caused by new binutils version 2.21 gets escallated back several kernel releases spanning several years of Linux history, affecting over 130,000 upstream kernel commits (!), on CONFIG_XEN=y 64-bit kernels (i.e. essentially affecting all major Linux distro kernel configs). Git annotate tells us that this slight debug symbol code mismatch bug has been introduced in 2008 in commit 3d75e1b8: 3d75e1b8 (Jeremy Fitzhardinge 2008-07-08 15:06:49 -0700 1231) ENTRY(xen_do_hypervisor_callback) # do_hypervisor_callback(struct *pt_regs) The 'bug' is just a slight assymetry in ENTRY()/END() debug-symbols sequences, with lots of assembly code between the ENTRY() and the END(): ENTRY(xen_do_hypervisor_callback) # do_hypervisor_callback(struct *pt_regs) ... END(do_hypervisor_callback) Human reviewers almost never catch such small mismatches, and binutils never even warned about it either. This new binutils version thus breaks the Xen build on all upstream kernels since v2.6.27, out of the blue. This makes a straightforward Git bisection of all 64-bit Xen-enabled kernels impossible on such binutils, for a bisection window of over hundred thousand historic commits. (!) This is a major fail on the side of binutils and binutils needs to turn this show-stopper build failure into a warning ASAP. ] Signed-off-by: Alexander van Heukelum Cc: Jeremy Fitzhardinge Cc: Jan Beulich Cc: H.J. Lu Cc: Linus Torvalds Cc: Andrew Morton Cc: "H. Peter Anvin" Cc: Kees Cook LKML-Reference: <1299877178-26063-1-git-send-email-heukelum@fastmail.fm> Signed-off-by: Ingo Molnar --- arch/x86/kernel/entry_64.S | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) * Hypervisor uses this for application faults while it executes. ----- End forwarded message ----- diff --git a/arch/x86/kernel/entry_64.S b/arch/x86/kernel/entry_64.S index aed1ffb..bbd5c80 100644 --- a/arch/x86/kernel/entry_64.S +++ b/arch/x86/kernel/entry_64.S @@ -1248,7 +1248,7 @@ ENTRY(xen_do_hypervisor_callback) # do_hypervisor_callback(struct *pt_regs) decl PER_CPU_VAR(irq_count) jmp error_exit CFI_ENDPROC -END(do_hypervisor_callback) +END(xen_do_hypervisor_callback) /*