* [PATCH] tracing: Hide __NR_utimensat and _NR_mq_timedsend when not defined
@ 2025-11-05 1:53 Steven Rostedt
2025-11-06 17:01 ` Masami Hiramatsu
0 siblings, 1 reply; 3+ messages in thread
From: Steven Rostedt @ 2025-11-05 1:53 UTC (permalink / raw)
To: LKML, Linux trace kernel
Cc: Masami Hiramatsu, Mathieu Desnoyers, kernel test robot
From: Steven Rostedt <rostedt@goodmis.org>
Some architectures (riscv-32) do not define __NR_utimensat and
_NR_mq_timedsend, and fails to build when they are used.
Hide them in "ifdef"s.
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202511031239.ZigDcWzY-lkp@intel.com/
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
---
kernel/trace/trace_syscalls.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/kernel/trace/trace_syscalls.c b/kernel/trace/trace_syscalls.c
index e07c5a3cc7ab..e96d0063cbcf 100644
--- a/kernel/trace/trace_syscalls.c
+++ b/kernel/trace/trace_syscalls.c
@@ -1072,7 +1072,9 @@ static void check_faultable_syscall(struct trace_event_call *call, int nr)
switch (nr) {
/* user arg 1 with size arg at 2 */
case __NR_write:
+#ifdef __NR_mq_timedsend
case __NR_mq_timedsend:
+#endif
case __NR_pwrite64:
sys_data->user_mask = BIT(1);
sys_data->user_arg_size = 2;
@@ -1186,7 +1188,9 @@ static void check_faultable_syscall(struct trace_event_call *call, int nr)
case __NR_syslog:
case __NR_statx:
case __NR_unlinkat:
+#ifdef __NR_utimensat
case __NR_utimensat:
+#endif
sys_data->user_mask = BIT(1);
break;
/* user arg at position 2 */
--
2.51.0
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH] tracing: Hide __NR_utimensat and _NR_mq_timedsend when not defined
2025-11-05 1:53 [PATCH] tracing: Hide __NR_utimensat and _NR_mq_timedsend when not defined Steven Rostedt
@ 2025-11-06 17:01 ` Masami Hiramatsu
2025-11-06 17:11 ` Steven Rostedt
0 siblings, 1 reply; 3+ messages in thread
From: Masami Hiramatsu @ 2025-11-06 17:01 UTC (permalink / raw)
To: Steven Rostedt
Cc: LKML, Linux trace kernel, Masami Hiramatsu, Mathieu Desnoyers,
kernel test robot
On Tue, 4 Nov 2025 20:53:10 -0500
Steven Rostedt <rostedt@goodmis.org> wrote:
> From: Steven Rostedt <rostedt@goodmis.org>
>
> Some architectures (riscv-32) do not define __NR_utimensat and
> _NR_mq_timedsend, and fails to build when they are used.
>
> Hide them in "ifdef"s.
(I wonder we can expect that other __NR_* also defined on every
architecture?)
Anyway, this looks good to me.
Acked-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
Thanks,
>
> Reported-by: kernel test robot <lkp@intel.com>
> Closes: https://lore.kernel.org/oe-kbuild-all/202511031239.ZigDcWzY-lkp@intel.com/
> Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
> ---
> kernel/trace/trace_syscalls.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/kernel/trace/trace_syscalls.c b/kernel/trace/trace_syscalls.c
> index e07c5a3cc7ab..e96d0063cbcf 100644
> --- a/kernel/trace/trace_syscalls.c
> +++ b/kernel/trace/trace_syscalls.c
> @@ -1072,7 +1072,9 @@ static void check_faultable_syscall(struct trace_event_call *call, int nr)
> switch (nr) {
> /* user arg 1 with size arg at 2 */
> case __NR_write:
> +#ifdef __NR_mq_timedsend
> case __NR_mq_timedsend:
> +#endif
> case __NR_pwrite64:
> sys_data->user_mask = BIT(1);
> sys_data->user_arg_size = 2;
> @@ -1186,7 +1188,9 @@ static void check_faultable_syscall(struct trace_event_call *call, int nr)
> case __NR_syslog:
> case __NR_statx:
> case __NR_unlinkat:
> +#ifdef __NR_utimensat
> case __NR_utimensat:
> +#endif
> sys_data->user_mask = BIT(1);
> break;
> /* user arg at position 2 */
> --
> 2.51.0
>
--
Masami Hiramatsu (Google) <mhiramat@kernel.org>
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] tracing: Hide __NR_utimensat and _NR_mq_timedsend when not defined
2025-11-06 17:01 ` Masami Hiramatsu
@ 2025-11-06 17:11 ` Steven Rostedt
0 siblings, 0 replies; 3+ messages in thread
From: Steven Rostedt @ 2025-11-06 17:11 UTC (permalink / raw)
To: Masami Hiramatsu (Google)
Cc: LKML, Linux trace kernel, Mathieu Desnoyers, kernel test robot
On Fri, 7 Nov 2025 02:01:04 +0900
Masami Hiramatsu (Google) <mhiramat@kernel.org> wrote:
> On Tue, 4 Nov 2025 20:53:10 -0500
> Steven Rostedt <rostedt@goodmis.org> wrote:
>
> > From: Steven Rostedt <rostedt@goodmis.org>
> >
> > Some architectures (riscv-32) do not define __NR_utimensat and
> > _NR_mq_timedsend, and fails to build when they are used.
> >
> > Hide them in "ifdef"s.
>
> (I wonder we can expect that other __NR_* also defined on every
> architecture?)
> Anyway, this looks good to me.
I built every arch when I did the first update. It just happened that my
scripts to build riscv-32 was actually building riscv-64 :-p
So it's now all tested.
>
> Acked-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
>
Thanks!
-- Steve
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-11-06 17:11 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-05 1:53 [PATCH] tracing: Hide __NR_utimensat and _NR_mq_timedsend when not defined Steven Rostedt
2025-11-06 17:01 ` Masami Hiramatsu
2025-11-06 17:11 ` Steven Rostedt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox