[CRIU] [PATCH 1/7] compel/x86/compat: pack ucontext_ia32

Dmitry Safonov dsafonov at virtuozzo.com
Mon Jan 9 09:19:06 PST 2017


As I've united k_rtsigset_t between native and compat ucontext's,
it's 8-bytes aligned now. We don't care about align of this as
we fill it always with memcpy()/memset(0).
So after those changes, ucontext_ia32 has received new padding
between uc_mcontext and uc_sigmask (4 bytes to align to 8-byte sized
sigmask). Because of this, mask of blocked signals was restored
with shift (wrongly).
Fixes: signalfd00, file_attr tests.

Signed-off-by: Dmitry Safonov <dsafonov at virtuozzo.com>
---
 compel/arch/x86/src/lib/include/uapi/asm/sigframe.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/compel/arch/x86/src/lib/include/uapi/asm/sigframe.h b/compel/arch/x86/src/lib/include/uapi/asm/sigframe.h
index e9357002c18a..a939bbee11c9 100644
--- a/compel/arch/x86/src/lib/include/uapi/asm/sigframe.h
+++ b/compel/arch/x86/src/lib/include/uapi/asm/sigframe.h
@@ -99,7 +99,7 @@ struct ucontext_ia32 {
 	compat_stack_t		uc_stack;
 	struct rt_sigcontext_32	uc_mcontext;
 	k_rtsigset_t		uc_sigmask; /* mask last for extensibility */
-};
+} __packed;
 
 struct rt_sigframe_ia32 {
 	uint32_t		pretcode;
-- 
2.11.0



More information about the CRIU mailing list