[CRIU] [PATCHv2 0/9] x86/ptrace: Workaround Skylake bug

Andrei Vagin avagin at virtuozzo.com
Tue Feb 13 10:14:54 MSK 2018


Applied, thanks!

On Wed, Feb 07, 2018 at 12:48:45PM +0000, Dmitry Safonov wrote:
> Changes for v2:
> o Fix align gcc8.1 error *for real*
> o Adress comments by Andrew, such as:
>   - use in kdat test clone() instead of fork() (lighter)
>   - use CLONE_UNTRACED to make kdat work under strace (tested)
>   - Assume that criu doesn't set SIG_IGN to SIGCHLD and
>     simplify error-checking
> 
> Origin description:
> 
> A nasty kernel(older v4.14) bug, resulted in incorrect C/R of fpu state.
> 
> Tested on Skylake Amazon VM with zdtm's fpu tests and fpu02..
> Shlomi, will you be able by any chance to test this with your python
> project and older kernel (ubuntu v4.13)?
> 
> Cc: Cyrill Gorcunov <gorcunov at gmail.com>
> Cc: Andrei Vagin <avagin at virtuozzo.com>
> Cc: Shlomi Matichin <shlomi at binaris.com>
> 
> Dmitry Safonov (9):
>   x86/crtools: Add fork() err-path handle
>   x86/kerndat: Add a check for ptrace() bug on Skylake
>   compel/infect: Unite save_regs_t with save_regs() declaration
>   compel: Add ctx flags to get_task_regs()
>   compel/x86: Separate functions used to get fpu state
>   compel/x86: Add workaround on ptrace() bug on Skylake
>   compel: Cleanup INFECT_* definitions
>   zdtm/x86: Add a mxcsr preserving fpu test
>   compel: Explicitely align all containers of i387_fxsave_struct
> 
>  compel/arch/aarch64/src/lib/infect.c           |  3 +-
>  compel/arch/arm/src/lib/infect.c               |  3 +-
>  compel/arch/ppc64/src/lib/infect.c             |  3 +-
>  compel/arch/s390/src/lib/infect.c              |  2 +-
>  compel/arch/x86/src/lib/include/uapi/asm/fpu.h |  9 +--
>  compel/arch/x86/src/lib/infect.c               | 57 ++++++++++++-----
>  compel/include/infect-priv.h                   |  3 +-
>  compel/include/uapi/infect.h                   | 21 ++++--
>  compel/src/lib/infect.c                        |  5 +-
>  criu/arch/x86/crtools.c                        | 84 +++++++++++++++++++++++-
>  criu/arch/x86/include/asm/restorer.h           |  2 +
>  criu/include/kerndat.h                         |  1 +
>  criu/kerndat.c                                 | 18 ++++++
>  criu/parasite-syscall.c                        |  2 +
>  test/zdtm/static/Makefile                      |  1 +
>  test/zdtm/static/fpu02.c                       | 88 ++++++++++++++++++++++++++
>  16 files changed, 268 insertions(+), 34 deletions(-)
>  create mode 100644 test/zdtm/static/fpu02.c
> 
> -- 
> 2.13.6
> 


More information about the CRIU mailing list