[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240219134010.5b49b8f1@meshulam.tesarici.cz>
Date: Mon, 19 Feb 2024 13:40:10 +0100
From: Petr Tesařík <petr@...arici.cz>
To: Will Deacon <will@...nel.org>
Cc: Christoph Hellwig <hch@....de>, linux-kernel@...r.kernel.org,
kernel-team@...roid.com, iommu@...ts.linux.dev, Marek Szyprowski
<m.szyprowski@...sung.com>, Robin Murphy <robin.murphy@....com>, Petr
Tesarik <petr.tesarik1@...wei-partners.com>, Dexuan Cui
<decui@...rosoft.com>
Subject: Re: [PATCH v3 0/3] Fix double allocation in swiotlb_alloc()
On Mon, 19 Feb 2024 09:24:39 +0000
Will Deacon <will@...nel.org> wrote:
> Hey Christoph,
>
> On Mon, Feb 19, 2024 at 07:35:27AM +0100, Christoph Hellwig wrote:
> > Robin and Petr, does this looks good to you now?
It looks good to me for the boot-time swiotlb pool. Dynamic allocation
of transient swiotlb pools does not take these additional alignment
constraints into account, so when allocation may fail. OTOH the
underlying allocator(s) do not provide a suitable API, so I don't think
it's worth fixing.
In the worst case, a DMA buffer will fail to map, which may already
happen today.
> FWIW, I'm likely to send a v4 addressing another issue reported by
> Nicolin with NVME and 64k pages [1], so you may as well wait for that.
I'm interested. The code look quite OK to me as it is, but I assume it
again uncovers something when the difference between PAGE_SHIFT and
IOTLB_SHIFT is more than one (which was motivation for my initial fix,
which in the end broke more than it fixed).
Petr T
Powered by blists - more mailing lists