]> git.baikalelectronics.ru Git - kernel.git/commit
x86/ptrace: run seccomp after ptrace
authorKees Cook <keescook@chromium.org>
Thu, 9 Jun 2016 19:36:50 +0000 (12:36 -0700)
committerKees Cook <keescook@chromium.org>
Tue, 14 Jun 2016 17:54:41 +0000 (10:54 -0700)
commit81d3361742e821c056aeec58097ec9a2c5374965
tree862d7e65445f7c7a53025fbfc097eb9e4f363715
parentbbb2fec77d54abba30dd9d3b8522f5d59a497a92
x86/ptrace: run seccomp after ptrace

This moves seccomp after ptrace on x86 to that seccomp can catch changes
made by ptrace. Emulation should skip the rest of processing too.

We can get rid of test_thread_flag because there's no longer any
opportunity for seccomp to mess with ptrace state before invoking
ptrace.

Suggested-by: Andy Lutomirski <luto@kernel.org>
Signed-off-by: Kees Cook <keescook@chromium.org>
Cc: x86@kernel.org
Cc: Andy Lutomirski <luto@kernel.org>
arch/x86/entry/common.c