Re: [PATCH v9 09/11] seccomp: introduce writer locking

From
Oleg Nesterov <oleg@redhat.com>
Date
2014-07-09 18:44:13
Also in
linux-arch, linux-arm-kernel, linux-mips, lkml
Reply to
Kees Cook, 2014-06-27
On 06/27, Kees Cook wrote:
quoted hunk ↗ jump to hunk

 static u32 seccomp_run_filters(int syscall)
 {
-	struct seccomp_filter *f;
+	struct seccomp_filter *f = ACCESS_ONCE(current->seccomp.filter);
I am not sure...

This is fine if this ->filter is the 1st (and only) one, in this case
we can rely on rmb() in the caller.

But the new filter can be installed at any moment. Say, right after that
rmb() although this doesn't matter. Either we need smp_read_barrier_depends()
after that, or smp_load_acquire() like the previous version did?

Oleg.
Thread (23 messages) 23 messages, 2 authors, last reply 2014-07-10
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help