criu/images
Cyrill Gorcunov 327e78f922 x86: cpu -- Save xsave frame sizes in image
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: Cyrill Gorcunov <gorcunov@gmail.com>
Reviewed-by: Dmitry Safonov <0x7f454c46@gmaill.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2018-10-30 19:27:59 +03:00
..
google/protobuf build: Move @protobuf dir into @images 2016-02-15 15:32:27 +03:00
autofs.proto images: add syntax specifier to autofs.proto 2016-10-10 12:49:28 +03:00
binfmt-misc.proto Add missing "proto2" syntax marker 2016-07-07 12:38:39 +03:00
cgroup.proto Add missing "proto2" syntax marker 2016-07-07 12:38:39 +03:00
core-aarch64.proto core-aarch64: mark gregs and clear_tid_addr as (criu).hex 2016-10-24 16:00:15 +03:00
core-arm.proto core-arm: mark gregs and clear_tid_addr as (criu).hex 2016-10-24 16:00:15 +03:00
core-ppc64.proto core-ppc64: mark gregs and clear_tid_addr as (criu).hex 2016-10-24 16:00:15 +03:00
core-s390.proto s390: Add runtime-instrumentation support 2017-10-17 08:40:44 +03:00
core-x86.proto x86: cpu -- Add image definitions for fpu frames 2018-10-30 19:27:55 +03:00
core.proto image: core -- Reserve tty fields 2018-10-30 19:27:59 +03:00
cpuinfo.proto x86: cpu -- Save xsave frame sizes in image 2018-10-30 19:27:59 +03:00
creds.proto Add missing "proto2" syntax marker 2016-07-07 12:38:39 +03:00
eventfd.proto Add missing "proto2" syntax marker 2016-07-07 12:38:39 +03:00
eventpoll.proto epoll: Save fields of target files in eventpoll_tfd_entry 2018-10-30 19:27:53 +03:00
ext-file.proto Add missing "proto2" syntax marker 2016-07-07 12:38:39 +03:00
fdinfo.proto files: Move CTL_TTY_OFF fixup to generic file engine 2018-03-02 10:10:41 +03:00
fh.proto Add missing "proto2" syntax marker 2016-07-07 12:38:39 +03:00
fifo.proto fifo: Generate unique ID for satellite regfile entry 2017-10-17 11:41:50 +03:00
file-lock.proto Add missing "proto2" syntax marker 2016-07-07 12:38:39 +03:00
fown.proto Add missing "proto2" syntax marker 2016-07-07 12:38:39 +03:00
fs.proto Add missing "proto2" syntax marker 2016-07-07 12:38:39 +03:00
fsnotify.proto fsnotify: don't save mnt_id if a mount namepsace isn't dumped 2017-05-19 09:33:02 +03:00
ghost-file.proto ghost: Add chunked ghost files 2017-07-18 09:34:44 +03:00
inventory.proto inventory: save uptime to know when dump had happened 2018-07-09 18:26:50 +03:00
ipc-desc.proto Add missing "proto2" syntax marker 2016-07-07 12:38:39 +03:00
ipc-msg.proto Add missing "proto2" syntax marker 2016-07-07 12:38:39 +03:00
ipc-sem.proto Add missing "proto2" syntax marker 2016-07-07 12:38:39 +03:00
ipc-shm.proto ipc: Keep shmem segments contents into pagemap/page images 2017-04-11 09:01:10 +03:00
ipc-var.proto ipc/sysctl: c/r kernel.{msg_next_id,sem_next_id,shm_next_id} 2016-09-06 18:58:26 +03:00
macvlan.proto images: add syntax declaration to macvlan.proto 2016-11-03 18:15:02 +03:00
Makefile net: Dump regular sit device 2017-10-17 10:48:46 +03:00
mm.proto mem: add dump state of THP_DISABLED prctl 2017-09-16 12:30:22 +03:00
mnt.proto mount: save ext_real_root for external mounts 2017-04-02 18:12:10 +03:00
netdev.proto criu: add support for external net namespaces 2018-10-30 19:27:54 +03:00
ns.proto Add missing "proto2" syntax marker 2016-07-07 12:38:39 +03:00
opts.proto crit: Beautify unix names recode 2017-04-11 09:01:11 +03:00
packet-sock.proto net: save network namespaces for sockets 2018-02-15 19:45:49 +03:00
pagemap.proto crit: translate pagemap flags into strings 2017-09-16 09:16:33 +03:00
pipe-data.proto Add missing "proto2" syntax marker 2016-07-07 12:38:39 +03:00
pipe.proto Add missing "proto2" syntax marker 2016-07-07 12:38:39 +03:00
pstree.proto Add missing "proto2" syntax marker 2016-07-07 12:38:39 +03:00
regfile.proto Add missing "proto2" syntax marker 2016-07-07 12:38:39 +03:00
remap-file-path.proto images: remap-file-path -- Reserve entries for spfs manager 2018-10-30 19:27:52 +03:00
rlimit.proto Add missing "proto2" syntax marker 2016-07-07 12:38:39 +03:00
rpc.proto cr-service: add support for configuration files in RPC mode 2018-10-30 19:27:57 +03:00
sa.proto restore/x86: call int80 for compat sigaction restore 2017-03-14 23:58:06 +03:00
seccomp.proto seccomp: Fetch seccomp flags if kernel provides 2018-07-09 18:26:51 +03:00
siginfo.proto Add missing "proto2" syntax marker 2016-07-07 12:38:39 +03:00
signalfd.proto Add missing "proto2" syntax marker 2016-07-07 12:38:39 +03:00
sit.proto net: Dump regular sit device 2017-10-17 10:48:46 +03:00
sk-inet.proto images: sk-inet -- Reserve entries for IP raw sockets 2018-10-30 19:27:52 +03:00
sk-netlink.proto images: sk-netlink -- Reserve entries for netlink queued messages 2018-10-30 19:27:52 +03:00
sk-opts.proto sk-inet: restore a value of SO_REUSEPORT 2017-11-23 20:23:14 +03:00
sk-packet.proto image: sk-packet -- Reserve fields 2018-10-30 19:27:59 +03:00
sk-unix.proto unix: restore sockets on correct mount points 2018-05-12 11:45:30 +03:00
stats.proto stats: add counters for pipes and page_pipe_bufs 2017-11-23 20:23:14 +03:00
sysctl.proto Add missing "proto2" syntax marker 2016-07-07 12:38:39 +03:00
tcp-stream.proto tcp: dump and restore window parameters 2016-08-08 15:20:47 +03:00
time.proto Add missing "proto2" syntax marker 2016-07-07 12:38:39 +03:00
timer.proto Add missing "proto2" syntax marker 2016-07-07 12:38:39 +03:00
timerfd.proto Add missing "proto2" syntax marker 2016-07-07 12:38:39 +03:00
tty.proto images: tty -- Reserve entries for multiple devpts support 2018-10-30 19:27:53 +03:00
tun.proto net: Dump tun device net id in img 2018-05-12 11:38:46 +03:00
userns.proto Add missing "proto2" syntax marker 2016-07-07 12:38:39 +03:00
utsns.proto Add missing "proto2" syntax marker 2016-07-07 12:38:39 +03:00
vma.proto Add missing "proto2" syntax marker 2016-07-07 12:38:39 +03:00