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: <Z9G0QU5Ew3FusrJH@smile.fi.intel.com>
Date: Wed, 12 Mar 2025 18:20:17 +0200
From: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To: Marek Szyprowski <m.szyprowski@...sung.com>
Cc: Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
	Christoph Hellwig <hch@....de>, netdev@...r.kernel.org,
	linux-kernel@...r.kernel.org, Rasesh Mody <rmody@...vell.com>,
	GR-Linux-NIC-Dev@...vell.com, Andrew Lunn <andrew+netdev@...n.ch>,
	"David S. Miller" <davem@...emloft.net>,
	Eric Dumazet <edumazet@...gle.com>
Subject: Re: [PATCH net v1 1/1] bnx2: Fix unused data compilation warning

On Tue, Mar 11, 2025 at 01:51:21PM +0100, Marek Szyprowski wrote:
> On 05.03.2025 11:00, Andy Shevchenko wrote:
> > On Tue, Mar 04, 2025 at 08:35:24AM -0800, Jakub Kicinski wrote:
> >> On Tue, 4 Mar 2025 15:41:19 +0200 Andy Shevchenko wrote:

...

> >> I meant something more like (untested):
> > We are starving for the comment from the DMA mapping people.
> 
> I'm really sorry for this delay. Just got back to the everyday stuff 
> after spending a week in bed recovering from flu...

Oh, I hope you feel much better now!

...

> >>   #define DEFINE_DMA_UNMAP_ADDR(ADDR_NAME)
> >>   #define DEFINE_DMA_UNMAP_LEN(LEN_NAME)
> >> -#define dma_unmap_addr(PTR, ADDR_NAME)           (0)
> >> -#define dma_unmap_addr_set(PTR, ADDR_NAME, VAL)  do { } while (0)
> >> -#define dma_unmap_len(PTR, LEN_NAME)             (0)
> >> -#define dma_unmap_len_set(PTR, LEN_NAME, VAL)    do { } while (0)
> >> +#define dma_unmap_addr(PTR, ADDR_NAME)           ({ typeof(PTR) __p __maybe_unused = PTR; 0; )}
> >> +#define dma_unmap_addr_set(PTR, ADDR_NAME, VAL)  do { typeof(PTR) __p __maybe_unused = PTR; } while (0)
> >> +#define dma_unmap_len(PTR, LEN_NAME)             ({ typeof(PTR) __p __maybe_unused = PTR; 0; )}
> >> +#define dma_unmap_len_set(PTR, LEN_NAME, VAL)    do { typeof(PTR) __p __maybe_unused = PTR; } while (0)

> >> I just don't know how much code out there depends on PTR not
> >> existing if !CONFIG_NEED_DMA_MAP_STATE
> > Brief checking shows that only drivers/net/ethernet/chelsio/* comes
> > with ifdeffery, the rest most likely will fail in the same way
> > (note, overwhelming majority of the users is under the network realm):
> 
> Frankly speaking I wasn't aware of this API till now.
> 
> If got it right the above proposal should work fine. The addr/len names 
> can be optimized out, but the pointer to the container should exist.

Thanks for the reply, would you or Jakub will to send a formal patch?
I can test it on my configuration and build.

-- 
With Best Regards,
Andy Shevchenko



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ