Fix up build issues with vpanic
cover Fix up build issues with vpanic
Hi,
The newly introduced vpanic() has some build issues. This series fix them up.
As the vpanic() is only in ftrace tree for now, it is probably best to let this series goes to ftrace tree, if everyone is okay with that.
Best regards,
Nam
Nam Cao (2):
objtool: Add vpanic() to the noreturn list
panic: Fix up description of vpanic()
kernel/panic.c | 2 +- tools/objtool/noreturns.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-)
Signature · 1 line
2.39.5
PATCH 1/2 objtool: Add vpanic() to the noreturn list
vpanic() does not return. However, objtool doesn't know this and gets
confused:kernel/trace/rv/reactor_panic.o: warning: objtool: rv_panic_reaction(): unexpected end of section .text
Add vpanic() to the list of noreturn functions.
--- tools/objtool/noreturns.h | 1 + 1 file changed, 1 insertion(+)
tools/objtool/noreturns.h +1 -0
@@ -38,6 +38,7 @@ NORETURN(mpt_halt_firmware) NORETURN(mwait_play_dead) NORETURN(nmi_panic_self_stop) NORETURN(panic) +NORETURN(vpanic) NORETURN(panic_smp_self_stop) NORETURN(rest_init) NORETURN(rewind_stack_and_make_dead)
Signature · 1 line
2.39.5
PATCH 2/2 panic: Fix up description of vpanic()
In reply to Nam CaoThe description above vpanic() has the wrong function name. Fix it up.
--- kernel/panic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/panic.c +1 -1
@@ -307,7 +307,7 @@ static void panic_other_cpus_shutdown(bool crash_kexec) }/** -* panic - halt the system +* vpanic - halt the system * @fmt: The text string to print * @args: Arguments for the format string *
Signature · 1 line
2.39.5
Masami Hiramatsu (Google)
maintainerRe: [PATCH 2/2] panic: Fix up description of vpanic()
Quoted 14 lines · On Fri, 11 Jul 2025 13:20:43 +0200 Nam Cao <[email protected]> wrote:
The description above
vpanic()has the wrong function name. Fix it up.Reported-by Stephen Rothwell <[email protected]>Signed-off-by Nam Cao <[email protected]>--- kernel/panic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)kernel/panic.c +0
-0
kernel/panic.c static void panic_other_cpus_shutdown(bool crash_kexec) · line 310
Quoted 5 lines
kernel/panic.c +1
-1@@ -307,7 +307,7 @@ static void panic_other_cpus_shutdown(bool crash_kexec) }/** -* panic - halt the system +* vpanic - halt the system
Shouldn't we make a copy the doc for the panic() (keep the text as it is) and change the short explanation?
panic - halt the system
@fmt: ...
vpanic - halt the system with va_list
@fmt: ...
@args: ...
From the newbie's viewpoint, as far as we keep providing the same
function, it is better to keep the same document to avoid confusion.
Thanks,
Quoted 6 lines
kernel/panic.c +0
-0* @fmt: The text string to print * @args: Arguments for the format string * Signature · 1 line
2.39.5
Signature · 1 line
Masami Hiramatsu (Google) <[email protected]>
Re: [PATCH 2/2] panic: Fix up description of vpanic()
Quoted 12 lines · Masami Hiramatsu
Quoted 3 lines · On Fri, 11 Jul 2025 13:20:43 +0200 Nam Cao <[email protected]> wrote:
/**
- * panic - halt the system
+ * vpanic - halt the systemShouldn't we make a copy the doc for the
panic()(keep the text as it is) and change the short explanation?panic - halt the system
@fmt: ...
Quoted 6 lines
vpanic - halt the system with
va_list
@fmt: ...
@args: ...From the newbie's viewpoint, as far as we keep providing the same
function, it is better to keep the same document to avoid confusion.
That would be nice for sure. But I think the counter arguments are stronger:
- Two copies need to be maintained
- panic() is only a few lines, and it is obvious at first glance that it is simply a thin wrapper around vpanic()
So I think it is better to leave it as is.
Best regards,
Nam
Peter Zijlstra
maintainerQuoted 7 lines · Nam Cao
Hi,
The newly introduced
vpanic()has some build issues. This series fix them up.As the
vpanic()is only in ftrace tree for now, it is probably best to let this series goes to ftrace tree, if everyone is okay with that.
Does it make sense to make panic a static inline?
Quoted 10 lines · Peter Zijlstra
Quoted 7 lines · Nam Cao
Hi,
The newly introduced
vpanic()has some build issues. This series fix them up.As the
vpanic()is only in ftrace tree for now, it is probably best to let this series goes to ftrace tree, if everyone is okay with that.Does it make sense to make panic a static inline?
I think no, code size increases by a few K:
text data bss dec hex filename 12222627 6097658 479669 18799954 11edd52 vmlinux.before 12226703 6098618 479669 18804990 11ef0fe vmlinux.after
(it's riscv64, I had issue converting on x86 because there's another definition of panic())
Maybe faster? But panic() doesn't need to be fast, it's not called in normal circumstances anyway.
Best regards,
Nam
Steven Rostedt
maintainerQuoted 7 lines · On Fri, 11 Jul 2025 13:20:41 +0200 Nam Cao <[email protected]> wrote:
Hi,
The newly introduced
vpanic()has some build issues. This series fix them up.As the
vpanic()is only in ftrace tree for now, it is probably best to let this series goes to ftrace tree, if everyone is okay with that.
Since the bug is in my tree I'll take it, but can I get an acked-by from Peter or Josh?
Thanks,
-- Steve
Quoted 5 lines · Steven Rostedt
Quoted 2 lines · On Fri, 11 Jul 2025 13:20:41 +0200 Nam Cao <[email protected]> wrote:
Hi,
Quoted 8 lines
Quoted 5 lines
The newly introduced
vpanic()has some build issues. This series fix them up.As the
vpanic()is only in ftrace tree for now, it is probably best to let this series goes to ftrace tree, if everyone is okay with that.Since the bug is in my tree I'll take it, but can I get an acked-by from Peter or Josh?
Sure