linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] Fix double allocation in swiotlb_alloc()
@ 2024-01-26 15:19 Will Deacon
  2024-01-26 15:19 ` [PATCH 1/2] swiotlb: Fix allocation alignment requirement when searching slots Will Deacon
                   ` (2 more replies)
  0 siblings, 3 replies; 18+ messages in thread
From: Will Deacon @ 2024-01-26 15:19 UTC (permalink / raw)
  To: linux-kernel
  Cc: kernel-team, Will Deacon, iommu, Christoph Hellwig,
	Marek Szyprowski, Robin Murphy, Petr Tesarik, Dexuan Cui

Hi folks,

These two patches fix a nasty double allocation problem in swiotlb_alloc()
and add a diagnostic to help catch any similar issues in future. This was
a royal pain to track down and I've had to make a bit of a leap at the
correct alignment semantics (i.e. iotlb_align_mask vs alloc_align_mask).

Without these changes, we've been observing random vsock hangs when
communicating with virtual machines in Android.

Please have a look!

Cheers,

Will

Cc: iommu@lists.linux.dev
Cc: Christoph Hellwig <hch@lst.de>
Cc: Marek Szyprowski <m.szyprowski@samsung.com>
Cc: Robin Murphy <robin.murphy@arm.com>
Cc: Petr Tesarik <petr.tesarik1@huawei-partners.com>
Cc: Dexuan Cui <decui@microsoft.com>

--->8

Will Deacon (2):
  swiotlb: Fix allocation alignment requirement when searching slots
  swiotlb: Enforce page alignment in swiotlb_alloc()

 kernel/dma/swiotlb.c | 32 ++++++++++++++++++++++----------
 1 file changed, 22 insertions(+), 10 deletions(-)

-- 
2.43.0.429.g432eaa2c6b-goog


^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2024-01-30 14:34 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-26 15:19 [PATCH 0/2] Fix double allocation in swiotlb_alloc() Will Deacon
2024-01-26 15:19 ` [PATCH 1/2] swiotlb: Fix allocation alignment requirement when searching slots Will Deacon
2024-01-26 17:01   ` Petr Tesařík
2024-01-29 19:32     ` Will Deacon
2024-01-29 20:40       ` Petr Tesařík
2024-01-29 22:05         ` Will Deacon
2024-01-26 15:19 ` [PATCH 2/2] swiotlb: Enforce page alignment in swiotlb_alloc() Will Deacon
2024-01-26 16:23   ` Petr Tesařík
2024-01-29 19:35     ` Will Deacon
2024-01-29  6:08   ` Christoph Hellwig
2024-01-29  7:43     ` Petr Tesařík
2024-01-29  7:50       ` Christoph Hellwig
2024-01-29 19:49     ` Will Deacon
2024-01-30 14:34       ` Christoph Hellwig
2024-01-26 16:20 ` [PATCH 0/2] Fix double allocation " Petr Tesařík
2024-01-29 18:42   ` Will Deacon
2024-01-29 19:26     ` Petr Tesařík
2024-01-29 19:33       ` Will Deacon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).