diff options
author | Kees Cook <keescook@chromium.org> | 2014-06-27 15:16:33 -0700 |
---|---|---|
committer | Kees Cook <keescook@chromium.org> | 2014-07-18 12:13:39 -0700 |
commit | c8bee430dc52cfca6c1aab27752a89275d78d50f (patch) | |
tree | 10e229d375150f64808709f5fe9c88b84236e327 /include | |
parent | 1d4457f99928a968767f6405b4a1f50845aa15fd (diff) | |
download | linux-c8bee430dc52cfca6c1aab27752a89275d78d50f.tar.bz2 |
seccomp: split filter prep from check and apply
In preparation for adding seccomp locking, move filter creation away
from where it is checked and applied. This will allow for locking where
no memory allocation is happening. The validation, filter attachment,
and seccomp mode setting can all happen under the future locks.
For extreme defensiveness, I've added a BUG_ON check for the calculated
size of the buffer allocation in case BPF_MAXINSN ever changes, which
shouldn't ever happen. The compiler should actually optimize out this
check since the test above it makes it impossible.
Signed-off-by: Kees Cook <keescook@chromium.org>
Reviewed-by: Oleg Nesterov <oleg@redhat.com>
Reviewed-by: Andy Lutomirski <luto@amacapital.net>
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions