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] [thread-next>] [day] [month] [year] [list]
Message-ID: <20241015075613.GB25487@lst.de>
Date: Tue, 15 Oct 2024 09:56:13 +0200
From: Christoph Hellwig <hch@....de>
To: Jiri Slaby <jirislaby@...nel.org>
Cc: Christoph Hellwig <hch@....de>, stefani@...bold.net,
	jassisinghbrar@...il.com, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] kfifo: don't include dma-mapping.h in kfifo.h

On Tue, Oct 15, 2024 at 09:53:52AM +0200, Jiri Slaby wrote:
>> DMA_MAPPING_ERROR is never used by kfifo.h itself.  It is used
>> by user of the header that instanciate one of the macros that use
>> it.
>
> Well, I don't understand. Looking at:
> #define kfifo_dma_in_prepare(fifo, sgl, nents, len) \
>         kfifo_dma_in_prepare_mapped(fifo, sgl, nents, len, 
> DMA_MAPPING_ERROR)
>
> You'd have to include dma-mapping.h if you used this macro.

Yes, obviously.

> Even though you 
> do not explicitly use any other def from the dma header.

Sure.

> Well, this is not a definition of self-containment.

Yes, it is the exact definition of it.

> If you use every macro 
> from a header and it does not need any other include, then it is 
> self-contained.

No, that goes way beyond the self containedness.  In fact these days
the main reason to use macros is exactly to avoid these kinds of
dependencies.


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ