Commit f525d417 authored by Cyrill Gorcunov's avatar Cyrill Gorcunov Committed by Pavel Emelyanov

seccomp: compel -- Add PTRACE_SECCOMP_GET_METADATA definition

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.
Reviewed-by: 's avatarDmitry Safonov <0x7f454c46@gmail.com>
Signed-off-by: 's avatarCyrill Gorcunov <gorcunov@gmail.com>
Signed-off-by: 's avatarAndrei Vagin <avagin@virtuozzo.com>
parent e071c2a6
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment