[CRIU] [PATCH 01/10] seccomp: compel -- Add PTRACE_SECCOMP_GET_METADATA definition
Cyrill Gorcunov
gorcunov at gmail.com
Mon May 7 11:42:41 MSK 2018
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: Dmitry Safonov <0x7f454c46 at gmail.com>
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