[CRIU] [PATCH 4/6] compel: arch, x86 -- Don't require fpu structures to be aligned
Cyrill Gorcunov
gorcunov at openvz.org
Mon Feb 13 07:03:21 PST 2017
Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
---
compel/arch/x86/src/lib/infect.c | 9 ++-------
1 file changed, 2 insertions(+), 7 deletions(-)
diff --git a/compel/arch/x86/src/lib/infect.c b/compel/arch/x86/src/lib/infect.c
index 418c43414d32..d5b4f7659c65 100644
--- a/compel/arch/x86/src/lib/infect.c
+++ b/compel/arch/x86/src/lib/infect.c
@@ -115,15 +115,10 @@ int sigreturn_prep_fpu_frame_plain(struct rt_sigframe *sigframe,
&rsigframe->compat.fpu_state;
unsigned long addr = (unsigned long)(void *)&fpu_state->xsave;
- if (sigframe->is_native && (addr % 64ul) == 0ul) {
+ if (sigframe->is_native)
sigframe->native.uc.uc_mcontext.fpstate = &fpu_state->xsave;
- } else if (!sigframe->is_native && (addr % 32ul) == 0ul) {
+ else if (!sigframe->is_native)
sigframe->compat.uc.uc_mcontext.fpstate = (uint32_t)addr;
- } else {
- pr_err("Unaligned address passed: %lx (native %d)\n",
- addr, sigframe->is_native);
- return -1;
- }
return 0;
}
--
2.7.4
More information about the CRIU
mailing list