diff options
| author | Ingo Molnar <mingo@kernel.org> | 2025-05-15 14:46:34 +0200 |
|---|---|---|
| committer | Ingo Molnar <mingo@kernel.org> | 2025-06-13 10:25:32 +0200 |
| commit | 48ede5be5c07c8b9fe896bfcb18a78c0d72651de (patch) | |
| tree | 21f5bcf52255a80ab6e10eb74f56b61aa93cb6ac /kernel/trace/trace_functions_graph.c | |
| parent | 407b9076c147669318a58bbd54185b03055dc9a6 (diff) | |
bugs/x86: Augment warnings output by concatenating 'cond_str' with the regular __FILE__ string in _BUG_FLAGS()
This allows the reuse of the UD2 based 'struct bug_entry' low-overhead
_BUG_FLAGS() implementation and string-printing backend, without
having to add a new field.
An example:
If we have the following WARN_ON_ONCE() in kernel/sched/core.c:
WARN_ON_ONCE(idx < 0 && ptr);
Then previously _BUG_FLAGS() would store this string in bug_entry::file:
"kernel/sched/core.c"
After this patch, it would store and print:
"[idx < 0 && ptr] kernel/sched/core.c"
Which is an extended string that will be printed in warnings.
Suggested-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Acked-by: Peter Zijlstra <peterz@infradead.org>
Cc: linux-arch@vger.kernel.org
Link: https://lore.kernel.org/r/20250515124644.2958810-6-mingo@kernel.org
Diffstat (limited to 'kernel/trace/trace_functions_graph.c')
0 files changed, 0 insertions, 0 deletions
