XSAVE consistency problem, dumping leaves

问题描述

宿主机使用 3.16.35 内核,使用 qemu 运行 openwrt 4.14.167 内核,启动时报了如下 oops:

Linux version 4.14.167 (builder@buildhost) (gcc version 7.5.0 (OpenWrt GCC 7.5.0 r10911-c155900f66)) #0 SMP Wed Jan 29 16:05:35 2020
[    0.000000] Command line: BOOT_IMAGE=/boot/vmlinuz root=PARTUUID=94b0173e-02 rootfstype=ext4 rootwait console=tty0 console=ttyS0,115200n8 noinitrd
[    0.000000] XSAVE consistency problem, dumping leaves
[    0.000000] ------------[ cut here ]------------
[    0.000000] WARNING: CPU: 0 PID: 0 at 0xffffffff81ec8ace
[    0.000000] Modules linked in:
[    0.000000] CPU: 0 PID: 0 Comm: swapper Not tainted 4.14.167 #0
[    0.000000] task: ffffffff81e11480 task.stack: ffffffff81e00000
[    0.000000] RIP: 0010:0xffffffff81ec8ace
[    0.000000] RSP: 0000:ffffffff81e03dc0 EFLAGS: 00010082 ORIG_RAX: 0000000000000000
[    0.000000] RAX: 0000000000000029 RBX: ffffffff81e03ddc RCX: 0000000000000002
[    0.000000] RDX: 0000000000000001 RSI: 0000000000000002 RDI: 0000000000000047
[    0.000000] RBP: ffffffff81e03e08 R08: 0000000000000000 R09: 0000000000000002
[    0.000000] R10: ffffffff81e84f80 R11: 0000000000000000 R12: 000000000000000a
[    0.000000] R13: 0000000000000100 R14: 0000000000000340 R15: 0000000000000340
[    0.000000] FS:  0000000000000000(0000) GS:ffffffff81e9a000(0000) knlGS:0000000000000000
[    0.000000] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[    0.000000] CR2: ffff88800008b000 CR3: 0000000001f04000 CR4: 00000000000406a0
[    0.000000] Call Trace:
[    0.000000]  ? 0xffffffff81000000
[    0.000000]  0xffffffff81ec8462
[    0.000000]  0xffffffff81ec9223
[    0.000000]  0xffffffff81ec50d9
[    0.000000]  ? 0xffffffff810bb10a
[    0.000000]  0xffffffff81ebaa81
[    0.000000]  0xffffffff81eba42a
[    0.000000]  0xffffffff81eba49e
[    0.000000]  0xffffffff810000d5
[    0.000000] Code: ff ff 44 3b 35 9c 3b 0f 00 74 2c 80 3d 9a a8 fb ff 00 0f 85 27 03 00 00 48 c7 c7 f8 bf ca 81 c6 05 86 a8 fb ff 01 e8 fe 25 1f ff <0f> 0b e9 0d 03 44 89
[    0.000000] random: get_random_bytes called from 0xffffffff81084731 with crng_init=0
[    0.000000] ---[ end trace 9c8939f3f870e37b ]---

搜索得到的信息

搜索互联网,从如下链接中找到了相关的信息:

4.15-rc6+ hang

linus 对问题的解释摘录如下:

I think this is a vbox issue, with virtualbox not exposing all the
xsave state, so that when the kernel adds up the xsave areas, the end
result doesn’t match what the total size is reported to be

linus 的描述说明问题是 virtualbox 没有扫描出所有的 xsave 状态,因此当内核添加 xsave 区域时,最终的结果与被报告的结果 xsave 区域总大小不匹配。

规避方案

如下链接中提到一个规避方案:

Linux-4.12-rc1 and rc2 not working as vbox guest ?

adding 'noxsave' to the kernel command line is a workaround

规避方案为在内核引导命令行中添加 noxsave 选项!参考 mount qemu qcow2、img 这篇博客挂载 qcow2 格式的磁盘,修改 grub.conf 配置文件,测试规避方法能够解决问题

XSAVE 是什么?

从网络上找到如下对 XSAVE 的说明内容:

XSAVE stands for similar x86 instruction xsave which places extended processor state into a memory area. The saving can be initiated by any userspace application at any moment and size of the memory frame depends on processor features and may vary between different models. Thus if checkpoint and restore are done on different processors the next call to xsave may corrupt memory if sizes mismatch.

上面的描述说明 XSAVE 代表的是普通 x86 指令 xsave,它被用来存放处理器状态到一个内存区域中。

处理器状态保存可以在任意用户态程序的任意时刻被初始化,内存区域的大小依赖处理器属性,不同的处理器模型大小可能有所区别。

因此,如果检查点和恢复是在不同的处理器上完成的,如果不同处理器大小并不匹配时,下一次对xsave的调用可能会损坏内存。

更多的信息请访问如下链接:

https://criu.org/Xsave

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值