[CRIU] [PATCHv2 7/9] compel: Cleanup INFECT_* definitions
Dmitry Safonov
dima at arista.com
Wed Feb 7 15:48:52 MSK 2018
Ugh, I've spent 25 mins at 4 A.M. to figure out why the tests are failing.
And the reason is stupied me, who defined a new flag after 0x8
as 0x16, not as 0x10. Simplify those definitions for such simple-minded
living creatures like Dima.
Signed-off-by: Dmitry Safonov <dima at arista.com>
---
compel/include/uapi/infect.h | 14 +++++++++-----
1 file changed, 9 insertions(+), 5 deletions(-)
diff --git a/compel/include/uapi/infect.h b/compel/include/uapi/infect.h
index e0ff233e70a9..f087f21f3707 100644
--- a/compel/include/uapi/infect.h
+++ b/compel/include/uapi/infect.h
@@ -123,12 +123,16 @@ struct infect_ctx {
extern struct infect_ctx *compel_infect_ctx(struct parasite_ctl *);
-#define INFECT_NO_MEMFD 0x1 /* don't use memfd() */
-#define INFECT_FAIL_CONNECT 0x2 /* make parasite connect() fail */
-#define INFECT_NO_BREAKPOINTS 0x4 /* no breakpoints in pie tracking */
-#define INFECT_COMPATIBLE 0x8 /* can run parasite inside compat tasks */
+/* Don't use memfd() */
+#define INFECT_NO_MEMFD (1UL << 0)
+/* Make parasite connect() fail */
+#define INFECT_FAIL_CONNECT (1UL << 1)
+/* No breakpoints in pie tracking */
+#define INFECT_NO_BREAKPOINTS (1UL << 2)
+/* Can run parasite inside compat tasks */
+#define INFECT_COMPATIBLE (1UL << 3)
/* Workaround for ptrace bug on Skylake CPUs with kernels older than v4.14 */
-#define INFECT_X86_PTRACE_MXCSR_BUG 0x10
+#define INFECT_X86_PTRACE_MXCSR_BUG (1UL << 4)
/*
* There are several ways to describe a blob to compel
--
2.13.6
More information about the CRIU
mailing list