aboutsummaryrefslogtreecommitdiff
path: root/lib/test_fortify/write_overflow-strscpy.c
diff options
context:
space:
mode:
authorFeng Liu <[email protected]>2023-03-15 20:54:56 +0200
committerMichael S. Tsirkin <[email protected]>2023-04-21 03:02:31 -0400
commita084983dcd4e75616fe4102c690d2fc922ac32b5 (patch)
tree0c0aa11f34f9a85384a6a623a2fe077d20b61d13 /lib/test_fortify/write_overflow-strscpy.c
parentbea273c7a8712a055cd504a2bb7d76d8d713ba6e (diff)
virtio_ring: Allow non power of 2 sizes for packed virtqueue
According to the Virtio Specification, the Queue Size parameter of a virtqueue corresponds to the maximum number of descriptors in that queue, and it does not have to be a power of 2 for packed virtqueues. However, the virtio_pci_modern driver enforced a power of 2 check for virtqueue sizes, which is unnecessary and restrictive for packed virtuqueue. Split virtqueue still needs to check the virtqueue size is power_of_2 which has been done in vring_alloc_queue_split of the virtio_ring layer. To validate this change, we tested various virtqueue sizes for packed rings, including 128, 256, 512, 100, 200, 500, and 1000, with CONFIG_PAGE_POISONING enabled, and all tests passed successfully. Signed-off-by: Feng Liu <[email protected]> Reviewed-by: Jiri Pirko <[email protected]> Message-Id: <[email protected]> Signed-off-by: Michael S. Tsirkin <[email protected]>
Diffstat (limited to 'lib/test_fortify/write_overflow-strscpy.c')
0 files changed, 0 insertions, 0 deletions