From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754966AbbCFImp (ORCPT ); Fri, 6 Mar 2015 03:42:45 -0500 Received: from terminus.zytor.com ([198.137.202.10]:59330 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751150AbbCFImn (ORCPT ); Fri, 6 Mar 2015 03:42:43 -0500 Date: Fri, 6 Mar 2015 00:39:38 -0800 From: tip-bot for Jiri Slaby Message-ID: Cc: luto@amacapital.net, linux-kernel@vger.kernel.org, jslaby@suse.cz, stable@vger.kernel.org, torvalds@linux-foundation.org, bp@alien8.de, mingo@kernel.org, rguenther@suse.de, hpa@zytor.com, tglx@linutronix.de Reply-To: linux-kernel@vger.kernel.org, luto@amacapital.net, jslaby@suse.cz, stable@vger.kernel.org, torvalds@linux-foundation.org, bp@alien8.de, mingo@kernel.org, tglx@linutronix.de, rguenther@suse.de, hpa@zytor.com In-Reply-To: <1425543211-12542-1-git-send-email-jslaby@suse.cz> References: <1425543211-12542-1-git-send-email-jslaby@suse.cz> To: linux-tip-commits@vger.kernel.org Subject: [tip:x86/urgent] x86/vdso: Fix the build on GCC5 Git-Commit-ID: e893286918d2cde3a94850d8f7101cd1039e0c62 X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: e893286918d2cde3a94850d8f7101cd1039e0c62 Gitweb: http://git.kernel.org/tip/e893286918d2cde3a94850d8f7101cd1039e0c62 Author: Jiri Slaby AuthorDate: Thu, 5 Mar 2015 09:13:31 +0100 Committer: Ingo Molnar CommitDate: Fri, 6 Mar 2015 09:34:45 +0100 x86/vdso: Fix the build on GCC5 On gcc5 the kernel does not link: ld: .eh_frame_hdr table[4] FDE at 0000000000000648 overlaps table[5] FDE at 0000000000000670. Because prior GCC versions always emitted NOPs on ALIGN directives, but gcc5 started omitting them. .LSTARTFDEDLSI1 says: /* HACK: The dwarf2 unwind routines will subtract 1 from the return address to get an address in the middle of the presumed call instruction. Since we didn't get here via a call, we need to include the nop before the real start to make up for it. */ .long .LSTART_sigreturn-1-. /* PC-relative start address */ But commit 69d0627a7f6e ("x86 vDSO: reorder vdso32 code") from 2.6.25 replaced .org __kernel_vsyscall+32,0x90 by ALIGN right before __kernel_sigreturn. Of course, ALIGN need not generate any NOP in there. Esp. gcc5 collapses vclock_gettime.o and int80.o together with no generated NOPs as "ALIGN". So fix this by adding to that point at least a single NOP and make the function ALIGN possibly with more NOPs then. Kudos for reporting and diagnosing should go to Richard. Reported-by: Richard Biener Signed-off-by: Jiri Slaby Acked-by: Andy Lutomirski Cc: Cc: Borislav Petkov Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/1425543211-12542-1-git-send-email-jslaby@suse.cz Signed-off-by: Ingo Molnar --- arch/x86/vdso/vdso32/sigreturn.S | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/x86/vdso/vdso32/sigreturn.S b/arch/x86/vdso/vdso32/sigreturn.S index 31776d0..d7ec4e2 100644 --- a/arch/x86/vdso/vdso32/sigreturn.S +++ b/arch/x86/vdso/vdso32/sigreturn.S @@ -17,6 +17,7 @@ .text .globl __kernel_sigreturn .type __kernel_sigreturn,@function + nop /* this guy is needed for .LSTARTFDEDLSI1 below (watch for HACK) */ ALIGN __kernel_sigreturn: .LSTART_sigreturn: