Skip to content
Commit 2d9ca267 authored by Denis Efremov's avatar Denis Efremov Committed by Kees Cook
Browse files

seccomp: Use current_pt_regs() instead of task_pt_regs(current)



As described in commit a3460a59 ("new helper: current_pt_regs()"):
- arch versions are "optimized versions".
- some architectures have task_pt_regs() working only for traced tasks
  blocked on signal delivery. current_pt_regs() needs to work for *all*
  processes.

In preparation for adding a coccinelle rule for using current_*(), instead
of raw accesses to current members, modify seccomp_do_user_notification(),
__seccomp_filter(), __secure_computing() to use current_pt_regs().

Signed-off-by: default avatarDenis Efremov <efremov@linux.com>
Link: https://lore.kernel.org/r/20200824125921.488311-1-efremov@linux.com


[kees: Reworded commit log, add comment to populate_seccomp_data()]
Signed-off-by: default avatarKees Cook <keescook@chromium.org>
parent 3932fcec
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment