[Azure][CVM] Fix swiotlb_max_mapping_size() for potential bounce buffer allocation failure in storvsc
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
linux-azure (Ubuntu) |
New
|
Undecided
|
Unassigned | ||
Jammy |
Fix Released
|
Medium
|
Tim Gardner |
Bug Description
SRU Justification
[Impact]
Description of problem:
When the v5.15 linux-azure kernel is used for CVM on Azure, it uses swiotlb for bounce buffering.
We recently found an issue in swiotlb_
The issue is: currently swiotlb_
[ 186.458666][ C1] swiotlb_
[ 186.458669][ C1] swiotlb_
[ 186.458674][ C1] dma_direct_
[ 186.458677][ C1] __dma_map_
[ 186.458680][ C1] dma_map_
[ 186.458681][ C1] scsi_dma_
[ 186.458684][ C1] storvsc_
[ 186.458696][ C1] scsi_queue_
[ 186.458698][ C1] __blk_mq_
[ 186.458702][ C1] blk_mq_
[ 186.458704][ C1] blk_mq_
[ 186.458706][ C1] __submit_
[ 186.458708][ C1] submit_
[ 186.458713][ C1] submit_
[ 186.458714][ C1] submit_
[ 186.458718][ C1] xfs_rw_
[ 186.458769][ C1] xlog_do_
[ 186.458819][ C1] xlog_bread+
[ 186.458859][ C1] xlog_find_
[ 186.458899][ C1] xlog_find_
[ 186.458937][ C1] xlog_find_
[ 186.458978][ C1] xlog_recover+
[ 186.459056][ C1] xfs_log_
[ 186.459098][ C1] xfs_mountfs+
[ 186.459224][ C1] xfs_fs_
[ 186.459303][ C1] get_tree_
[ 186.459307][ C1] vfs_get_
[ 186.459309][ C1] path_mount+
Details: For example, the original physical address from the SCSI layer can be 0x1_0903_f200 with size=256KB, and when swiotlb_
The issue affects the hv_storvsc driver, as it calls
dma_set_
dma_set_
dma_set_
Tianyu Lan made a fix which is under review:
https:/
Note: the linux-azure-cvm v5.4 kernel doesn't need the fix, as that kernel uses a vmbus private bounce buffering implementation (drivers/
[Test Case]
Microsoft tested
[Where things could go wrong]
Bounce buffers may fail to allocate.
[Other Info]
SF: #00336634
CVE References
affects: | linux (Ubuntu) → linux-azure (Ubuntu) |
Changed in linux-azure (Ubuntu Jammy): | |
assignee: | nobody → Tim Gardner (timg-tpi) |
importance: | Undecided → Medium |
status: | New → In Progress |
https:/ /lists. ubuntu. com/archives/ kernel- team/2022- May/130246. html