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.h16
1 files changed, 11 insertions, 5 deletions
diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h
index 8d57f77794ee..f124c8995555 100644
--- a/include/linux/syscalls.h
+++ b/include/linux/syscalls.h
@@ -190,6 +190,7 @@ static void prof_sysexit_disable_##sname(struct ftrace_event_call *event_call) \
190 .event = &event_syscall_enter, \ 190 .event = &event_syscall_enter, \
191 .raw_init = init_enter_##sname, \ 191 .raw_init = init_enter_##sname, \
192 .show_format = syscall_enter_format, \ 192 .show_format = syscall_enter_format, \
193 .define_fields = syscall_enter_define_fields, \
193 .regfunc = reg_event_syscall_enter, \ 194 .regfunc = reg_event_syscall_enter, \
194 .unregfunc = unreg_event_syscall_enter, \ 195 .unregfunc = unreg_event_syscall_enter, \
195 .data = "sys"#sname, \ 196 .data = "sys"#sname, \
@@ -226,6 +227,7 @@ static void prof_sysexit_disable_##sname(struct ftrace_event_call *event_call) \
226 .event = &event_syscall_exit, \ 227 .event = &event_syscall_exit, \
227 .raw_init = init_exit_##sname, \ 228 .raw_init = init_exit_##sname, \
228 .show_format = syscall_exit_format, \ 229 .show_format = syscall_exit_format, \
230 .define_fields = syscall_exit_define_fields, \
229 .regfunc = reg_event_syscall_exit, \ 231 .regfunc = reg_event_syscall_exit, \
230 .unregfunc = unreg_event_syscall_exit, \ 232 .unregfunc = unreg_event_syscall_exit, \
231 .data = "sys"#sname, \ 233 .data = "sys"#sname, \
@@ -233,6 +235,8 @@ static void prof_sysexit_disable_##sname(struct ftrace_event_call *event_call) \
233 } 235 }
234 236
235#define SYSCALL_METADATA(sname, nb) \ 237#define SYSCALL_METADATA(sname, nb) \
238 SYSCALL_TRACE_ENTER_EVENT(sname); \
239 SYSCALL_TRACE_EXIT_EVENT(sname); \
236 static const struct syscall_metadata __used \ 240 static const struct syscall_metadata __used \
237 __attribute__((__aligned__(4))) \ 241 __attribute__((__aligned__(4))) \
238 __attribute__((section("__syscalls_metadata"))) \ 242 __attribute__((section("__syscalls_metadata"))) \
@@ -241,20 +245,22 @@ static void prof_sysexit_disable_##sname(struct ftrace_event_call *event_call) \
241 .nb_args = nb, \ 245 .nb_args = nb, \
242 .types = types_##sname, \ 246 .types = types_##sname, \
243 .args = args_##sname, \ 247 .args = args_##sname, \
244 }; \ 248 .enter_event = &event_enter_##sname, \
245 SYSCALL_TRACE_ENTER_EVENT(sname); \ 249 .exit_event = &event_exit_##sname, \
246 SYSCALL_TRACE_EXIT_EVENT(sname); 250 };
247 251
248#define SYSCALL_DEFINE0(sname) \ 252#define SYSCALL_DEFINE0(sname) \
253 SYSCALL_TRACE_ENTER_EVENT(_##sname); \
254 SYSCALL_TRACE_EXIT_EVENT(_##sname); \
249 static const struct syscall_metadata __used \ 255 static const struct syscall_metadata __used \
250 __attribute__((__aligned__(4))) \ 256 __attribute__((__aligned__(4))) \
251 __attribute__((section("__syscalls_metadata"))) \ 257 __attribute__((section("__syscalls_metadata"))) \
252 __syscall_meta_##sname = { \ 258 __syscall_meta_##sname = { \
253 .name = "sys_"#sname, \ 259 .name = "sys_"#sname, \
254 .nb_args = 0, \ 260 .nb_args = 0, \
261 .enter_event = &event_enter__##sname, \
262 .exit_event = &event_exit__##sname, \
255 }; \ 263 }; \
256 SYSCALL_TRACE_ENTER_EVENT(_##sname); \
257 SYSCALL_TRACE_EXIT_EVENT(_##sname); \
258 asmlinkage long sys_##sname(void) 264 asmlinkage long sys_##sname(void)
259#else 265#else
260#define SYSCALL_DEFINE0(name) asmlinkage long sys_##name(void) 266#define SYSCALL_DEFINE0(name) asmlinkage long sys_##name(void)