Skip to content

Commit 679a3da

Browse files
javierhonducodanielocfb
authored andcommitted
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
1 parent 75bb40a commit 679a3da

File tree

8 files changed

+276
-0
lines changed

8 files changed

+276
-0
lines changed

include/aarch64/vmlinux_6.18.h

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41826,6 +41826,41 @@ struct syscall_info {
4182641826
struct seccomp_data data;
4182741827
};
4182841828

41829+
struct syscall_metadata {
41830+
const char *name;
41831+
int syscall_nr;
41832+
int nb_args;
41833+
const char **types;
41834+
const char **args;
41835+
struct list_head enter_fields;
41836+
struct trace_event_call *enter_event;
41837+
struct trace_event_call *exit_event;
41838+
};
41839+
41840+
struct syscall_tp_t {
41841+
struct trace_entry ent;
41842+
int syscall_nr;
41843+
long unsigned int ret;
41844+
};
41845+
41846+
struct syscall_tp_t___2 {
41847+
struct trace_entry ent;
41848+
int syscall_nr;
41849+
long unsigned int args[6];
41850+
};
41851+
41852+
struct syscall_trace_enter {
41853+
struct trace_entry ent;
41854+
int nr;
41855+
long unsigned int args[0];
41856+
};
41857+
41858+
struct syscall_trace_exit {
41859+
struct trace_entry ent;
41860+
int nr;
41861+
long int ret;
41862+
};
41863+
4182941864
struct syscall_user_dispatch {};
4183041865

4183141866
struct syscore_ops {
@@ -43375,6 +43410,10 @@ struct trace_array {
4337543410
struct trace_pid_list *filtered_pids;
4337643411
struct trace_pid_list *filtered_no_pids;
4337743412
arch_spinlock_t max_lock;
43413+
int sys_refcount_enter;
43414+
int sys_refcount_exit;
43415+
struct trace_event_file *enter_syscall_files[470];
43416+
struct trace_event_file *exit_syscall_files[470];
4337843417
int stop_count;
4337943418
int clock_id;
4338043419
int nr_topts;

include/arm/vmlinux_6.18.h

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41039,6 +41039,42 @@ struct sys_off_handler {
4103941039
struct device *dev;
4104041040
};
4104141041

41042+
struct syscall_metadata {
41043+
const char *name;
41044+
int syscall_nr;
41045+
int nb_args;
41046+
const char **types;
41047+
const char **args;
41048+
struct list_head enter_fields;
41049+
struct trace_event_call *enter_event;
41050+
struct trace_event_call *exit_event;
41051+
};
41052+
41053+
struct syscall_tp_t {
41054+
struct trace_entry ent;
41055+
int syscall_nr;
41056+
long unsigned int ret;
41057+
};
41058+
41059+
struct syscall_tp_t___2 {
41060+
struct trace_entry ent;
41061+
int syscall_nr;
41062+
long unsigned int args[6];
41063+
long: 32;
41064+
};
41065+
41066+
struct syscall_trace_enter {
41067+
struct trace_entry ent;
41068+
int nr;
41069+
long unsigned int args[0];
41070+
};
41071+
41072+
struct syscall_trace_exit {
41073+
struct trace_entry ent;
41074+
int nr;
41075+
long int ret;
41076+
};
41077+
4104241078
struct syscall_user_dispatch {};
4104341079

4104441080
struct syscore_ops {
@@ -42717,6 +42753,10 @@ struct trace_array {
4271742753
struct trace_pid_list *filtered_pids;
4271842754
struct trace_pid_list *filtered_no_pids;
4271942755
arch_spinlock_t max_lock;
42756+
int sys_refcount_enter;
42757+
int sys_refcount_exit;
42758+
struct trace_event_file *enter_syscall_files[472];
42759+
struct trace_event_file *exit_syscall_files[472];
4272042760
int stop_count;
4272142761
int clock_id;
4272242762
int nr_topts;

include/loongarch64/vmlinux_6.18.h

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49718,6 +49718,41 @@ struct syscall_info {
4971849718
struct seccomp_data data;
4971949719
};
4972049720

49721+
struct syscall_metadata {
49722+
const char *name;
49723+
int syscall_nr;
49724+
int nb_args;
49725+
const char **types;
49726+
const char **args;
49727+
struct list_head enter_fields;
49728+
struct trace_event_call *enter_event;
49729+
struct trace_event_call *exit_event;
49730+
};
49731+
49732+
struct syscall_tp_t {
49733+
struct trace_entry ent;
49734+
int syscall_nr;
49735+
long unsigned int ret;
49736+
};
49737+
49738+
struct syscall_tp_t___2 {
49739+
struct trace_entry ent;
49740+
int syscall_nr;
49741+
long unsigned int args[6];
49742+
};
49743+
49744+
struct syscall_trace_enter {
49745+
struct trace_entry ent;
49746+
int nr;
49747+
long unsigned int args[0];
49748+
};
49749+
49750+
struct syscall_trace_exit {
49751+
struct trace_entry ent;
49752+
int nr;
49753+
long int ret;
49754+
};
49755+
4972149756
struct syscall_user_dispatch {
4972249757
char *selector;
4972349758
long unsigned int offset;
@@ -51309,6 +51344,10 @@ struct trace_array {
5130951344
struct trace_pid_list *filtered_pids;
5131051345
struct trace_pid_list *filtered_no_pids;
5131151346
arch_spinlock_t max_lock;
51347+
int sys_refcount_enter;
51348+
int sys_refcount_exit;
51349+
struct trace_event_file *enter_syscall_files[470];
51350+
struct trace_event_file *exit_syscall_files[470];
5131251351
int stop_count;
5131351352
int clock_id;
5131451353
int nr_topts;

include/powerpc/vmlinux_6.18.h

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40631,6 +40631,42 @@ struct sys_off_handler {
4063140631
struct device *dev;
4063240632
};
4063340633

40634+
struct syscall_metadata {
40635+
const char *name;
40636+
int syscall_nr;
40637+
int nb_args;
40638+
const char **types;
40639+
const char **args;
40640+
struct list_head enter_fields;
40641+
struct trace_event_call *enter_event;
40642+
struct trace_event_call *exit_event;
40643+
};
40644+
40645+
struct syscall_tp_t {
40646+
struct trace_entry ent;
40647+
int syscall_nr;
40648+
long unsigned int ret;
40649+
};
40650+
40651+
struct syscall_tp_t___2 {
40652+
struct trace_entry ent;
40653+
int syscall_nr;
40654+
long unsigned int args[6];
40655+
long: 32;
40656+
};
40657+
40658+
struct syscall_trace_enter {
40659+
struct trace_entry ent;
40660+
int nr;
40661+
long unsigned int args[0];
40662+
};
40663+
40664+
struct syscall_trace_exit {
40665+
struct trace_entry ent;
40666+
int nr;
40667+
long int ret;
40668+
};
40669+
4063440670
struct syscall_user_dispatch {};
4063540671

4063640672
struct syscore_ops {
@@ -42172,6 +42208,10 @@ struct trace_array {
4217242208
struct trace_pid_list *filtered_pids;
4217342209
struct trace_pid_list *filtered_no_pids;
4217442210
arch_spinlock_t max_lock;
42211+
int sys_refcount_enter;
42212+
int sys_refcount_exit;
42213+
struct trace_event_file *enter_syscall_files[470];
42214+
struct trace_event_file *exit_syscall_files[470];
4217542215
int stop_count;
4217642216
int clock_id;
4217742217
int nr_topts;

include/riscv64/vmlinux_6.18.h

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39662,6 +39662,41 @@ struct sys_off_handler {
3966239662
struct device *dev;
3966339663
};
3966439664

39665+
struct syscall_metadata {
39666+
const char *name;
39667+
int syscall_nr;
39668+
int nb_args;
39669+
const char **types;
39670+
const char **args;
39671+
struct list_head enter_fields;
39672+
struct trace_event_call *enter_event;
39673+
struct trace_event_call *exit_event;
39674+
};
39675+
39676+
struct syscall_tp_t {
39677+
struct trace_entry ent;
39678+
int syscall_nr;
39679+
long unsigned int ret;
39680+
};
39681+
39682+
struct syscall_tp_t___2 {
39683+
struct trace_entry ent;
39684+
int syscall_nr;
39685+
long unsigned int args[6];
39686+
};
39687+
39688+
struct syscall_trace_enter {
39689+
struct trace_entry ent;
39690+
int nr;
39691+
long unsigned int args[0];
39692+
};
39693+
39694+
struct syscall_trace_exit {
39695+
struct trace_entry ent;
39696+
int nr;
39697+
long int ret;
39698+
};
39699+
3966539700
struct syscall_user_dispatch {
3966639701
char *selector;
3966739702
long unsigned int offset;
@@ -41215,6 +41250,10 @@ struct trace_array {
4121541250
struct trace_pid_list *filtered_pids;
4121641251
struct trace_pid_list *filtered_no_pids;
4121741252
arch_spinlock_t max_lock;
41253+
int sys_refcount_enter;
41254+
int sys_refcount_exit;
41255+
struct trace_event_file *enter_syscall_files[470];
41256+
struct trace_event_file *exit_syscall_files[470];
4121841257
int stop_count;
4121941258
int clock_id;
4122041259
int nr_topts;

include/s390x/vmlinux_6.18.h

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48611,6 +48611,41 @@ struct syscall_info {
4861148611
struct seccomp_data data;
4861248612
};
4861348613

48614+
struct syscall_metadata {
48615+
const char *name;
48616+
int syscall_nr;
48617+
int nb_args;
48618+
const char **types;
48619+
const char **args;
48620+
struct list_head enter_fields;
48621+
struct trace_event_call *enter_event;
48622+
struct trace_event_call *exit_event;
48623+
};
48624+
48625+
struct syscall_tp_t {
48626+
struct trace_entry ent;
48627+
int syscall_nr;
48628+
long unsigned int ret;
48629+
};
48630+
48631+
struct syscall_tp_t___2 {
48632+
struct trace_entry ent;
48633+
int syscall_nr;
48634+
long unsigned int args[6];
48635+
};
48636+
48637+
struct syscall_trace_enter {
48638+
struct trace_entry ent;
48639+
int nr;
48640+
long unsigned int args[0];
48641+
};
48642+
48643+
struct syscall_trace_exit {
48644+
struct trace_entry ent;
48645+
int nr;
48646+
long int ret;
48647+
};
48648+
4861448649
struct syscall_user_dispatch {
4861548650
char *selector;
4861648651
long unsigned int offset;
@@ -50436,6 +50471,10 @@ struct trace_array {
5043650471
struct trace_pid_list *filtered_pids;
5043750472
struct trace_pid_list *filtered_no_pids;
5043850473
arch_spinlock_t max_lock;
50474+
int sys_refcount_enter;
50475+
int sys_refcount_exit;
50476+
struct trace_event_file *enter_syscall_files[470];
50477+
struct trace_event_file *exit_syscall_files[470];
5043950478
int stop_count;
5044050479
int clock_id;
5044150480
int nr_topts;

include/x86/vmlinux_6.18.h

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45929,6 +45929,41 @@ struct syscall_info {
4592945929
struct seccomp_data data;
4593045930
};
4593145931

45932+
struct syscall_metadata {
45933+
const char *name;
45934+
int syscall_nr;
45935+
int nb_args;
45936+
const char **types;
45937+
const char **args;
45938+
struct list_head enter_fields;
45939+
struct trace_event_call *enter_event;
45940+
struct trace_event_call *exit_event;
45941+
};
45942+
45943+
struct syscall_tp_t {
45944+
struct trace_entry ent;
45945+
int syscall_nr;
45946+
long unsigned int ret;
45947+
};
45948+
45949+
struct syscall_tp_t___2 {
45950+
struct trace_entry ent;
45951+
int syscall_nr;
45952+
long unsigned int args[6];
45953+
};
45954+
45955+
struct syscall_trace_enter {
45956+
struct trace_entry ent;
45957+
int nr;
45958+
long unsigned int args[0];
45959+
};
45960+
45961+
struct syscall_trace_exit {
45962+
struct trace_entry ent;
45963+
int nr;
45964+
long int ret;
45965+
};
45966+
4593245967
struct syscall_user_dispatch {
4593345968
char *selector;
4593445969
long unsigned int offset;
@@ -47503,6 +47538,10 @@ struct trace_array {
4750347538
struct trace_pid_list *filtered_pids;
4750447539
struct trace_pid_list *filtered_no_pids;
4750547540
arch_spinlock_t max_lock;
47541+
int sys_refcount_enter;
47542+
int sys_refcount_exit;
47543+
struct trace_event_file *enter_syscall_files[470];
47544+
struct trace_event_file *exit_syscall_files[470];
4750647545
int stop_count;
4750747546
int clock_id;
4750847547
int nr_topts;

kconfigs/config.common

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ CONFIG_DEBUG_INFO_BTF=y
77
CONFIG_DEBUG_INFO_DWARF4=y
88
CONFIG_FPROBE=y
99
CONFIG_FTRACE=y
10+
CONFIG_FTRACE_SYSCALLS=y
1011
CONFIG_FUNCTION_TRACER=y
1112
CONFIG_INET=y
1213
CONFIG_KPROBES=y

0 commit comments

Comments
 (0)