Re: [PATCH] tracing: Add WARN_ON_ONCE for syscall_nr check

From: Tao Chen
Date: Thu Nov 28 2024 - 08:16:21 EST


在 2024/11/28 20:46, Steven Rostedt 写道:
On Thu, 28 Nov 2024 19:53:19 +0800
Tao Chen <chen.dylane@xxxxxxxxx> wrote:

Now, x86_64 kernel not support to trace syscall for ia32 syscall.
As a result, there is no any trace output when tracing a ia32 task.
Like unreg_event_syscall_enter, add a WARN_ON_ONCE judgment for
syscall_nr in perf_syscall_enter and ftrace_syscall_enter to give
some message.

So on a system that has "panic_on_warn" set and they trace a 32 bit
system call, it will cause their system to crash. Is that the intended
behavior?

WARN*() is for self testing the kernel to detect real bugs, not to
inform users that something isn't supported.

BIG NAK!

-- Steve

Hi, Steve, thank you for your reply, as you say, so what about pr_warn_once api just to print something ?

--
Best Regards
Dylane Chen