return ret;
}
-static
-int lttng_abi_syscall_list(void)
-{
- struct file *syscall_list_file;
- int file_fd, ret;
-
- file_fd = get_unused_fd();
- if (file_fd < 0) {
- ret = file_fd;
- goto fd_error;
- }
-
- syscall_list_file = anon_inode_getfile("[lttng_syscall_list]",
- <tng_syscall_list_fops,
- NULL, O_RDWR);
- if (IS_ERR(syscall_list_file)) {
- ret = PTR_ERR(syscall_list_file);
- goto file_error;
- }
- ret = lttng_syscall_list_fops.open(NULL, syscall_list_file);
- if (ret < 0)
- goto open_error;
- fd_install(file_fd, syscall_list_file);
- if (file_fd < 0) {
- ret = file_fd;
- goto fd_error;
- }
- return file_fd;
-
-open_error:
- fput(syscall_list_file);
-file_error:
- put_unused_fd(file_fd);
-fd_error:
- return ret;
-}
-
static
void lttng_abi_tracer_version(struct lttng_kernel_tracer_version *v)
{
const char *name);
long lttng_channel_syscall_mask(struct lttng_channel *channel,
struct lttng_kernel_syscall_mask __user *usyscall_mask);
+int lttng_abi_syscall_list(void);
#else
static inline int lttng_syscalls_register(struct lttng_channel *chan, void *filter)
{
return 0;
}
-static
+static inline
int lttng_syscall_filter_enable(struct lttng_channel *chan,
const char *name)
{
return -ENOSYS;
}
-static
+static inline
int lttng_syscall_filter_disable(struct lttng_channel *chan,
const char *name)
{
return -ENOSYS;
}
-static
+static inline
long lttng_channel_syscall_mask(struct lttng_channel *channel,
struct lttng_kernel_syscall_mask __user *usyscall_mask)
{
return -ENOSYS;
}
+
+static inline
+int lttng_abi_syscall_list(void)
+{
+ return -ENOSYS;
+}
#endif
struct lttng_ctx_field *lttng_append_context(struct lttng_ctx **ctx);
#include <linux/in6.h>
#include <linux/seq_file.h>
#include <linux/stringify.h>
+#include <linux/file.h>
+#include <linux/anon_inodes.h>
#include <asm/ptrace.h>
#include <asm/syscall.h>
kfree(tmp_mask);
return ret;
}
+
+int lttng_abi_syscall_list(void)
+{
+ struct file *syscall_list_file;
+ int file_fd, ret;
+
+ file_fd = get_unused_fd();
+ if (file_fd < 0) {
+ ret = file_fd;
+ goto fd_error;
+ }
+
+ syscall_list_file = anon_inode_getfile("[lttng_syscall_list]",
+ <tng_syscall_list_fops,
+ NULL, O_RDWR);
+ if (IS_ERR(syscall_list_file)) {
+ ret = PTR_ERR(syscall_list_file);
+ goto file_error;
+ }
+ ret = lttng_syscall_list_fops.open(NULL, syscall_list_file);
+ if (ret < 0)
+ goto open_error;
+ fd_install(file_fd, syscall_list_file);
+ if (file_fd < 0) {
+ ret = file_fd;
+ goto fd_error;
+ }
+ return file_fd;
+
+open_error:
+ fput(syscall_list_file);
+file_error:
+ put_unused_fd(file_fd);
+fd_error:
+ return ret;
+}