]> git.baikalelectronics.ru Git - kernel.git/commit
ARM: 8087/1: ptrace: reload syscall number after secure_computing() check
authorWill Deacon <will.deacon@arm.com>
Fri, 27 Jun 2014 16:01:47 +0000 (17:01 +0100)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Sun, 29 Jun 2014 09:29:35 +0000 (10:29 +0100)
commit23c301c51ce1073dc11e8f9569e7d27004d4335d
treefb60021f23adfdff7d525d88e8b6c50f14f138f0
parentee6c5a4d5d900f7b706e33aeb9a68b56ec220d73
ARM: 8087/1: ptrace: reload syscall number after secure_computing() check

On the syscall tracing path, we call out to secure_computing() to allow
seccomp to check the syscall number being attempted. As part of this, a
SIGTRAP may be sent to the tracer and the syscall could be re-written by
a subsequent SET_SYSCALL ptrace request. Unfortunately, this new syscall
is ignored by the current code unless TIF_SYSCALL_TRACE is also set on
the current thread.

This patch slightly reworks the enter path of the syscall tracing code
so that we always reload the syscall number from
current_thread_info()->syscall after the potential ptrace traps.

Acked-by: Kees Cook <keescook@chromium.org>
Tested-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
arch/arm/kernel/ptrace.c