Skip to content

RFC x86: Mad WARN() hackery

Peter Zijlstra lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest8 patches 12 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/8x86: Provide assembly __bug_table helpersarch/x86/include/asm/bug.h+24 -300 replies
2/8bug: Add BUGFLAG_FORMAT infrastructureinclude/asm-generic/bug.h lib/bug.c+28 -00 replies
3/8bug: Clean up CONFIG_GENERIC_BUG_RELATIVE_POINTERSinclude/asm-generic/bug.h+8 -140 replies
4/8bug: Allow architectures to provide __WARN_printf()include/asm-generic/bug.h+13 -80 replies
5/8x86_64/bug: Add BUG_FORMAT basicsarch/x86/include/asm/bug.h+18 -40 replies
6/8x86_64/bug: Implement __WARN_printf()arch/x86/include/asm/bug.h arch/x86/kernel/traps.c+225 -2712 replies
7/8x86/bug: Implement WARN_ONCE()arch/x86/include/asm/bug.h include/asm-generic/bug.h+30 -00 replies
8/8x86: Clean up default rethunk warningarch/x86/entry/entry.S arch/x86/include/asm/nospec-branch.h arch/x86/kernel/cpu/bugs.c +1 more+17 -180 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [RFC 0/8] x86: Mad WARN() hackery

Hi,

I've been annoyed at how WARN() works for quite some time, and Alessandro has been trying to make it even worse.

This is an attempt at making WARN() generate less crap for the most common cases. It is somewhat magical, but appears to be working for the simple cases I've tried. Specifically, it moves the __warn_printf() into the exception for the case of 3 or less arguments.

This would hopefully allow Allesandro to put the kunit hackery in report_bug() and not spread it around all the WARN() sites like he does now.