lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20250110033113-mutt-send-email-mst@kernel.org>
Date: Fri, 10 Jan 2025 03:32:41 -0500
From: "Michael S. Tsirkin" <mst@...hat.com>
To: Jason Wang <jasowang@...hat.com>
Cc: xuanzhuo@...ux.alibaba.com, eperezma@...hat.com,
	virtualization@...ts.linux.dev, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] virtio_ring: skip cpu sync when mapping fails

On Fri, Jan 10, 2025 at 11:32:46AM +0800, Jason Wang wrote:
> On Wed, Jan 8, 2025 at 7:35 PM Michael S. Tsirkin <mst@...hat.com> wrote:
> >
> > On Mon, Nov 11, 2024 at 10:55:38AM +0800, Jason Wang wrote:
> > > There's no need to sync DMA for CPU on mapping errors. So this patch
> > > skips the CPU sync in the error handling path of DMA mapping.
> > >
> > > Signed-off-by: Jason Wang <jasowang@...hat.com>
> >
> >
> > So as I said, I do not get why we are optimizing error paths.
> > The commit log at least needs to be improved to document
> > the motivation.
> 
> As replied before. Does the following make more sense?
> 
> 1) dma_map_sg() did this
> 2) When the driver tries to submit more buffers than SWIOTLB allows,
> dma_map might fail, in these cases, bouncing is useless.
> 
> Thanks

About 2 - it's an error path. Is there a reason to think it's common?
About 1 - ok reasonable. You can say "while we have no data on how
common this is, it is consistent with what dma_map_sg does".

-- 
MST


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ