New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 781384 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Nov 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 2
Type: Bug



Sign in to add a comment

kernel warnings are always unknown signature on arm64 (and some other platforms)

Project Member Reported by diand...@chromium.org, Nov 3 2017

Issue description

Forked from  bug #780600 

If you look at:

  https://goto.google.com/cr780600_crashes

The 2nd crash from the top is "c64a73e9-nknown-function".  One example specific crash is:

  http://crash.corp.google.com/38abaa3c3fc61fb4

---

So there are two problems here.  

1. The "u" is missing in "unknown".  This is  bug #781343 

2. Really, this shouldn't be an unknown function.

...this bug is about #2.

 
The reason for this is fairly well described in:

  https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=2553b67a1fbe7bf202e4e8070ab0b00d3d3a06a2


Basically we're on a platform that uses different code to print the warning.  Currently I'm looking at whether it's better to pick the kernel change or make the crash-reporting code handle the existing kernel format...
Easy to fix the kernel:

remote:   https://chromium-review.googlesource.com/#/c/chromiumos/third_party/kernel/+/754000 UPSTREAM: lib/bug.c: make panic_on_warn available for all architectures        
remote:   https://chromium-review.googlesource.com/#/c/chromiumos/third_party/kernel/+/754221 UPSTREAM: lib/bug.c: use common WARN helper        

---

Will need someone to test on 3.18 (elm and friends), too.  I uploaded my (totally untested) picks here:

remote:   https://chromium-review.googlesource.com/#/c/chromiumos/third_party/kernel/+/754029 UPSTREAM: lib/bug.c: make panic_on_warn available for all architectures        
remote:   https://chromium-review.googlesource.com/#/c/chromiumos/third_party/kernel/+/754030 UPSTREAM: lib/bug.c: use common WARN helper        


Labels: M-63
Whoops, bugs were accidentally tagged  bug #781343 .  Doh.  4.4 changes landed.  Hopefully 3.18 can land in the next day or so and then we can request merge since it'd be nice to get proper warning statistics on M63.
Labels: Merge-Request-63
Turns out 3.18 patches weren't needed, so just requesting merge for 4.4 patches.  AKA:

remote:   https://chromium-review.googlesource.com/#/c/chromiumos/third_party/kernel/+/754000 UPSTREAM: lib/bug.c: make panic_on_warn available for all architectures        
remote:   https://chromium-review.googlesource.com/#/c/chromiumos/third_party/kernel/+/754221 UPSTREAM: lib/bug.c: use common WARN helper      
Project Member

Comment 5 by sheriffbot@chromium.org, Nov 6 2017

Labels: -Merge-Request-63 Merge-Review-63 Hotlist-Merge-Review
This bug requires manual review: M63 has already been promoted to the beta branch, so this requires manual review
Please contact the milestone owner if you have questions.
Owners: cmasso@(Android), cmasso@(iOS), gkihumba@(ChromeOS), govind@(Desktop)

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Labels: -Hotlist-Merge-Review -Merge-Review-63 Merge-Approved-63
Project Member

Comment 7 by bugdroid1@chromium.org, Nov 6 2017

Labels: merge-merged-release-R63-10032.B-chromeos-4.4
The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/kernel/+/81feef77d3cac8654beee550d3d7805e46350ada

commit 81feef77d3cac8654beee550d3d7805e46350ada
Author: Heiko Carstens <heiko.carstens@de.ibm.com>
Date: Mon Nov 06 22:25:51 2017

UPSTREAM: lib/bug.c: make panic_on_warn available for all architectures

Christian Borntraeger reported that panic_on_warn doesn't have any
effect on s390.

The panic_on_warn feature was introduced with 9e3961a09798 ("kernel: add
panic_on_warn").  However it did care only for the case when
WANT_WARN_ON_SLOWPATH is defined.  This is turn is only the case for
architectures which do not have an own __WARN_TAINT defined.

Other architectures which do have __WARN_TAINT defined call report_bug()
for warnings within lib/bug.c which does not call panic() in case
panic_on_warn is set.

Let's simply enable the panic_on_warn feature by adding the same code
like it was added to warn_slowpath_common() in panic.c.

This enables panic_on_warn also for arm64, parisc, powerpc, s390 and sh.

BUG= chromium:781384 
TEST=echo WARNING > /sys/kernel/debug/provoke-crash/DIRECT

Change-Id: I8fdf6490ea439e091054995367472accfb46a66c
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Reported-by: Christian Borntraeger <borntraeger@de.ibm.com>
Tested-by: Christian Borntraeger <borntraeger@de.ibm.com>
Acked-by: Prarit Bhargava <prarit@redhat.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will.deacon@arm.com>
Cc: "James E.J. Bottomley" <jejb@parisc-linux.org>
Cc: Helge Deller <deller@gmx.de>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Tested-by: Michael Ellerman <mpe@ellerman.id.au> (powerpc)
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Douglas Anderson <dianders@chromium.org>
(cherry picked from commit d7b85cab74edef84a9330c476478ba8cd732b6a9)
Reviewed-on: https://chromium-review.googlesource.com/754000
Reviewed-by: Nicolas Boichat <drinkcat@chromium.org>
(cherry picked from commit 0fd77fcb1a5e785e1f93177dd6785aaa7570908a)
Reviewed-on: https://chromium-review.googlesource.com/755524

[modify] https://crrev.com/81feef77d3cac8654beee550d3d7805e46350ada/lib/bug.c

Project Member

Comment 8 by bugdroid1@chromium.org, Nov 6 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/third_party/kernel/+/c9a1b15bf57d81760fdead8e0651135be7a293b0

commit c9a1b15bf57d81760fdead8e0651135be7a293b0
Author: Josh Poimboeuf <jpoimboe@redhat.com>
Date: Mon Nov 06 22:26:23 2017

UPSTREAM: lib/bug.c: use common WARN helper

The traceoff_on_warning option doesn't have any effect on s390, powerpc,
arm64, parisc, and sh because there are two different types of WARN
implementations:

1) The above mentioned architectures treat WARN() as a special case of a
   BUG() exception.  They handle warnings in report_bug() in lib/bug.c.

2) All other architectures just call warn_slowpath_*() directly.  Their
   warnings are handled in warn_slowpath_common() in kernel/panic.c.

Support traceoff_on_warning on all architectures and prevent any future
divergence by using a single common function to emit the warning.

Also remove the '()' from '%pS()', because the parentheses look funky:

  [   45.607629] WARNING: at /root/warn_mod/warn_mod.c:17 .init_dummy+0x20/0x40 [warn_mod]()

BUG= chromium:781384 
TEST=echo WARNING > /sys/kernel/debug/provoke-crash/DIRECT

Change-Id: I3babe475d30ed2c5e16aa783a1422f3d5c599e74
Reported-by: Chunyu Hu <chuhu@redhat.com>
Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
Acked-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Tested-by: Prarit Bhargava <prarit@redhat.com>
Acked-by: Prarit Bhargava <prarit@redhat.com>
Acked-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Douglas Anderson <dianders@chromium.org>
(cherry picked from commit 2553b67a1fbe7bf202e4e8070ab0b00d3d3a06a2)
Reviewed-on: https://chromium-review.googlesource.com/754221
Reviewed-by: Nicolas Boichat <drinkcat@chromium.org>
(cherry picked from commit 89660857d58cec2155474f446455c41a22fd2b50)
Reviewed-on: https://chromium-review.googlesource.com/755525

[modify] https://crrev.com/c9a1b15bf57d81760fdead8e0651135be7a293b0/kernel/panic.c
[modify] https://crrev.com/c9a1b15bf57d81760fdead8e0651135be7a293b0/include/asm-generic/bug.h
[modify] https://crrev.com/c9a1b15bf57d81760fdead8e0651135be7a293b0/lib/bug.c

Labels: -Merge-Approved-63 Merge-Merged
Status: Fixed (was: Started)

Sign in to add a comment