提交 2a040f9f 编写于 作者: T Tycho Andersen 提交者: Kees Cook

seccomp, ptrace: switch get_metadata types to arch independent

Commit 26500475 ("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: N"Dmitry V. Levin" <ldv@altlinux.org>
Signed-off-by: NTycho Andersen <tycho@tycho.ws>
CC: Kees Cook <keescook@chromium.org>
CC: Oleg Nesterov <oleg@redhat.com>
Reviewed-by: N"Dmitry V. Levin" <ldv@altlinux.org>
Signed-off-by: NKees Cook <keescook@chromium.org>
上级 26500475
......@@ -69,8 +69,8 @@ struct ptrace_peeksiginfo_args {
#define PTRACE_SECCOMP_GET_METADATA 0x420d
struct seccomp_metadata {
unsigned long filter_off; /* Input: which filter */
unsigned int flags; /* Output: filter's flags */
__u64 filter_off; /* Input: which filter */
__u64 flags; /* Output: filter's flags */
};
/* Read signals from a shared (process wide) queue */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册