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]
Date: Fri, 2 Feb 2024 17:09:18 +0200
From: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To: Howard Yen <howardyen@...gle.com>
Cc: Greg KH <gregkh@...uxfoundation.org>,
	Robin Murphy <robin.murphy@....com>, hch@....de,
	m.szyprowski@...sung.com, petr.tesarik.ext@...wei.com,
	rafael@...nel.org, broonie@...nel.org, james@...iv.tech,
	james.clark@....com, masahiroy@...nel.org,
	linux-kernel@...r.kernel.org, iommu@...ts.linux.dev
Subject: Re: [PATCH] dma-coherent: add support for multi coherent rmems per
 dev

On Fri, Feb 02, 2024 at 12:40:59PM +0800, Howard Yen wrote:
> On Thu, Feb 1, 2024 at 11:41 PM Greg KH <gregkh@...uxfoundation.org> wrote:
> > On Thu, Feb 01, 2024 at 10:45:30AM +0000, Robin Murphy wrote:
> > > On 2024-02-01 9:35 am, Howard Yen wrote:

..

> I'm considering to modify the change to
> 
> 1. Move it into the dma_coherent_mem structure, like
> 
>      HEAD
> mem0->node
> 
> This case, if I check list_empty(mem0->node), it would give me the
> list is empty, but actually there is one rmem.
> 
> 2. Replace the pointer to a list_head.
> 
>     HEAD
> dma_mems ---> mem0->node
> 
> This case, if I check list_empty(dma_mems), it would give me the list
> is non-empty, it matches the actual status.
> 
> So, the 2nd looks reasonable, I'm going to upload a v2 patch with the
> 2nd approach, does that make sense?

I believe this is exactly what Robin told about "list to replace the pointer".

-- 
With Best Regards,
Andy Shevchenko



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ