From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933236AbdC3Hgk (ORCPT ); Thu, 30 Mar 2017 03:36:40 -0400 Received: from terminus.zytor.com ([65.50.211.136]:48917 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932650AbdC3Hgi (ORCPT ); Thu, 30 Mar 2017 03:36:38 -0400 Date: Thu, 30 Mar 2017 00:29:50 -0700 From: tip-bot for Arnd Bergmann Message-ID: Cc: peterz@infradead.org, josh@joshtriplett.org, jpoimboe@redhat.com, dvlasenk@redhat.com, luto@kernel.org, hpa@zytor.com, tglx@linutronix.de, linux-kernel@vger.kernel.org, torvalds@linux-foundation.org, brgerst@gmail.com, arnd@arndb.de, mingo@kernel.org, bp@alien8.de Reply-To: bp@alien8.de, torvalds@linux-foundation.org, brgerst@gmail.com, mingo@kernel.org, arnd@arndb.de, tglx@linutronix.de, linux-kernel@vger.kernel.org, peterz@infradead.org, dvlasenk@redhat.com, jpoimboe@redhat.com, josh@joshtriplett.org, luto@kernel.org, hpa@zytor.com In-Reply-To: <20170329211646.2707365-1-arnd@arndb.de> References: <20170329211646.2707365-1-arnd@arndb.de> To: linux-tip-commits@vger.kernel.org Subject: [tip:x86/asm] x86/debug: Define BUG() again for !CONFIG_BUG Git-Commit-ID: 70579a86e3c8eb2ce57999e594a73b4dfe095959 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: 70579a86e3c8eb2ce57999e594a73b4dfe095959 Gitweb: http://git.kernel.org/tip/70579a86e3c8eb2ce57999e594a73b4dfe095959 Author: Arnd Bergmann AuthorDate: Wed, 29 Mar 2017 23:16:31 +0200 Committer: Ingo Molnar CommitDate: Thu, 30 Mar 2017 09:12:10 +0200 x86/debug: Define BUG() again for !CONFIG_BUG The latest change to the BUG() macro inadvertently reverted the earlier commit: b06dd879f5db ("x86: always define BUG() and HAVE_ARCH_BUG, even with !CONFIG_BUG") ... that sanitized the behavior with CONFIG_BUG=n. I noticed this as some warnings have appeared again that were previously fixed as a side effect of that patch: kernel/seccomp.c: In function '__seccomp_filter': kernel/seccomp.c:670:1: error: no return statement in function returning non-void [-Werror=return-type] ... This combines the two patches and uses the ud2 macro to define BUG() in case of CONFIG_BUG=n. Signed-off-by: Arnd Bergmann Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Josh Poimboeuf Cc: Josh Triplett Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Fixes: 9a93848fe787 ("x86/debug: Implement __WARN() using UD0") Link: http://lkml.kernel.org/r/20170329211646.2707365-1-arnd@arndb.de Signed-off-by: Ingo Molnar --- arch/x86/include/asm/bug.h | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/arch/x86/include/asm/bug.h b/arch/x86/include/asm/bug.h index 4fde330..cecf559 100644 --- a/arch/x86/include/asm/bug.h +++ b/arch/x86/include/asm/bug.h @@ -23,7 +23,6 @@ #define LEN_UD0 2 #ifdef CONFIG_GENERIC_BUG -#define HAVE_ARCH_BUG #ifdef CONFIG_X86_32 # define __BUG_REL(val) ".long " __stringify(val) @@ -64,6 +63,13 @@ do { \ #endif /* CONFIG_DEBUG_BUGVERBOSE */ +#else + +#define _BUG_FLAGS(ins, flags) asm volatile(ins) + +#endif /* CONFIG_GENERIC_BUG */ + +#define HAVE_ARCH_BUG #define BUG() \ do { \ _BUG_FLAGS(ASM_UD2, 0); \ @@ -72,8 +78,6 @@ do { \ #define __WARN_TAINT(taint) _BUG_FLAGS(ASM_UD0, BUGFLAG_TAINT(taint)) -#endif /* CONFIG_GENERIC_BUG */ - #include #endif /* _ASM_X86_BUG_H */