summaryrefslogtreecommitdiffstats
path: root/virt
diff options
context:
space:
mode:
authorKees Cook <keescook@chromium.org>2014-06-27 15:16:33 -0700
committerKees Cook <keescook@chromium.org>2014-07-18 12:13:39 -0700
commitc8bee430dc52cfca6c1aab27752a89275d78d50f (patch)
tree10e229d375150f64808709f5fe9c88b84236e327 /virt
parent1d4457f99928a968767f6405b4a1f50845aa15fd (diff)
downloadop-kernel-dev-c8bee430dc52cfca6c1aab27752a89275d78d50f.zip
op-kernel-dev-c8bee430dc52cfca6c1aab27752a89275d78d50f.tar.gz
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 'virt')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud