diff options
Diffstat (limited to 'include/linux/syscalls.h')
-rw-r--r-- | include/linux/syscalls.h | 51 |
1 files changed, 31 insertions, 20 deletions
diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h index 207466a49f3d..f994ae58a002 100644 --- a/include/linux/syscalls.h +++ b/include/linux/syscalls.h | |||
@@ -23,6 +23,7 @@ struct kexec_segment; | |||
23 | struct linux_dirent; | 23 | struct linux_dirent; |
24 | struct linux_dirent64; | 24 | struct linux_dirent64; |
25 | struct list_head; | 25 | struct list_head; |
26 | struct mmap_arg_struct; | ||
26 | struct msgbuf; | 27 | struct msgbuf; |
27 | struct msghdr; | 28 | struct msghdr; |
28 | struct mmsghdr; | 29 | struct mmsghdr; |
@@ -30,10 +31,13 @@ struct msqid_ds; | |||
30 | struct new_utsname; | 31 | struct new_utsname; |
31 | struct nfsctl_arg; | 32 | struct nfsctl_arg; |
32 | struct __old_kernel_stat; | 33 | struct __old_kernel_stat; |
34 | struct oldold_utsname; | ||
35 | struct old_utsname; | ||
33 | struct pollfd; | 36 | struct pollfd; |
34 | struct rlimit; | 37 | struct rlimit; |
35 | struct rusage; | 38 | struct rusage; |
36 | struct sched_param; | 39 | struct sched_param; |
40 | struct sel_arg_struct; | ||
37 | struct semaphore; | 41 | struct semaphore; |
38 | struct sembuf; | 42 | struct sembuf; |
39 | struct shmid_ds; | 43 | struct shmid_ds; |
@@ -99,21 +103,21 @@ struct perf_event_attr; | |||
99 | #define __SC_TEST5(t5, a5, ...) __SC_TEST(t5); __SC_TEST4(__VA_ARGS__) | 103 | #define __SC_TEST5(t5, a5, ...) __SC_TEST(t5); __SC_TEST4(__VA_ARGS__) |
100 | #define __SC_TEST6(t6, a6, ...) __SC_TEST(t6); __SC_TEST5(__VA_ARGS__) | 104 | #define __SC_TEST6(t6, a6, ...) __SC_TEST(t6); __SC_TEST5(__VA_ARGS__) |
101 | 105 | ||
102 | #ifdef CONFIG_EVENT_PROFILE | 106 | #ifdef CONFIG_PERF_EVENTS |
103 | 107 | ||
104 | #define TRACE_SYS_ENTER_PROFILE_INIT(sname) \ | 108 | #define TRACE_SYS_ENTER_PERF_INIT(sname) \ |
105 | .profile_enable = prof_sysenter_enable, \ | 109 | .perf_event_enable = perf_sysenter_enable, \ |
106 | .profile_disable = prof_sysenter_disable, | 110 | .perf_event_disable = perf_sysenter_disable, |
107 | 111 | ||
108 | #define TRACE_SYS_EXIT_PROFILE_INIT(sname) \ | 112 | #define TRACE_SYS_EXIT_PERF_INIT(sname) \ |
109 | .profile_enable = prof_sysexit_enable, \ | 113 | .perf_event_enable = perf_sysexit_enable, \ |
110 | .profile_disable = prof_sysexit_disable, | 114 | .perf_event_disable = perf_sysexit_disable, |
111 | #else | 115 | #else |
112 | #define TRACE_SYS_ENTER_PROFILE(sname) | 116 | #define TRACE_SYS_ENTER_PERF(sname) |
113 | #define TRACE_SYS_ENTER_PROFILE_INIT(sname) | 117 | #define TRACE_SYS_ENTER_PERF_INIT(sname) |
114 | #define TRACE_SYS_EXIT_PROFILE(sname) | 118 | #define TRACE_SYS_EXIT_PERF(sname) |
115 | #define TRACE_SYS_EXIT_PROFILE_INIT(sname) | 119 | #define TRACE_SYS_EXIT_PERF_INIT(sname) |
116 | #endif | 120 | #endif /* CONFIG_PERF_EVENTS */ |
117 | 121 | ||
118 | #ifdef CONFIG_FTRACE_SYSCALLS | 122 | #ifdef CONFIG_FTRACE_SYSCALLS |
119 | #define __SC_STR_ADECL1(t, a) #a | 123 | #define __SC_STR_ADECL1(t, a) #a |
@@ -132,7 +136,8 @@ struct perf_event_attr; | |||
132 | 136 | ||
133 | #define SYSCALL_TRACE_ENTER_EVENT(sname) \ | 137 | #define SYSCALL_TRACE_ENTER_EVENT(sname) \ |
134 | static const struct syscall_metadata __syscall_meta_##sname; \ | 138 | static const struct syscall_metadata __syscall_meta_##sname; \ |
135 | static struct ftrace_event_call event_enter_##sname; \ | 139 | static struct ftrace_event_call \ |
140 | __attribute__((__aligned__(4))) event_enter_##sname; \ | ||
136 | static struct trace_event enter_syscall_print_##sname = { \ | 141 | static struct trace_event enter_syscall_print_##sname = { \ |
137 | .trace = print_syscall_enter, \ | 142 | .trace = print_syscall_enter, \ |
138 | }; \ | 143 | }; \ |
@@ -143,18 +148,18 @@ struct perf_event_attr; | |||
143 | .name = "sys_enter"#sname, \ | 148 | .name = "sys_enter"#sname, \ |
144 | .system = "syscalls", \ | 149 | .system = "syscalls", \ |
145 | .event = &enter_syscall_print_##sname, \ | 150 | .event = &enter_syscall_print_##sname, \ |
146 | .raw_init = trace_event_raw_init, \ | 151 | .raw_init = init_syscall_trace, \ |
147 | .show_format = syscall_enter_format, \ | ||
148 | .define_fields = syscall_enter_define_fields, \ | 152 | .define_fields = syscall_enter_define_fields, \ |
149 | .regfunc = reg_event_syscall_enter, \ | 153 | .regfunc = reg_event_syscall_enter, \ |
150 | .unregfunc = unreg_event_syscall_enter, \ | 154 | .unregfunc = unreg_event_syscall_enter, \ |
151 | .data = (void *)&__syscall_meta_##sname,\ | 155 | .data = (void *)&__syscall_meta_##sname,\ |
152 | TRACE_SYS_ENTER_PROFILE_INIT(sname) \ | 156 | TRACE_SYS_ENTER_PERF_INIT(sname) \ |
153 | } | 157 | } |
154 | 158 | ||
155 | #define SYSCALL_TRACE_EXIT_EVENT(sname) \ | 159 | #define SYSCALL_TRACE_EXIT_EVENT(sname) \ |
156 | static const struct syscall_metadata __syscall_meta_##sname; \ | 160 | static const struct syscall_metadata __syscall_meta_##sname; \ |
157 | static struct ftrace_event_call event_exit_##sname; \ | 161 | static struct ftrace_event_call \ |
162 | __attribute__((__aligned__(4))) event_exit_##sname; \ | ||
158 | static struct trace_event exit_syscall_print_##sname = { \ | 163 | static struct trace_event exit_syscall_print_##sname = { \ |
159 | .trace = print_syscall_exit, \ | 164 | .trace = print_syscall_exit, \ |
160 | }; \ | 165 | }; \ |
@@ -165,13 +170,12 @@ struct perf_event_attr; | |||
165 | .name = "sys_exit"#sname, \ | 170 | .name = "sys_exit"#sname, \ |
166 | .system = "syscalls", \ | 171 | .system = "syscalls", \ |
167 | .event = &exit_syscall_print_##sname, \ | 172 | .event = &exit_syscall_print_##sname, \ |
168 | .raw_init = trace_event_raw_init, \ | 173 | .raw_init = init_syscall_trace, \ |
169 | .show_format = syscall_exit_format, \ | ||
170 | .define_fields = syscall_exit_define_fields, \ | 174 | .define_fields = syscall_exit_define_fields, \ |
171 | .regfunc = reg_event_syscall_exit, \ | 175 | .regfunc = reg_event_syscall_exit, \ |
172 | .unregfunc = unreg_event_syscall_exit, \ | 176 | .unregfunc = unreg_event_syscall_exit, \ |
173 | .data = (void *)&__syscall_meta_##sname,\ | 177 | .data = (void *)&__syscall_meta_##sname,\ |
174 | TRACE_SYS_EXIT_PROFILE_INIT(sname) \ | 178 | TRACE_SYS_EXIT_PERF_INIT(sname) \ |
175 | } | 179 | } |
176 | 180 | ||
177 | #define SYSCALL_METADATA(sname, nb) \ | 181 | #define SYSCALL_METADATA(sname, nb) \ |
@@ -638,6 +642,7 @@ asmlinkage long sys_poll(struct pollfd __user *ufds, unsigned int nfds, | |||
638 | long timeout); | 642 | long timeout); |
639 | asmlinkage long sys_select(int n, fd_set __user *inp, fd_set __user *outp, | 643 | asmlinkage long sys_select(int n, fd_set __user *inp, fd_set __user *outp, |
640 | fd_set __user *exp, struct timeval __user *tvp); | 644 | fd_set __user *exp, struct timeval __user *tvp); |
645 | asmlinkage long sys_old_select(struct sel_arg_struct __user *arg); | ||
641 | asmlinkage long sys_epoll_create(int size); | 646 | asmlinkage long sys_epoll_create(int size); |
642 | asmlinkage long sys_epoll_create1(int flags); | 647 | asmlinkage long sys_epoll_create1(int flags); |
643 | asmlinkage long sys_epoll_ctl(int epfd, int op, int fd, | 648 | asmlinkage long sys_epoll_ctl(int epfd, int op, int fd, |
@@ -652,6 +657,8 @@ asmlinkage long sys_gethostname(char __user *name, int len); | |||
652 | asmlinkage long sys_sethostname(char __user *name, int len); | 657 | asmlinkage long sys_sethostname(char __user *name, int len); |
653 | asmlinkage long sys_setdomainname(char __user *name, int len); | 658 | asmlinkage long sys_setdomainname(char __user *name, int len); |
654 | asmlinkage long sys_newuname(struct new_utsname __user *name); | 659 | asmlinkage long sys_newuname(struct new_utsname __user *name); |
660 | asmlinkage long sys_uname(struct old_utsname __user *); | ||
661 | asmlinkage long sys_olduname(struct oldold_utsname __user *); | ||
655 | 662 | ||
656 | asmlinkage long sys_getrlimit(unsigned int resource, | 663 | asmlinkage long sys_getrlimit(unsigned int resource, |
657 | struct rlimit __user *rlim); | 664 | struct rlimit __user *rlim); |
@@ -681,6 +688,8 @@ asmlinkage long sys_shmat(int shmid, char __user *shmaddr, int shmflg); | |||
681 | asmlinkage long sys_shmget(key_t key, size_t size, int flag); | 688 | asmlinkage long sys_shmget(key_t key, size_t size, int flag); |
682 | asmlinkage long sys_shmdt(char __user *shmaddr); | 689 | asmlinkage long sys_shmdt(char __user *shmaddr); |
683 | asmlinkage long sys_shmctl(int shmid, int cmd, struct shmid_ds __user *buf); | 690 | asmlinkage long sys_shmctl(int shmid, int cmd, struct shmid_ds __user *buf); |
691 | asmlinkage long sys_ipc(unsigned int call, int first, int second, | ||
692 | unsigned long third, void __user *ptr, long fifth); | ||
684 | 693 | ||
685 | asmlinkage long sys_mq_open(const char __user *name, int oflag, mode_t mode, struct mq_attr __user *attr); | 694 | asmlinkage long sys_mq_open(const char __user *name, int oflag, mode_t mode, struct mq_attr __user *attr); |
686 | asmlinkage long sys_mq_unlink(const char __user *name); | 695 | asmlinkage long sys_mq_unlink(const char __user *name); |
@@ -836,4 +845,6 @@ asmlinkage long sys_perf_event_open( | |||
836 | asmlinkage long sys_mmap_pgoff(unsigned long addr, unsigned long len, | 845 | asmlinkage long sys_mmap_pgoff(unsigned long addr, unsigned long len, |
837 | unsigned long prot, unsigned long flags, | 846 | unsigned long prot, unsigned long flags, |
838 | unsigned long fd, unsigned long pgoff); | 847 | unsigned long fd, unsigned long pgoff); |
848 | asmlinkage long sys_old_mmap(struct mmap_arg_struct __user *arg); | ||
849 | |||
839 | #endif | 850 | #endif |