summaryrefslogtreecommitdiffstats
path: root/MdeModulePkg/Bus/Pci/UfsPciHcPei/UfsPciHcPei.inf
diff options
context:
space:
mode:
authorSami Mujawar <sami.mujawar@arm.com>2024-04-15 09:51:13 +0100
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2024-07-31 14:09:34 +0000
commit1fc55a3933b0d17430c2857629ee54abefaad7eb (patch)
tree82bbc726ef588bd5b1b5751b4a69d7574aa8a394 /MdeModulePkg/Bus/Pci/UfsPciHcPei/UfsPciHcPei.inf
parentb342070ce63075e7691cbd086ef8567cb02c372e (diff)
downloadedk2-master.tar.gz
edk2-master.tar.bz2
edk2-master.zip
OvmfPkg: Use heap memory for virtio-scsi requestHEADmaster
The storage space for virtio-scsi request header being shared with the host was from the stack as the request structure was a local function variable. A bug in the VMM can corrupt the stack space, and such issues can be very hard to debug. Note: This is only an issue with a normal guest VM (non-CCA). A CCA guest VM would perform bounce buffering for sharing the data and therefore not have this issue. Instead of using the stack for sharing the data with the host, memory can be allocated from the heap pool. However, pool allocations are not any safer in terms of pages being shared between different allocations, and so mapping a pool allocation for DMA may expose it to potential corruption by the VMM in exactly the same way. The only difference is the potential impact on program behaviour, which is much higher with the stack. Additionally, for guest-side corruption heap allocations can take advantage by turning on heap guard to help find the bug. Therefore, minor improvement can be achieved by allocating memory for the virtio-scsi request header from the heap for sharing with the host. Cc: Ard Biesheuvel <ardb+tianocore@kernel.org> Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Sami Mujawar <sami.mujawar@arm.com>
Diffstat (limited to 'MdeModulePkg/Bus/Pci/UfsPciHcPei/UfsPciHcPei.inf')
0 files changed, 0 insertions, 0 deletions