Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753845AbbKXJgq (ORCPT ); Tue, 24 Nov 2015 04:36:46 -0500 Received: from terminus.zytor.com ([198.137.202.10]:55461 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752950AbbKXJgl (ORCPT ); Tue, 24 Nov 2015 04:36:41 -0500 Date: Tue, 24 Nov 2015 01:35:58 -0800 From: tip-bot for Andy Lutomirski Message-ID: Cc: tglx@linutronix.de, torvalds@linux-foundation.org, fweisbec@gmail.com, hpa@zytor.com, dvlasenk@redhat.com, peterz@infradead.org, luto@kernel.org, brgerst@gmail.com, mingo@kernel.org, linux-kernel@vger.kernel.org, luto@amacapital.net, bp@alien8.de Reply-To: hpa@zytor.com, torvalds@linux-foundation.org, tglx@linutronix.de, fweisbec@gmail.com, mingo@kernel.org, luto@amacapital.net, bp@alien8.de, linux-kernel@vger.kernel.org, dvlasenk@redhat.com, brgerst@gmail.com, peterz@infradead.org, luto@kernel.org In-Reply-To: <99407f0ac7fa3ab03a3d31ce076d47b5c2f44795.1447361906.git.luto@kernel.org> References: <99407f0ac7fa3ab03a3d31ce076d47b5c2f44795.1447361906.git.luto@kernel.org> To: linux-tip-commits@vger.kernel.org Subject: [tip:x86/asm] x86/asm: Error out if asm/ jump_label.h is included inappropriately Git-Commit-ID: c28454332fe0b65e22c3a2717e5bf05b5b47ca20 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 Content-Length: 2214 Lines: 58 Commit-ID: c28454332fe0b65e22c3a2717e5bf05b5b47ca20 Gitweb: http://git.kernel.org/tip/c28454332fe0b65e22c3a2717e5bf05b5b47ca20 Author: Andy Lutomirski AuthorDate: Thu, 12 Nov 2015 12:59:02 -0800 Committer: Ingo Molnar CommitDate: Tue, 24 Nov 2015 09:56:43 +0100 x86/asm: Error out if asm/jump_label.h is included inappropriately Rather than potentially generating incorrect code on a non-HAVE_JUMP_LABEL kernel if someone includes asm/jump_label.h, error out. Signed-off-by: Andy Lutomirski Reviewed-by: Thomas Gleixner Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Denys Vlasenko Cc: Frederic Weisbecker Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/99407f0ac7fa3ab03a3d31ce076d47b5c2f44795.1447361906.git.luto@kernel.org Signed-off-by: Ingo Molnar --- arch/x86/include/asm/jump_label.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/arch/x86/include/asm/jump_label.h b/arch/x86/include/asm/jump_label.h index 5daeca3..96872dc 100644 --- a/arch/x86/include/asm/jump_label.h +++ b/arch/x86/include/asm/jump_label.h @@ -1,6 +1,19 @@ #ifndef _ASM_X86_JUMP_LABEL_H #define _ASM_X86_JUMP_LABEL_H +#ifndef HAVE_JUMP_LABEL +/* + * For better or for worse, if jump labels (the gcc extension) are missing, + * then the entire static branch patching infrastructure is compiled out. + * If that happens, the code in here will malfunction. Raise a compiler + * error instead. + * + * In theory, jump labels and the static branch patching infrastructure + * could be decoupled to fix this. + */ +#error asm/jump_label.h included on a non-jump-label kernel +#endif + #ifndef __ASSEMBLY__ #include -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/