virtio: PCI BAR mapping may be accessing invalid slots #1392
Open
Description
According to the pci-types
documentation, the EndpointHeader::bar
function should not be called on slots that make up the second part of a 64-bit BAR. However, map_bar_mem
calls the function (indirectly) for all slots in the maximum BAR count range, without checking if the previous BAR was 64-bits.
kernel/src/drivers/virtio/env.rs
Lines 33 to 41 in 0245c53
Additionally, it seems like the BARs are always 64-bit based on the lines below:
Lines 147 to 150 in 0245c53
Metadata
Assignees
Labels
No labels