Fix: syscall filtering: disable all syscalls
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Tue, 9 Sep 2014 22:56:53 +0000 (18:56 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fri, 26 Sep 2014 16:10:00 +0000 (12:10 -0400)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
lttng-syscalls.c

index 5023c2f9dcc2ff8c588ad159303255dabab92ac6..c23f1d9e7e5b07c7533e14f2fdf404763152ea8c 100644 (file)
@@ -1033,6 +1033,12 @@ int lttng_syscall_filter_disable(struct lttng_channel *chan,
                filter = chan->sc_filter;
        }
 
+       if (!name) {
+               /* Disable all system calls */
+               bitmap_clear(filter->sc, 0, NR_syscalls);
+               bitmap_clear(filter->sc_compat, 0, NR_compat_syscalls);
+               goto apply_filter;
+       }
        syscall_nr = get_syscall_nr(name);
        compat_syscall_nr = get_compat_syscall_nr(name);
        if (syscall_nr < 0 && compat_syscall_nr < 0) {
@@ -1053,6 +1059,7 @@ int lttng_syscall_filter_disable(struct lttng_channel *chan,
                }
                bitmap_clear(chan->sc_filter->sc_compat, compat_syscall_nr, 1);
        }
+apply_filter:
        if (!chan->sc_filter)
                rcu_assign_pointer(chan->sc_filter, filter);
        chan->syscall_all = 0;
This page took 0.027132 seconds and 4 git commands to generate.