[CRIU] [PATCH 7/9] creds: Move proc_status_creds::cap_X at the end of structure

Cyrill Gorcunov gorcunov at openvz.org
Thu Dec 17 01:14:15 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 b0bdac53f1a3..f83bb7a3d0f7 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