diff options
author | Tycho Andersen <tycho@tycho.ws> | 2018-02-21 05:47:45 +0300 |
---|---|---|
committer | Kees Cook <keescook@chromium.org> | 2018-02-22 03:56:03 +0300 |
commit | 2a040f9f39d3b020c79e08dec26d12a7ce131c10 (patch) | |
tree | dac958d07074d0d3dcd5f31a415f576251c5f90e /include/uapi/linux/ptrace.h | |
parent | 26500475ac1b499d8636ff281311d633909f5d20 (diff) | |
download | linux-2a040f9f39d3b020c79e08dec26d12a7ce131c10.tar.xz |
seccomp, ptrace: switch get_metadata types to arch independent
Commit 26500475ac1b ("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>
Diffstat (limited to 'include/uapi/linux/ptrace.h')
-rw-r--r-- | include/uapi/linux/ptrace.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/uapi/linux/ptrace.h b/include/uapi/linux/ptrace.h index e46d82b91166..d5a1b8a492b9 100644 --- a/include/uapi/linux/ptrace.h +++ b/include/uapi/linux/ptrace.h @@ -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 */ |