• Cyrill Gorcunov's avatar
    x86: cpu -- Save xsave frame sizes in image · 327e78f9
    Cyrill Gorcunov authored
    Keep xsave sizes in image to be sure that on restore the application
    won't override memory out of xsave frame size if been calling xsave
    instruction directly.
    
    Here are some details: while been testing vz7 containers migration
    we've noticed that sometime applications do crash after restore,
    what is worse such execution abort may happen not immediately
    after the restore but after passing some time. After spending
    a lot of time we discovered that it is due to the fact that
    the migration is directed from an old cpu to a modern one
    which has extensions such as mpx. In result libc has cached
    small xsave size and then after restore any direct call to
    xsave instruction overwrite memory which is allocated with
    size less than needed.
    
    Thus we save xsave frame size in image and require it to
    match to prevent such situation.
    Signed-off-by: 's avatarCyrill Gorcunov <gorcunov@gmail.com>
    Reviewed-by: 's avatarDmitry Safonov <0x7f454c46@gmaill.com>
    Signed-off-by: 's avatarAndrei Vagin <avagin@virtuozzo.com>
    327e78f9
Name
Last commit
Last update
Documentation Loading commit data...
compel Loading commit data...
contrib Loading commit data...
coredump Loading commit data...
crit Loading commit data...
criu Loading commit data...
images Loading commit data...
include/common Loading commit data...
lib Loading commit data...
scripts Loading commit data...
soccr Loading commit data...
test Loading commit data...
.gitignore Loading commit data...
.mailmap Loading commit data...
.travis.yml Loading commit data...
COPYING Loading commit data...
CREDITS Loading commit data...
INSTALL.md Loading commit data...
Makefile Loading commit data...
Makefile.compel Loading commit data...
Makefile.config Loading commit data...
Makefile.install Loading commit data...
Makefile.versions Loading commit data...
README.md Loading commit data...