Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1588946 > unrolled thread
| Started by | Guenter Roeck <linux@roeck-us.net> |
|---|---|
| First post | 2017-02-27 22:10 +0100 |
| Last post | 2017-02-28 02:30 +0100 |
| Articles | 6 — 3 participants |
Back to article view | Back to linux.kernel
Crash in -next due to 'objtool: Improve detection of BUG() and other dead ends' Guenter Roeck <linux@roeck-us.net> - 2017-02-27 22:10 +0100
Re: Crash in -next due to 'objtool: Improve detection of BUG() and other dead ends' Josh Poimboeuf <jpoimboe@redhat.com> - 2017-02-27 23:30 +0100
Re: Crash in -next due to 'objtool: Improve detection of BUG() and other dead ends' Josh Poimboeuf <jpoimboe@redhat.com> - 2017-02-28 02:00 +0100
[PATCH] objtool: enclose contents of unreachable() macro in a block Josh Poimboeuf <jpoimboe@redhat.com> - 2017-02-28 05:30 +0100
[tip:core/urgent] objtool: Enclose contents of unreachable() macro in a block tip-bot for Josh Poimboeuf <tipbot@zytor.com> - 2017-02-28 11:50 +0100
Re: Crash in -next due to 'objtool: Improve detection of BUG() and other dead ends' Guenter Roeck <linux@roeck-us.net> - 2017-02-28 02:30 +0100
| From | Guenter Roeck <linux@roeck-us.net> |
|---|---|
| Date | 2017-02-27 22:10 +0100 |
| Subject | Crash in -next due to 'objtool: Improve detection of BUG() and other dead ends' |
| Message-ID | <tfAIq-2Pe-21@gated-at.bofh.it> |
Hi, my qemu tests for mips64 in -next fail as follows. ... VFS: Mounted root (ext3 filesystem) on device 8:0. Freeing unused kernel memory: 304K This architecture does not have kernel memory protection. Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000a ---[ end Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000a There is no symbol traceback, and I don't see any other (obvious) error message. bisect points to commit 'objtool: Improve detection of BUG() and other dead ends'; reverting that patch fixes the problem. Bisect log is attached below. The script used to run the test as well as the root file system is available at https://github.com/groeck/linux-build-test/tree/master/rootfs/mips64 A complete log is available at http://kerneltests.org/builders/qemu-mips64-next/builds/592/steps/qemubuildcommand/logs/stdio Guenter --- # bad: [ed7b11e565c736828f0b793f596a4ca20efee747] Add linux-next specific files for 20170227 # good: [c470abd4fde40ea6a0846a2beab642a578c0b8cd] Linux 4.10 git bisect start 'HEAD' 'v4.10' # good: [caa59428971d5ad81d19512365c9ba580d83268c] Merge tag 'staging-4.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging git bisect good caa59428971d5ad81d19512365c9ba580d83268c # good: [d5500a074741b78b7f778b4ab3415d5ecdcda0a7] Merge tag 'usercopy-v4.11-rc1.fix' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux git bisect good d5500a074741b78b7f778b4ab3415d5ecdcda0a7 # good: [5d8a00eee2ed2e548a5d21b0edf495f3f7bf8bb4] Merge tag 'clk-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux git bisect good 5d8a00eee2ed2e548a5d21b0edf495f3f7bf8bb4 # good: [017bfb6c372fa793cdb09828597a464fa24e0ea7] Merge remote-tracking branch 'jfs/jfs-next' git bisect good 017bfb6c372fa793cdb09828597a464fa24e0ea7 # bad: [e2a95a3fe9e9586df29e8d673dc8cdd36ed6158b] Merge remote-tracking branch 'edac/linux_next' git bisect bad e2a95a3fe9e9586df29e8d673dc8cdd36ed6158b # good: [736e441efdafdbf0bb32732d87e00b8ba7f75260] Merge remote-tracking branch 'thermal/next' git bisect good 736e441efdafdbf0bb32732d87e00b8ba7f75260 # good: [5bd695c24b294b482d86d352a4a0c7ba2059dcff] Merge remote-tracking branch 'block/for-next' git bisect good 5bd695c24b294b482d86d352a4a0c7ba2059dcff # good: [690962e72babac64c8240071e106d2c3e8d08306] Merge remote-tracking branch 'spi/for-next' git bisect good 690962e72babac64c8240071e106d2c3e8d08306 # bad: [462a53b1a2f984a8c8c0aade1c461ce9ea156d5b] Merge branch 'perf/urgent' git bisect bad 462a53b1a2f984a8c8c0aade1c461ce9ea156d5b # good: [bb963e16507ca7670f0bb47ccaada8874b2ba6a1] perf utils: Check verbose flag properly git bisect good bb963e16507ca7670f0bb47ccaada8874b2ba6a1 # good: [7bbba0eb1af34694868d028b80475981f90e6bee] perf/core: Fix perf_event_enable_on_exec() timekeeping (again) git bisect good 7bbba0eb1af34694868d028b80475981f90e6bee # bad: [1db159781cc7df093085ccaddc022beaaa9dd990] Merge branch 'core/urgent' git bisect bad 1db159781cc7df093085ccaddc022beaaa9dd990 # bad: [d1091c7fa3d52ebce4dd3f15d04155b3469b2f90] objtool: Improve detection of BUG() and other dead ends git bisect bad d1091c7fa3d52ebce4dd3f15d04155b3469b2f90 # good: [9f0c18aec620bc9d82268b3cb937568dd07b43ff] objtool: Fix CONFIG_STACK_VALIDATION=y warning for out-of-tree modules git bisect good 9f0c18aec620bc9d82268b3cb937568dd07b43ff # first bad commit: [d1091c7fa3d52ebce4dd3f15d04155b3469b2f90] objtool: Improve detection of BUG() and other dead ends
[toc] | [next] | [standalone]
| From | Josh Poimboeuf <jpoimboe@redhat.com> |
|---|---|
| Date | 2017-02-27 23:30 +0100 |
| Subject | Re: Crash in -next due to 'objtool: Improve detection of BUG() and other dead ends' |
| Message-ID | <tfBXQ-3Cf-9@gated-at.bofh.it> |
| In reply to | #1588946 |
On Mon, Feb 27, 2017 at 12:59:23PM -0800, Guenter Roeck wrote: > Hi, > > my qemu tests for mips64 in -next fail as follows. > > ... > VFS: Mounted root (ext3 filesystem) on device 8:0. > Freeing unused kernel memory: 304K > This architecture does not have kernel memory protection. > Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000a > > ---[ end Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000a > > There is no symbol traceback, and I don't see any other (obvious) error > message. bisect points to commit 'objtool: Improve detection of BUG() > and other dead ends'; reverting that patch fixes the problem. > Bisect log is attached below. > > The script used to run the test as well as the root file system is available > at https://github.com/groeck/linux-build-test/tree/master/rootfs/mips64 > > A complete log is available at > http://kerneltests.org/builders/qemu-mips64-next/builds/592/steps/qemubuildcommand/logs/stdio Hi Guenter, This failure doesn't make much sense. Objtool (and the reported bad patch) are x86-only and should have nothing to do with mips64. Would it be possible for you to double check the error? Otherwise I could try to recreate. Do you have a recommendation for a mips cross-compiler? (preferably something that's already built and that might work on Fedora) > --- > # bad: [ed7b11e565c736828f0b793f596a4ca20efee747] Add linux-next specific files for 20170227 > # good: [c470abd4fde40ea6a0846a2beab642a578c0b8cd] Linux 4.10 > git bisect start 'HEAD' 'v4.10' > # good: [caa59428971d5ad81d19512365c9ba580d83268c] Merge tag 'staging-4.11-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging > git bisect good caa59428971d5ad81d19512365c9ba580d83268c > # good: [d5500a074741b78b7f778b4ab3415d5ecdcda0a7] Merge tag 'usercopy-v4.11-rc1.fix' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux > git bisect good d5500a074741b78b7f778b4ab3415d5ecdcda0a7 > # good: [5d8a00eee2ed2e548a5d21b0edf495f3f7bf8bb4] Merge tag 'clk-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux > git bisect good 5d8a00eee2ed2e548a5d21b0edf495f3f7bf8bb4 > # good: [017bfb6c372fa793cdb09828597a464fa24e0ea7] Merge remote-tracking branch 'jfs/jfs-next' > git bisect good 017bfb6c372fa793cdb09828597a464fa24e0ea7 > # bad: [e2a95a3fe9e9586df29e8d673dc8cdd36ed6158b] Merge remote-tracking branch 'edac/linux_next' > git bisect bad e2a95a3fe9e9586df29e8d673dc8cdd36ed6158b > # good: [736e441efdafdbf0bb32732d87e00b8ba7f75260] Merge remote-tracking branch 'thermal/next' > git bisect good 736e441efdafdbf0bb32732d87e00b8ba7f75260 > # good: [5bd695c24b294b482d86d352a4a0c7ba2059dcff] Merge remote-tracking branch 'block/for-next' > git bisect good 5bd695c24b294b482d86d352a4a0c7ba2059dcff > # good: [690962e72babac64c8240071e106d2c3e8d08306] Merge remote-tracking branch 'spi/for-next' > git bisect good 690962e72babac64c8240071e106d2c3e8d08306 > # bad: [462a53b1a2f984a8c8c0aade1c461ce9ea156d5b] Merge branch 'perf/urgent' > git bisect bad 462a53b1a2f984a8c8c0aade1c461ce9ea156d5b > # good: [bb963e16507ca7670f0bb47ccaada8874b2ba6a1] perf utils: Check verbose flag properly > git bisect good bb963e16507ca7670f0bb47ccaada8874b2ba6a1 > # good: [7bbba0eb1af34694868d028b80475981f90e6bee] perf/core: Fix perf_event_enable_on_exec() timekeeping (again) > git bisect good 7bbba0eb1af34694868d028b80475981f90e6bee > # bad: [1db159781cc7df093085ccaddc022beaaa9dd990] Merge branch 'core/urgent' > git bisect bad 1db159781cc7df093085ccaddc022beaaa9dd990 > # bad: [d1091c7fa3d52ebce4dd3f15d04155b3469b2f90] objtool: Improve detection of BUG() and other dead ends > git bisect bad d1091c7fa3d52ebce4dd3f15d04155b3469b2f90 > # good: [9f0c18aec620bc9d82268b3cb937568dd07b43ff] objtool: Fix CONFIG_STACK_VALIDATION=y warning for out-of-tree modules > git bisect good 9f0c18aec620bc9d82268b3cb937568dd07b43ff > # first bad commit: [d1091c7fa3d52ebce4dd3f15d04155b3469b2f90] objtool: Improve detection of BUG() and other dead ends -- Josh
[toc] | [prev] | [next] | [standalone]
| From | Josh Poimboeuf <jpoimboe@redhat.com> |
|---|---|
| Date | 2017-02-28 02:00 +0100 |
| Subject | Re: Crash in -next due to 'objtool: Improve detection of BUG() and other dead ends' |
| Message-ID | <tfEiZ-576-7@gated-at.bofh.it> |
| In reply to | #1588993 |
On Mon, Feb 27, 2017 at 03:23:28PM -0800, Guenter Roeck wrote:
> Hi Josh,
>
> On Mon, Feb 27, 2017 at 04:21:14PM -0600, Josh Poimboeuf wrote:
> > On Mon, Feb 27, 2017 at 12:59:23PM -0800, Guenter Roeck wrote:
> > > Hi,
> > >
> > > my qemu tests for mips64 in -next fail as follows.
> > >
> > > ...
> > > VFS: Mounted root (ext3 filesystem) on device 8:0.
> > > Freeing unused kernel memory: 304K
> > > This architecture does not have kernel memory protection.
> > > Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000a
> > >
> > > ---[ end Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000a
> > >
> > > There is no symbol traceback, and I don't see any other (obvious) error
> > > message. bisect points to commit 'objtool: Improve detection of BUG()
> > > and other dead ends'; reverting that patch fixes the problem.
> > > Bisect log is attached below.
> > >
> > > The script used to run the test as well as the root file system is available
> > > at https://github.com/groeck/linux-build-test/tree/master/rootfs/mips64
> > >
> > > A complete log is available at
> > > http://kerneltests.org/builders/qemu-mips64-next/builds/592/steps/qemubuildcommand/logs/stdio
> >
> > Hi Guenter,
> >
> > This failure doesn't make much sense. Objtool (and the reported bad
> > patch) are x86-only and should have nothing to do with mips64. Would it
> > be possible for you to double check the error?
> >
> I already did; after all, bisect points to the patch, and reverting it fixes
> the problem. After looking into the patch, I concluded that the following
> might help.
>
> -#define unreachable() annotate_unreachable(); __builtin_unreachable()
> +#define unreachable() do { annotate_unreachable(); __builtin_unreachable(); } while (0)
>
> and it does ...
>
Doh, of course. Thanks for pointing it out, I'll fix it.
--
Josh
[toc] | [prev] | [next] | [standalone]
| From | Josh Poimboeuf <jpoimboe@redhat.com> |
|---|---|
| Date | 2017-02-28 05:30 +0100 |
| Subject | [PATCH] objtool: enclose contents of unreachable() macro in a block |
| Message-ID | <tfHAe-7Cn-11@gated-at.bofh.it> |
| In reply to | #1589073 |
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.
Reported-by: Guenter Roeck <linux@roeck-us.net>
Suggested-by: Guenter Roeck <linux@roeck-us.net>
Fixes: d1091c7fa3d5 ("objtool: Improve detection of BUG() and other dead ends")
Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
---
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..f457b520 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")))
--
2.7.4
[toc] | [prev] | [next] | [standalone]
| From | tip-bot for Josh Poimboeuf <tipbot@zytor.com> |
|---|---|
| Date | 2017-02-28 11:50 +0100 |
| Subject | [tip:core/urgent] objtool: Enclose contents of unreachable() macro in a block |
| Message-ID | <tfNvX-3dU-1@gated-at.bofh.it> |
| In reply to | #1589165 |
Commit-ID: 4e4636cf981b5b629fbfb78aa9f232e015f7d521
Gitweb: http://git.kernel.org/tip/4e4636cf981b5b629fbfb78aa9f232e015f7d521
Author: Josh Poimboeuf <jpoimboe@redhat.com>
AuthorDate: Mon, 27 Feb 2017 22:21:16 -0600
Committer: Ingo Molnar <mingo@kernel.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@roeck-us.net>
Reported-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.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@kernel.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")))
[toc] | [prev] | [next] | [standalone]
| From | Guenter Roeck <linux@roeck-us.net> |
|---|---|
| Date | 2017-02-28 02:30 +0100 |
| Subject | Re: Crash in -next due to 'objtool: Improve detection of BUG() and other dead ends' |
| Message-ID | <tfEiZ-576-9@gated-at.bofh.it> |
| In reply to | #1588993 |
Hi Josh,
On Mon, Feb 27, 2017 at 04:21:14PM -0600, Josh Poimboeuf wrote:
> On Mon, Feb 27, 2017 at 12:59:23PM -0800, Guenter Roeck wrote:
> > Hi,
> >
> > my qemu tests for mips64 in -next fail as follows.
> >
> > ...
> > VFS: Mounted root (ext3 filesystem) on device 8:0.
> > Freeing unused kernel memory: 304K
> > This architecture does not have kernel memory protection.
> > Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000a
> >
> > ---[ end Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000a
> >
> > There is no symbol traceback, and I don't see any other (obvious) error
> > message. bisect points to commit 'objtool: Improve detection of BUG()
> > and other dead ends'; reverting that patch fixes the problem.
> > Bisect log is attached below.
> >
> > The script used to run the test as well as the root file system is available
> > at https://github.com/groeck/linux-build-test/tree/master/rootfs/mips64
> >
> > A complete log is available at
> > http://kerneltests.org/builders/qemu-mips64-next/builds/592/steps/qemubuildcommand/logs/stdio
>
> Hi Guenter,
>
> This failure doesn't make much sense. Objtool (and the reported bad
> patch) are x86-only and should have nothing to do with mips64. Would it
> be possible for you to double check the error?
>
I already did; after all, bisect points to the patch, and reverting it fixes
the problem. After looking into the patch, I concluded that the following
might help.
-#define unreachable() annotate_unreachable(); __builtin_unreachable()
+#define unreachable() do { annotate_unreachable(); __builtin_unreachable(); } while (0)
and it does ...
> Otherwise I could try to recreate. Do you have a recommendation for a
> mips cross-compiler? (preferably something that's already built and that
> might work on Fedora)
>
I use gcc 4.9.0 from
https://www.kernel.org/pub/tools/crosstool/files/bin/x86_64/4.9.0/
Guenter
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web