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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <7f723486-237f-47d2-b9c1-e5312876dfb5@kernel.org>
Date: Tue, 15 Oct 2024 09:53:52 +0200
From: Jiri Slaby <jirislaby@...nel.org>
To: Christoph Hellwig <hch@....de>
Cc: 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 15. 10. 24, 9:40, Christoph Hellwig wrote:
> On Tue, Oct 15, 2024 at 09:38:24AM +0200, Jiri Slaby wrote:
>> On 14. 10. 24, 16:46, Christoph Hellwig wrote:
>>> Nothing in kfifo.h needs dma-mapping.h.  Drop the include to
>>> reduce include bloat.
>>
>> Except DMA_MAPPING_ERROR.
> 
> 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. Even though 
you do not explicitly use any other def from the dma header.

I know one will very likely include dma-mapping.h when using the macro. 
But that might not be a rule.

>> The header should stay self-contained.
> 
> It does with this patch.  You can include it as the only header
> in a source file and will work fine.  I've actually tried that.

Well, this is not a definition of self-containment. If you use every 
macro from a header and it does not need any other include, then it is 
self-contained.

-- 
js
suse labs


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ