NX (Execute Disable) bit in guest crashing host?
Posted: 15. Sep 2016, 05:09
VB aside for a moment, on a fairly regular basis, I used to get things like the following in kern.log:
One by one the CPUs would lock up, until the whole computer was frozen such that I couldn't do anything, neither from the console nor remotely (ssh), and just had to manually poweroff and reboot.
I made sure BIOS and kernel were up to date, etc., etc. No resolution. It did seem that the problem happened mostly, if not exclusively, shortly after or while running my VirtualBox Windows VM. I changed a couple BIOS settings and now have gone a long time with no kernel lockup, whether I used the Windows VM extensively or not. The most notable BIOS setting I changed was to disable the Execute Disable bit.
I'm not a hardware or deep virtualization guy, so I'm reaching above my head here, but my "naive" theory goes like this: The Windows guest is setting some region of memory to no-execute, but the Linux host somehow "doesn't get the message". Later, either because the VM shutdown or something else, the kernel wants to use that memory for processing but runs into the unexpected NX bit set that was set by the guest.
Like I said, I know I don't know what I'm talking about here, but it seems a plausible theory based on my limited knowledge and the observed patterns. Somehow, with NX bit set, kernel lockup would follow in a relatively short time seeming to follow running the Windows VM.
Specs:
Guest: Windows 7 Professional, SP1, 64-bit, 5016MB Ram allocated to VM
VB: 5.0.24 (Debian package 5.0.24~dfsg-1~bpo8+1), Extension pack and guest additions installed, Enable PAE/NX is checked(!!!), Enable VT-x and Nested paged are checked
Host: Debian 8 (jessie), "Linux 4.5.0-0.bpo.2-amd64 #1 SMP Debian 4.5.4-1~bpo8+1 (2016-05-13) x86_64 GNU/Linux"
Hardware: Intel(R) Core(TM) i7 CPU; Toshiba Satellite A665; 8GB ram
BIOS: VT-x is enabled; Execute Disable (NX) bit alternately enabled then disabled (as described above); Bios version 2.3 for above noted laptop model
Code: Select all
[51282.218399] WARNING: CPU: 3 PID: 0 at /build/linux-7z1rSb/linux-3.16.7-ckt25/kernel/watchdog.c:265 watchdog_overflow_callback+0x98/0xc0()
[51282.218399] Watchdog detected hard LOCKUP on cpu 3I made sure BIOS and kernel were up to date, etc., etc. No resolution. It did seem that the problem happened mostly, if not exclusively, shortly after or while running my VirtualBox Windows VM. I changed a couple BIOS settings and now have gone a long time with no kernel lockup, whether I used the Windows VM extensively or not. The most notable BIOS setting I changed was to disable the Execute Disable bit.
I'm not a hardware or deep virtualization guy, so I'm reaching above my head here, but my "naive" theory goes like this: The Windows guest is setting some region of memory to no-execute, but the Linux host somehow "doesn't get the message". Later, either because the VM shutdown or something else, the kernel wants to use that memory for processing but runs into the unexpected NX bit set that was set by the guest.
Like I said, I know I don't know what I'm talking about here, but it seems a plausible theory based on my limited knowledge and the observed patterns. Somehow, with NX bit set, kernel lockup would follow in a relatively short time seeming to follow running the Windows VM.
Specs:
Guest: Windows 7 Professional, SP1, 64-bit, 5016MB Ram allocated to VM
VB: 5.0.24 (Debian package 5.0.24~dfsg-1~bpo8+1), Extension pack and guest additions installed, Enable PAE/NX is checked(!!!), Enable VT-x and Nested paged are checked
Host: Debian 8 (jessie), "Linux 4.5.0-0.bpo.2-amd64 #1 SMP Debian 4.5.4-1~bpo8+1 (2016-05-13) x86_64 GNU/Linux"
Hardware: Intel(R) Core(TM) i7 CPU; Toshiba Satellite A665; 8GB ram
BIOS: VT-x is enabled; Execute Disable (NX) bit alternately enabled then disabled (as described above); Bios version 2.3 for above noted laptop model