[CRIU] [PATCH 1/7] seccomp: compel -- Add PTRACE_SECCOMP_GET_METADATA definition
Andrey Vagin
avagin at virtuozzo.com
Wed Apr 25 21:30:46 MSK 2018
Do we need to update criu check to detect this feature?
On Fri, Apr 06, 2018 at 10:17:02PM +0300, Cyrill Gorcunov wrote:
> We will use it to figure out if filter log target is used.
> Metadata associated with seccomp filter is relatively new
> feature which allows userspace to get and set it back.
>
> Signed-off-by: Cyrill Gorcunov <gorcunov at gmail.com>
> ---
> compel/include/uapi/ptrace.h | 11 +++++++++++
> 1 file changed, 11 insertions(+)
>
> diff --git a/compel/include/uapi/ptrace.h b/compel/include/uapi/ptrace.h
> index 7024efef3c27..fcc2d62b08e4 100644
> --- a/compel/include/uapi/ptrace.h
> +++ b/compel/include/uapi/ptrace.h
> @@ -8,6 +8,7 @@
> * so there is no way they can be used together. Let's rely on libc one.
> */
> #include <sys/ptrace.h>
> +#include <stdint.h>
>
> #include <compel/asm/breakpoints.h>
>
> @@ -49,6 +50,16 @@
> #define PTRACE_SECCOMP_GET_FILTER 0x420c
> #endif
>
> +#ifndef PTRACE_SECCOMP_GET_METADATA
> +# define PTRACE_SECCOMP_GET_METADATA 0x420d
> +
> +struct seccomp_metadata {
> + uint64_t filter_off; /* Input: which filter */
> + uint64_t flags; /* Output: filter's flags */
> +};
> +
> +#endif /* PTRACE_SECCOMP_GET_METADATA */
> +
> #ifdef PTRACE_EVENT_STOP
> # if PTRACE_EVENT_STOP == 7 /* Bad value from Linux 3.1-3.3, fixed in 3.4 */
> # undef PTRACE_EVENT_STOP
> --
> 2.14.3
>
More information about the CRIU
mailing list