[PATCH 13/14] bugs/sh: Concatenate 'cond_str' with '__FILE__' in __WARN_FLAGS(), to extend WARN_ON/BUG_ON output

Ingo Molnar posted 14 patches 8 months, 3 weeks ago
[PATCH 13/14] bugs/sh: Concatenate 'cond_str' with '__FILE__' in __WARN_FLAGS(), to extend WARN_ON/BUG_ON output
Posted by Ingo Molnar 8 months, 3 weeks ago
Extend WARN_ON and BUG_ON style output from:

  WARNING: CPU: 0 PID: 0 at kernel/sched/core.c:8511 sched_init+0x20/0x410

to:

  WARNING: CPU: 0 PID: 0 at [idx < 0 && ptr] kernel/sched/core.c:8511 sched_init+0x20/0x410

Note that the output will be further reorganized later in this series.

Signed-off-by: Ingo Molnar <mingo@kernel.org>
Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
Cc: Rich Felker <dalias@libc.org>
Cc: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
Cc: linux-sh@vger.kernel.org
Cc: <linux-arch@vger.kernel.org>
---
 arch/sh/include/asm/bug.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/sh/include/asm/bug.h b/arch/sh/include/asm/bug.h
index 834c621ab249..20d5220bf452 100644
--- a/arch/sh/include/asm/bug.h
+++ b/arch/sh/include/asm/bug.h
@@ -59,7 +59,7 @@ do {							\
 		 _EMIT_BUG_ENTRY			\
 		 :					\
 		 : "n" (TRAPA_BUG_OPCODE),		\
-		   "i" (__FILE__),			\
+		   "i" (cond_str __FILE__),		\
 		   "i" (__LINE__),			\
 		   "i" (BUGFLAG_WARNING|(flags)),	\
 		   "i" (sizeof(struct bug_entry)));	\
-- 
2.45.2
Re: [PATCH 13/14] bugs/sh: Concatenate 'cond_str' with '__FILE__' in __WARN_FLAGS(), to extend WARN_ON/BUG_ON output
Posted by Linus Torvalds 8 months, 3 weeks ago
On Thu, 27 Mar 2025 at 03:30, Ingo Molnar <mingo@kernel.org> wrote:
>
> Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
> Cc: Rich Felker <dalias@libc.org>
> Cc: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
> Cc: linux-sh@vger.kernel.org
> Cc: <linux-arch@vger.kernel.org>

You say that, but I don't see that in the actual email, which only
went to lkml...

So the sh maintainers (and riscv and s390 etc: same issue with those
emails) probably never saw this.

The patches look fine to me, fwiw.

           Linus
Re: [PATCH 13/14] bugs/sh: Concatenate 'cond_str' with '__FILE__' in __WARN_FLAGS(), to extend WARN_ON/BUG_ON output
Posted by Ingo Molnar 7 months ago
* Linus Torvalds <torvalds@linux-foundation.org> wrote:

> The patches look fine to me, fwiw.

So I've changed the series slightly to add a new Kconfig option to 
trigger these extra strings:

	CONFIG_DEBUG_BUGVERBOSE_DETAILED=y

Disabled by default.

This should address concerns over the +100K kernel size increase that 
some have raised.

I'll send out a -v2 series, which should have the Cc: problems fixed as 
well, so that all architecture people see it too.

Thanks,

	Ingo
Re: [PATCH 13/14] bugs/sh: Concatenate 'cond_str' with '__FILE__' in __WARN_FLAGS(), to extend WARN_ON/BUG_ON output
Posted by Ingo Molnar 8 months, 3 weeks ago
* Linus Torvalds <torvalds@linux-foundation.org> wrote:

> On Thu, 27 Mar 2025 at 03:30, Ingo Molnar <mingo@kernel.org> wrote:
> >
> > Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
> > Cc: Rich Felker <dalias@libc.org>
> > Cc: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
> > Cc: linux-sh@vger.kernel.org
> > Cc: <linux-arch@vger.kernel.org>
> 
> You say that, but I don't see that in the actual email, which only
> went to lkml...

Indeed, usually I rely on the tip-bot picking up Cc: lines, but here it 
would be useful to have earlier Cc:s and my script had, for some stupid 
reason:

  --suppress-cc=all

... which certainly suppressed the Cc: lines :-/

Will take a careful look at a --dry-run output next time around and 
make sure the --signed-off-by-cc auto-cc logic picks up all the Cc: 
lines in the individual commits.

> So the sh maintainers (and riscv and s390 etc: same issue with those 
> emails) probably never saw this.

Yeah, will iterate it once more just to make sure.

Thanks,

	Ingo