aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/syscalls.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/syscalls.h')
-rw-r--r--include/linux/syscalls.h18
1 files changed, 9 insertions, 9 deletions
diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h
index 45508fec366d..98664db1be47 100644
--- a/include/linux/syscalls.h
+++ b/include/linux/syscalls.h
@@ -125,8 +125,7 @@ extern struct trace_event_functions enter_syscall_print_funcs;
125extern struct trace_event_functions exit_syscall_print_funcs; 125extern struct trace_event_functions exit_syscall_print_funcs;
126 126
127#define SYSCALL_TRACE_ENTER_EVENT(sname) \ 127#define SYSCALL_TRACE_ENTER_EVENT(sname) \
128 static struct syscall_metadata \ 128 static struct syscall_metadata __syscall_meta_##sname; \
129 __attribute__((__aligned__(4))) __syscall_meta_##sname; \
130 static struct ftrace_event_call __used \ 129 static struct ftrace_event_call __used \
131 event_enter_##sname = { \ 130 event_enter_##sname = { \
132 .name = "sys_enter"#sname, \ 131 .name = "sys_enter"#sname, \
@@ -140,8 +139,7 @@ extern struct trace_event_functions exit_syscall_print_funcs;
140 __TRACE_EVENT_FLAGS(enter_##sname, TRACE_EVENT_FL_CAP_ANY) 139 __TRACE_EVENT_FLAGS(enter_##sname, TRACE_EVENT_FL_CAP_ANY)
141 140
142#define SYSCALL_TRACE_EXIT_EVENT(sname) \ 141#define SYSCALL_TRACE_EXIT_EVENT(sname) \
143 static struct syscall_metadata \ 142 static struct syscall_metadata __syscall_meta_##sname; \
144 __attribute__((__aligned__(4))) __syscall_meta_##sname; \
145 static struct ftrace_event_call __used \ 143 static struct ftrace_event_call __used \
146 event_exit_##sname = { \ 144 event_exit_##sname = { \
147 .name = "sys_exit"#sname, \ 145 .name = "sys_exit"#sname, \
@@ -158,8 +156,6 @@ extern struct trace_event_functions exit_syscall_print_funcs;
158 SYSCALL_TRACE_ENTER_EVENT(sname); \ 156 SYSCALL_TRACE_ENTER_EVENT(sname); \
159 SYSCALL_TRACE_EXIT_EVENT(sname); \ 157 SYSCALL_TRACE_EXIT_EVENT(sname); \
160 static struct syscall_metadata __used \ 158 static struct syscall_metadata __used \
161 __attribute__((__aligned__(4))) \
162 __attribute__((section("__syscalls_metadata"))) \
163 __syscall_meta_##sname = { \ 159 __syscall_meta_##sname = { \
164 .name = "sys"#sname, \ 160 .name = "sys"#sname, \
165 .nb_args = nb, \ 161 .nb_args = nb, \
@@ -168,14 +164,15 @@ extern struct trace_event_functions exit_syscall_print_funcs;
168 .enter_event = &event_enter_##sname, \ 164 .enter_event = &event_enter_##sname, \
169 .exit_event = &event_exit_##sname, \ 165 .exit_event = &event_exit_##sname, \
170 .enter_fields = LIST_HEAD_INIT(__syscall_meta_##sname.enter_fields), \ 166 .enter_fields = LIST_HEAD_INIT(__syscall_meta_##sname.enter_fields), \
171 }; 167 }; \
168 static struct syscall_metadata __used \
169 __attribute__((section("__syscalls_metadata"))) \
170 *__p_syscall_meta_##sname = &__syscall_meta_##sname;
172 171
173#define SYSCALL_DEFINE0(sname) \ 172#define SYSCALL_DEFINE0(sname) \
174 SYSCALL_TRACE_ENTER_EVENT(_##sname); \ 173 SYSCALL_TRACE_ENTER_EVENT(_##sname); \
175 SYSCALL_TRACE_EXIT_EVENT(_##sname); \ 174 SYSCALL_TRACE_EXIT_EVENT(_##sname); \
176 static struct syscall_metadata __used \ 175 static struct syscall_metadata __used \
177 __attribute__((__aligned__(4))) \
178 __attribute__((section("__syscalls_metadata"))) \
179 __syscall_meta__##sname = { \ 176 __syscall_meta__##sname = { \
180 .name = "sys_"#sname, \ 177 .name = "sys_"#sname, \
181 .nb_args = 0, \ 178 .nb_args = 0, \
@@ -183,6 +180,9 @@ extern struct trace_event_functions exit_syscall_print_funcs;
183 .exit_event = &event_exit__##sname, \ 180 .exit_event = &event_exit__##sname, \
184 .enter_fields = LIST_HEAD_INIT(__syscall_meta__##sname.enter_fields), \ 181 .enter_fields = LIST_HEAD_INIT(__syscall_meta__##sname.enter_fields), \
185 }; \ 182 }; \
183 static struct syscall_metadata __used \
184 __attribute__((section("__syscalls_metadata"))) \
185 *__p_syscall_meta_##sname = &__syscall_meta__##sname; \
186 asmlinkage long sys_##sname(void) 186 asmlinkage long sys_##sname(void)
187#else 187#else
188#define SYSCALL_DEFINE0(name) asmlinkage long sys_##name(void) 188#define SYSCALL_DEFINE0(name) asmlinkage long sys_##name(void)