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)
commitc2ba8f41ad366dc12840dd87d8f1565185845126
tree7e6407dae5d248995ecbc56b808f49d8b687fd70
parentdff3a85feceade213daf153556fd32a3b0a73c63
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