lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Mon, 27 Feb 2017 22:49:37 -0800
From:   tip-bot for Josh Poimboeuf <tipbot@...or.com>
To:     linux-tip-commits@...r.kernel.org
Cc:     jpoimboe@...hat.com, hpa@...or.com, mingo@...nel.org,
        tglx@...utronix.de, peterz@...radead.org, linux@...ck-us.net,
        torvalds@...ux-foundation.org, linux-kernel@...r.kernel.org
Subject: [tip:core/urgent] objtool: Enclose contents of unreachable() macro
 in a block

Commit-ID:  4e4636cf981b5b629fbfb78aa9f232e015f7d521
Gitweb:     http://git.kernel.org/tip/4e4636cf981b5b629fbfb78aa9f232e015f7d521
Author:     Josh Poimboeuf <jpoimboe@...hat.com>
AuthorDate: Mon, 27 Feb 2017 22:21:16 -0600
Committer:  Ingo Molnar <mingo@...nel.org>
CommitDate: Tue, 28 Feb 2017 07:47:26 +0100

objtool: Enclose contents of unreachable() macro in a block

Guenter Roeck reported a boot failure in mips64.  It was bisected to the
following commit:

  d1091c7fa3d5 ("objtool: Improve detection of BUG() and other dead ends")

The unreachable() macro was formerly only composed of a single
statement.  The above commit added a second statement, but neglected to
enclose the statements in a block.

Suggested-by: Guenter Roeck <linux@...ck-us.net>
Reported-by: Guenter Roeck <linux@...ck-us.net>
Signed-off-by: Josh Poimboeuf <jpoimboe@...hat.com>
Cc: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: Peter Zijlstra <peterz@...radead.org>
Cc: Thomas Gleixner <tglx@...utronix.de>
Fixes: d1091c7fa3d5 ("objtool: Improve detection of BUG() and other dead ends")
Link: http://lkml.kernel.org/r/20170228042116.glmwmwiohcix7o4a@treble
Signed-off-by: Ingo Molnar <mingo@...nel.org>
---
 include/linux/compiler-gcc.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/include/linux/compiler-gcc.h b/include/linux/compiler-gcc.h
index de47134..f457b52 100644
--- a/include/linux/compiler-gcc.h
+++ b/include/linux/compiler-gcc.h
@@ -215,7 +215,8 @@
  * this in the preprocessor, but we can live with this because they're
  * unreleased.  Really, we need to have autoconf for the kernel.
  */
-#define unreachable() annotate_unreachable(); __builtin_unreachable()
+#define unreachable() \
+	do { annotate_unreachable(); __builtin_unreachable(); } while (0)
 
 /* Mark a function definition as prohibited from being cloned. */
 #define __noclone	__attribute__((__noclone__, __optimize__("no-tracer")))

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ