What the author doesn't explain, but I find myself wondering, is how did this go unnoticed for so long? What conditions expose it? Obviously it's easy enough to trigger in QEMU, but is real hardware in that condition so rare?
I feel like I missed a bit of context for what launched this whole adventure. The adventure itself was interesting, though!
It seems you need at least: 1. A PowerPC machine (with IOMMU, so I guess it can't be too old). 2. A PCI VGA card. (Emulated, it seems.) 3. IBM VIO bus support compiled in. 4. A KASAN kernel booted to get told about the issue so clearly, otherwise the failure may be much more subtle.
So, yeah, that's quite the confluence of things... Do PowerPC folks usually run their VMs with VGA emulation for example?
EDIT: Actually never mind, I think that just having PCI bus support and VGA arbitration support compiled in may be sufficient, instead of actually having a VGA card (real or not)?
I think, from my quick reading of the code, that it's triggerable by having VGA arbitration enabled (which requires having PCI enabled) and having IBM VIO support compiled in, without having a VGA device.
In any case, QEMU will give you a VGA device when run with default options, so it's not that rare for developers to run VMs with a VGA card.
This particular bug was found by one of our excellent test engineers, I'm not sure what specifically he was doing that led him to hit this bug, beyond testing stuff with KASAN enabled on a real machine using the IBM PowerVM hypervisor.
Comments
What the author doesn't explain, but I find myself wondering, is how did this go unnoticed for so long? What conditions expose it? Obviously it's easy enough to trigger in QEMU, but is real hardware in that condition so rare?
I feel like I missed a bit of context for what launched this whole adventure. The adventure itself was interesting, though!
It seems you need at least: 1. A PowerPC machine (with IOMMU, so I guess it can't be too old). 2. A PCI VGA card. (Emulated, it seems.) 3. IBM VIO bus support compiled in. 4. A KASAN kernel booted to get told about the issue so clearly, otherwise the failure may be much more subtle.
So, yeah, that's quite the confluence of things... Do PowerPC folks usually run their VMs with VGA emulation for example?
EDIT: Actually never mind, I think that just having PCI bus support and VGA arbitration support compiled in may be sufficient, instead of actually having a VGA card (real or not)?
I think, from my quick reading of the code, that it's triggerable by having VGA arbitration enabled (which requires having PCI enabled) and having IBM VIO support compiled in, without having a VGA device.
In any case, QEMU will give you a VGA device when run with default options, so it's not that rare for developers to run VMs with a VGA card.
This particular bug was found by one of our excellent test engineers, I'm not sure what specifically he was doing that led him to hit this bug, beyond testing stuff with KASAN enabled on a real machine using the IBM PowerVM hypervisor.