[CRIU] BUG: CRIU corrupt floating point state after checkpoint

Cyrill Gorcunov gorcunov at gmail.com
Wed Sep 25 09:40:07 MSK 2019


On Wed, Sep 25, 2019 at 02:51:37AM +0100, Dmitry Safonov wrote:
> On 9/25/19 2:41 AM, Diyu Zhou wrote:
> > Sure. See:
> > https://github.com/vmexit/fpu-debug
> > 
> > I'm very new to github, so let me know if there is any issue
> > accessing the link.
> 
> Ok, might this quick-fast oneliner help?
> 
> --->8---
> diff --git a/compel/src/main.c b/compel/src/main.c
> index 51bac099fe5e..ca3c0318093e 100644
> --- a/compel/src/main.c
> +++ b/compel/src/main.c
> @@ -41,7 +41,7 @@ typedef struct {
>  static const flags_t flags = {
>  #if defined CONFIG_X86_64
>         .arch           = "x86",
> -       .cflags         = COMPEL_CFLAGS_PIE,
> +       .cflags         = COMPEL_CFLAGS_PIE " -mfpmath=387",
>         .cflags_compat  = COMPEL_CFLAGS_NOPIC,
>  #elif defined CONFIG_AARCH64
>         .arch           = "aarch64",

The parasite code indeed does use fpu :/ Crap. Still I think
we might simply need to save fpu state when entering parasite
and restore on cleanup, simply because compiler might use
fpu instructions for better performance on say u64 and etc.


More information about the CRIU mailing list