]> git.baikalelectronics.ru Git - kernel.git/commit
seccomp, ptrace: switch get_metadata types to arch independent
authorTycho Andersen <tycho@tycho.ws>
Wed, 21 Feb 2018 02:47:45 +0000 (19:47 -0700)
committerKees Cook <keescook@chromium.org>
Thu, 22 Feb 2018 00:56:03 +0000 (16:56 -0800)
commitbf8e9e9e2ec58e97bf0d6eb961c4e7b3f27860b2
treedac958d07074d0d3dcd5f31a415f576251c5f90e
parent18e4fe9926b0eae505afd2a5bb76c82a2e5ea5aa
seccomp, ptrace: switch get_metadata types to arch independent

Commit 18e4fe9926b0 ("ptrace, seccomp: add support for retrieving seccomp
metadata") introduced `struct seccomp_metadata`, which contained unsigned
longs that should be arch independent. The type of the flags member was
chosen to match the corresponding argument to seccomp(), and so we need
something at least as big as unsigned long. My understanding is that __u64
should fit the bill, so let's switch both types to that.

While this is userspace facing, it was only introduced in 4.16-rc2, and so
should be safe assuming it goes in before then.

Reported-by: "Dmitry V. Levin" <ldv@altlinux.org>
Signed-off-by: Tycho Andersen <tycho@tycho.ws>
CC: Kees Cook <keescook@chromium.org>
CC: Oleg Nesterov <oleg@redhat.com>
Reviewed-by: "Dmitry V. Levin" <ldv@altlinux.org>
Signed-off-by: Kees Cook <keescook@chromium.org>
include/uapi/linux/ptrace.h