]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
x86/debug, objtool: Annotate WARN()-related UD2 as reachable
authorJosh Poimboeuf <jpoimboe@redhat.com>
Thu, 8 Feb 2018 23:09:26 +0000 (17:09 -0600)
committerSeth Forshee <seth.forshee@canonical.com>
Fri, 23 Feb 2018 14:27:04 +0000 (08:27 -0600)
commit80e59c1dcec5f2c2ddbb0d72187ace1c9aebe421
treea0298fd0111c228899165b42c4cbb91ed98f243f
parent7c64b1f9f0ddbe497aaa25561497196fac8e510e
x86/debug, objtool: Annotate WARN()-related UD2 as reachable

BugLink: http://bugs.launchpad.net/bugs/1751131
commit 2b5db66862b95532cb6cca8165ae6eb73633cf85 upstream.

By default, objtool assumes that a UD2 is a dead end.  This is mainly
because GCC 7+ sometimes inserts a UD2 when it detects a divide-by-zero
condition.

Now that WARN() is moving back to UD2, annotate the code after it as
reachable so objtool can follow the code flow.

Reported-by: Borislav Petkov <bp@alien8.de>
Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: Arjan van de Ven <arjan@linux.intel.com>
Cc: Brian Gerst <brgerst@gmail.com>
Cc: Denys Vlasenko <dvlasenk@redhat.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: kbuild test robot <fengguang.wu@intel.com>
Link: http://lkml.kernel.org/r/0e483379275a42626ba8898117f918e1bf661e40.1518130694.git.jpoimboe@redhat.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
arch/x86/include/asm/bug.h