u-boot/drivers/virtio
AKASHI Takahiro 6b0ddd1fbc virtio_blk: set log2blksz correctly
'log2blksz' in blk_desc structure must always be initialized, otherwise
it will cause a lot of weird failures in file operations.

For example, fs_set_blk_dev[_with_part]() examines a block device against
every file system with its probe function. In particular, ext4 file
system's ext4_probe() will calls fs_devread() to fetch a super block.
If log2blksz is 0, the actual 'read' size, i.e. block_len >> log2blksz, is
much bigger than a buffer's size, and it can end up with memory corruption.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
Fixes: f4802209e5 ("virtio: Add block driver support")
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2020-08-24 14:11:31 -04:00
..
Kconfig virtio: VIRTIO_RNG depends on DM_RNG 2020-06-05 04:04:41 +02:00
Makefile virtio: rng: Add a random number generator(rng) driver 2020-01-07 18:08:21 +01:00
virtio_blk.c virtio_blk: set log2blksz correctly 2020-08-24 14:11:31 -04:00
virtio_blk.h virtio: Add block driver support 2018-11-14 09:16:27 -08:00
virtio_mmio.c common: Drop linux/bug.h from common header 2020-05-18 21:19:23 -04:00
virtio_mmio.h common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
virtio_net.c virtio: net: Support non-legacy device 2018-11-14 09:16:28 -08:00
virtio_net.h virtio: Add net driver support 2018-11-14 09:16:27 -08:00
virtio_pci_legacy.c common: Drop linux/bug.h from common header 2020-05-18 21:19:23 -04:00
virtio_pci_modern.c common: Drop linux/delay.h from common header 2020-05-18 21:19:23 -04:00
virtio_pci.h virtio: Add virtio over pci transport driver 2018-11-14 09:16:28 -08:00
virtio_ring.c common: Drop linux/bug.h from common header 2020-05-18 21:19:23 -04:00
virtio_rng.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
virtio_sandbox.c common: Drop linux/bug.h from common header 2020-05-18 21:19:23 -04:00
virtio-uclass.c common: Drop linux/bug.h from common header 2020-05-18 21:19:23 -04:00