syscalls: remove vmalloc sync mappings
[lttng-modules.git] / src / lttng-syscalls.c
index b5bd5bd39e9ee25c59536ef4b5248cfc929b36ab..de4dbacefc5c23e7331081696585e4a278b82a7c 100644 (file)
@@ -751,7 +751,7 @@ int lttng_syscalls_populate_events(struct lttng_event_enabler_common *syscall_ev
 /*
  * Should be called with sessions lock held.
  */
-int lttng_syscalls_register_event(struct lttng_event_enabler_common *syscall_event_enabler)
+int lttng_event_enabler_create_syscall_events_if_missing(struct lttng_event_enabler_common *syscall_event_enabler)
 {
        struct lttng_kernel_syscall_table *syscall_table = get_syscall_table_from_enabler(syscall_event_enabler);
        int ret;
@@ -796,8 +796,6 @@ int lttng_syscalls_register_event(struct lttng_event_enabler_common *syscall_eve
        if (ret)
                return ret;
 
-       wrapper_vmalloc_sync_mappings();
-
        if (!syscall_table->sys_enter_registered) {
                ret = lttng_wrapper_tracepoint_probe_register("sys_enter",
                                (void *) syscall_entry_event_probe, syscall_table);
@@ -1397,6 +1395,29 @@ int lttng_syscall_filter_disable_event(struct lttng_kernel_event_common *event)
        return 0;
 }
 
+void lttng_syscall_table_set_wildcard_all(struct lttng_event_enabler_common *event_enabler)
+{
+       struct lttng_kernel_syscall_table *syscall_table = get_syscall_table_from_enabler(event_enabler);
+       enum lttng_kernel_abi_syscall_entryexit entryexit;
+       int enabled = event_enabler->enabled;
+
+       if (event_enabler->event_param.instrumentation != LTTNG_KERNEL_ABI_SYSCALL)
+               return;
+       if (event_enabler->event_param.u.syscall.abi != LTTNG_KERNEL_ABI_SYSCALL_ABI_ALL)
+               return;
+       if (event_enabler->event_param.u.syscall.match != LTTNG_KERNEL_ABI_SYSCALL_MATCH_NAME)
+               return;
+       if (strcmp(event_enabler->event_param.name, "*"))
+               return;
+
+       entryexit = event_enabler->event_param.u.syscall.entryexit;
+       if (entryexit == LTTNG_KERNEL_ABI_SYSCALL_ENTRY || entryexit == LTTNG_KERNEL_ABI_SYSCALL_ENTRYEXIT)
+               WRITE_ONCE(syscall_table->syscall_all_entry, enabled);
+
+       if (entryexit == LTTNG_KERNEL_ABI_SYSCALL_EXIT || entryexit == LTTNG_KERNEL_ABI_SYSCALL_ENTRYEXIT)
+               WRITE_ONCE(syscall_table->syscall_all_exit, enabled);
+}
+
 static
 const struct trace_syscall_entry *syscall_list_get_entry(loff_t *pos)
 {
This page took 0.024963 seconds and 4 git commands to generate.