From 9ef04c1fae528b55781e8faa1a8ced03ae642a83 Mon Sep 17 00:00:00 2001 From: Javier Honduvilla Coto Date: Tue, 6 Jan 2026 15:59:51 +0100 Subject: [PATCH] Enable `CONFIG_FTRACE_SYSCALLS` To add various useful types including `struct syscall_trace_enter` and `struct syscall_trace_exit`. See https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-9/-/merge_requests/3717 Test Plan ========= Validated that `struct syscall_trace_{enter,exit}` is included. CI will check that there are no inconsistencies --- include/aarch64/vmlinux_6.18.h | 39 +++++++++++++++++++++++++++++ include/arm/vmlinux_6.18.h | 40 ++++++++++++++++++++++++++++++ include/loongarch64/vmlinux_6.18.h | 39 +++++++++++++++++++++++++++++ include/powerpc/vmlinux_6.18.h | 40 ++++++++++++++++++++++++++++++ include/riscv64/vmlinux_6.18.h | 39 +++++++++++++++++++++++++++++ include/s390x/vmlinux_6.18.h | 39 +++++++++++++++++++++++++++++ include/x86/vmlinux_6.18.h | 39 +++++++++++++++++++++++++++++ kconfigs/config.common | 1 + 8 files changed, 276 insertions(+) diff --git a/include/aarch64/vmlinux_6.18.h b/include/aarch64/vmlinux_6.18.h index 3f51b78..15c8e54 100644 --- a/include/aarch64/vmlinux_6.18.h +++ b/include/aarch64/vmlinux_6.18.h @@ -41826,6 +41826,41 @@ struct syscall_info { struct seccomp_data data; }; +struct syscall_metadata { + const char *name; + int syscall_nr; + int nb_args; + const char **types; + const char **args; + struct list_head enter_fields; + struct trace_event_call *enter_event; + struct trace_event_call *exit_event; +}; + +struct syscall_tp_t { + struct trace_entry ent; + int syscall_nr; + long unsigned int ret; +}; + +struct syscall_tp_t___2 { + struct trace_entry ent; + int syscall_nr; + long unsigned int args[6]; +}; + +struct syscall_trace_enter { + struct trace_entry ent; + int nr; + long unsigned int args[0]; +}; + +struct syscall_trace_exit { + struct trace_entry ent; + int nr; + long int ret; +}; + struct syscall_user_dispatch {}; struct syscore_ops { @@ -43375,6 +43410,10 @@ struct trace_array { struct trace_pid_list *filtered_pids; struct trace_pid_list *filtered_no_pids; arch_spinlock_t max_lock; + int sys_refcount_enter; + int sys_refcount_exit; + struct trace_event_file *enter_syscall_files[470]; + struct trace_event_file *exit_syscall_files[470]; int stop_count; int clock_id; int nr_topts; diff --git a/include/arm/vmlinux_6.18.h b/include/arm/vmlinux_6.18.h index d7f3e2c..5397e06 100644 --- a/include/arm/vmlinux_6.18.h +++ b/include/arm/vmlinux_6.18.h @@ -41039,6 +41039,42 @@ struct sys_off_handler { struct device *dev; }; +struct syscall_metadata { + const char *name; + int syscall_nr; + int nb_args; + const char **types; + const char **args; + struct list_head enter_fields; + struct trace_event_call *enter_event; + struct trace_event_call *exit_event; +}; + +struct syscall_tp_t { + struct trace_entry ent; + int syscall_nr; + long unsigned int ret; +}; + +struct syscall_tp_t___2 { + struct trace_entry ent; + int syscall_nr; + long unsigned int args[6]; + long: 32; +}; + +struct syscall_trace_enter { + struct trace_entry ent; + int nr; + long unsigned int args[0]; +}; + +struct syscall_trace_exit { + struct trace_entry ent; + int nr; + long int ret; +}; + struct syscall_user_dispatch {}; struct syscore_ops { @@ -42717,6 +42753,10 @@ struct trace_array { struct trace_pid_list *filtered_pids; struct trace_pid_list *filtered_no_pids; arch_spinlock_t max_lock; + int sys_refcount_enter; + int sys_refcount_exit; + struct trace_event_file *enter_syscall_files[472]; + struct trace_event_file *exit_syscall_files[472]; int stop_count; int clock_id; int nr_topts; diff --git a/include/loongarch64/vmlinux_6.18.h b/include/loongarch64/vmlinux_6.18.h index 5a2dfde..bf6d3ad 100644 --- a/include/loongarch64/vmlinux_6.18.h +++ b/include/loongarch64/vmlinux_6.18.h @@ -49718,6 +49718,41 @@ struct syscall_info { struct seccomp_data data; }; +struct syscall_metadata { + const char *name; + int syscall_nr; + int nb_args; + const char **types; + const char **args; + struct list_head enter_fields; + struct trace_event_call *enter_event; + struct trace_event_call *exit_event; +}; + +struct syscall_tp_t { + struct trace_entry ent; + int syscall_nr; + long unsigned int ret; +}; + +struct syscall_tp_t___2 { + struct trace_entry ent; + int syscall_nr; + long unsigned int args[6]; +}; + +struct syscall_trace_enter { + struct trace_entry ent; + int nr; + long unsigned int args[0]; +}; + +struct syscall_trace_exit { + struct trace_entry ent; + int nr; + long int ret; +}; + struct syscall_user_dispatch { char *selector; long unsigned int offset; @@ -51309,6 +51344,10 @@ struct trace_array { struct trace_pid_list *filtered_pids; struct trace_pid_list *filtered_no_pids; arch_spinlock_t max_lock; + int sys_refcount_enter; + int sys_refcount_exit; + struct trace_event_file *enter_syscall_files[470]; + struct trace_event_file *exit_syscall_files[470]; int stop_count; int clock_id; int nr_topts; diff --git a/include/powerpc/vmlinux_6.18.h b/include/powerpc/vmlinux_6.18.h index 4a7eed5..b4c05fb 100644 --- a/include/powerpc/vmlinux_6.18.h +++ b/include/powerpc/vmlinux_6.18.h @@ -40631,6 +40631,42 @@ struct sys_off_handler { struct device *dev; }; +struct syscall_metadata { + const char *name; + int syscall_nr; + int nb_args; + const char **types; + const char **args; + struct list_head enter_fields; + struct trace_event_call *enter_event; + struct trace_event_call *exit_event; +}; + +struct syscall_tp_t { + struct trace_entry ent; + int syscall_nr; + long unsigned int ret; +}; + +struct syscall_tp_t___2 { + struct trace_entry ent; + int syscall_nr; + long unsigned int args[6]; + long: 32; +}; + +struct syscall_trace_enter { + struct trace_entry ent; + int nr; + long unsigned int args[0]; +}; + +struct syscall_trace_exit { + struct trace_entry ent; + int nr; + long int ret; +}; + struct syscall_user_dispatch {}; struct syscore_ops { @@ -42172,6 +42208,10 @@ struct trace_array { struct trace_pid_list *filtered_pids; struct trace_pid_list *filtered_no_pids; arch_spinlock_t max_lock; + int sys_refcount_enter; + int sys_refcount_exit; + struct trace_event_file *enter_syscall_files[470]; + struct trace_event_file *exit_syscall_files[470]; int stop_count; int clock_id; int nr_topts; diff --git a/include/riscv64/vmlinux_6.18.h b/include/riscv64/vmlinux_6.18.h index 3aaf85b..968aa49 100644 --- a/include/riscv64/vmlinux_6.18.h +++ b/include/riscv64/vmlinux_6.18.h @@ -39662,6 +39662,41 @@ struct sys_off_handler { struct device *dev; }; +struct syscall_metadata { + const char *name; + int syscall_nr; + int nb_args; + const char **types; + const char **args; + struct list_head enter_fields; + struct trace_event_call *enter_event; + struct trace_event_call *exit_event; +}; + +struct syscall_tp_t { + struct trace_entry ent; + int syscall_nr; + long unsigned int ret; +}; + +struct syscall_tp_t___2 { + struct trace_entry ent; + int syscall_nr; + long unsigned int args[6]; +}; + +struct syscall_trace_enter { + struct trace_entry ent; + int nr; + long unsigned int args[0]; +}; + +struct syscall_trace_exit { + struct trace_entry ent; + int nr; + long int ret; +}; + struct syscall_user_dispatch { char *selector; long unsigned int offset; @@ -41215,6 +41250,10 @@ struct trace_array { struct trace_pid_list *filtered_pids; struct trace_pid_list *filtered_no_pids; arch_spinlock_t max_lock; + int sys_refcount_enter; + int sys_refcount_exit; + struct trace_event_file *enter_syscall_files[470]; + struct trace_event_file *exit_syscall_files[470]; int stop_count; int clock_id; int nr_topts; diff --git a/include/s390x/vmlinux_6.18.h b/include/s390x/vmlinux_6.18.h index 79ed8c5..7c9cbd5 100644 --- a/include/s390x/vmlinux_6.18.h +++ b/include/s390x/vmlinux_6.18.h @@ -48611,6 +48611,41 @@ struct syscall_info { struct seccomp_data data; }; +struct syscall_metadata { + const char *name; + int syscall_nr; + int nb_args; + const char **types; + const char **args; + struct list_head enter_fields; + struct trace_event_call *enter_event; + struct trace_event_call *exit_event; +}; + +struct syscall_tp_t { + struct trace_entry ent; + int syscall_nr; + long unsigned int ret; +}; + +struct syscall_tp_t___2 { + struct trace_entry ent; + int syscall_nr; + long unsigned int args[6]; +}; + +struct syscall_trace_enter { + struct trace_entry ent; + int nr; + long unsigned int args[0]; +}; + +struct syscall_trace_exit { + struct trace_entry ent; + int nr; + long int ret; +}; + struct syscall_user_dispatch { char *selector; long unsigned int offset; @@ -50436,6 +50471,10 @@ struct trace_array { struct trace_pid_list *filtered_pids; struct trace_pid_list *filtered_no_pids; arch_spinlock_t max_lock; + int sys_refcount_enter; + int sys_refcount_exit; + struct trace_event_file *enter_syscall_files[470]; + struct trace_event_file *exit_syscall_files[470]; int stop_count; int clock_id; int nr_topts; diff --git a/include/x86/vmlinux_6.18.h b/include/x86/vmlinux_6.18.h index ef60756..018cf4d 100644 --- a/include/x86/vmlinux_6.18.h +++ b/include/x86/vmlinux_6.18.h @@ -45929,6 +45929,41 @@ struct syscall_info { struct seccomp_data data; }; +struct syscall_metadata { + const char *name; + int syscall_nr; + int nb_args; + const char **types; + const char **args; + struct list_head enter_fields; + struct trace_event_call *enter_event; + struct trace_event_call *exit_event; +}; + +struct syscall_tp_t { + struct trace_entry ent; + int syscall_nr; + long unsigned int ret; +}; + +struct syscall_tp_t___2 { + struct trace_entry ent; + int syscall_nr; + long unsigned int args[6]; +}; + +struct syscall_trace_enter { + struct trace_entry ent; + int nr; + long unsigned int args[0]; +}; + +struct syscall_trace_exit { + struct trace_entry ent; + int nr; + long int ret; +}; + struct syscall_user_dispatch { char *selector; long unsigned int offset; @@ -47503,6 +47538,10 @@ struct trace_array { struct trace_pid_list *filtered_pids; struct trace_pid_list *filtered_no_pids; arch_spinlock_t max_lock; + int sys_refcount_enter; + int sys_refcount_exit; + struct trace_event_file *enter_syscall_files[470]; + struct trace_event_file *exit_syscall_files[470]; int stop_count; int clock_id; int nr_topts; diff --git a/kconfigs/config.common b/kconfigs/config.common index 730bdeb..996b85d 100644 --- a/kconfigs/config.common +++ b/kconfigs/config.common @@ -7,6 +7,7 @@ CONFIG_DEBUG_INFO_BTF=y CONFIG_DEBUG_INFO_DWARF4=y CONFIG_FPROBE=y CONFIG_FTRACE=y +CONFIG_FTRACE_SYSCALLS=y CONFIG_FUNCTION_TRACER=y CONFIG_INET=y CONFIG_KPROBES=y