[CRIU] [PATCH 1/2] creds: Move proc_status_creds::cap_X at the end of structure
Cyrill Gorcunov
gorcunov at openvz.org
Thu Nov 26 04:24:39 PST 2015
For easier comparision which gonna be addressed in next patch.
https://jira.sw.ru/PSBM-41416
Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
---
include/proc_parse.h | 14 +++++++++-----
1 file changed, 9 insertions(+), 5 deletions(-)
diff --git a/include/proc_parse.h b/include/proc_parse.h
index e45d93fa380c..6dc5e57de600 100644
--- a/include/proc_parse.h
+++ b/include/proc_parse.h
@@ -85,11 +85,6 @@ struct proc_status_creds {
unsigned int uids[4];
unsigned int gids[4];
- u32 cap_inh[PROC_CAP_SIZE];
- u32 cap_prm[PROC_CAP_SIZE];
- u32 cap_eff[PROC_CAP_SIZE];
- u32 cap_bnd[PROC_CAP_SIZE];
-
char state;
int ppid;
unsigned long long sigpnd;
@@ -97,6 +92,15 @@ struct proc_status_creds {
int seccomp_mode;
u32 last_filter;
+
+ /*
+ * Keep them at the end of structure
+ * for fast comparision reason.
+ */
+ u32 cap_inh[PROC_CAP_SIZE];
+ u32 cap_prm[PROC_CAP_SIZE];
+ u32 cap_eff[PROC_CAP_SIZE];
+ u32 cap_bnd[PROC_CAP_SIZE];
};
bool proc_status_creds_eq(struct proc_status_creds *o1, struct proc_status_creds *o2);
--
2.5.0
More information about the CRIU
mailing list