]> git.baikalelectronics.ru Git - kernel.git/commit
perf_event_open: switch to copy_struct_from_user()
authorAleksa Sarai <cyphar@cyphar.com>
Tue, 1 Oct 2019 01:10:55 +0000 (11:10 +1000)
committerChristian Brauner <christian.brauner@ubuntu.com>
Tue, 1 Oct 2019 13:45:22 +0000 (15:45 +0200)
commit8960894b54dfd3d5798cae3ecd0d7d9e64a3f0ad
tree7e6407dae5d248995ecbc56b808f49d8b687fd70
parent3bb3fce2950543a5d0fc3a966319271276d58e8d
perf_event_open: switch to copy_struct_from_user()

Switch perf_event_open() syscall from it's own copying
struct perf_event_attr from userspace to the new dedicated
copy_struct_from_user() helper.

The change is very straightforward, and helps unify the syscall
interface for struct-from-userspace syscalls.

Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>
Reviewed-by: Kees Cook <keescook@chromium.org>
Reviewed-by: Christian Brauner <christian.brauner@ubuntu.com>
[christian.brauner@ubuntu.com: improve commit message]
Link: https://lore.kernel.org/r/20191001011055.19283-5-cyphar@cyphar.com
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
kernel/events/core.c