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: <7f544c68-721c-bbcc-3614-cbadce7261a9@arm.com>
Date:   Tue, 29 Jun 2021 13:52:14 +0100
From:   Robin Murphy <robin.murphy@....com>
To:     Claire Chang <tientzu@...omium.org>, konrad.wilk@...cle.com,
        hch@....de, m.szyprowski@...sung.com,
        Will Deacon <will@...nel.org>, sstabellini@...nel.org
Cc:     iommu@...ts.linux-foundation.org, linux-kernel@...r.kernel.org,
        tfiga@...omium.org, Nicolas Boichat <drinkcat@...omium.org>,
        kernel test robot <lkp@...el.com>
Subject: Re: [PATCH v2] swiotlb: fix implicit debugfs_create_dir declaration

On 2021-06-29 13:16, Claire Chang wrote:
> Remove the ifdef to fix implicit function declaration for other pools.
> 
> Fixes: 1d9f94400a7a ("swiotlb: Refactor swiotlb_create_debugfs")

There doesn't appear to be a problem with that commit - AFAICS it's 
461021875c50 ("swiotlb: Add restricted DMA pool initialization") which 
introduces a reference to debugfs_create_dir() outside the existing 
#ifdef guards.

FWIW (assuming it's the real problem) I'd be inclined to factor out the 
debugfs bits from rmem_swiotlb_device_init() into a separate 
rmem_swiotlb_debugfs_init() (or similar) function which can live 
alongside the others under the #ifdef and be stubbed out in an #else case.

Robin.

> Reported-by: kernel test robot <lkp@...el.com>
> Signed-off-by: Claire Chang <tientzu@...omium.org>
> ---
>   kernel/dma/swiotlb.c | 5 -----
>   1 file changed, 5 deletions(-)
> 
> diff --git a/kernel/dma/swiotlb.c b/kernel/dma/swiotlb.c
> index 0ffbaae9fba2..8ae0bef392c3 100644
> --- a/kernel/dma/swiotlb.c
> +++ b/kernel/dma/swiotlb.c
> @@ -36,9 +36,7 @@
>   #include <linux/scatterlist.h>
>   #include <linux/mem_encrypt.h>
>   #include <linux/set_memory.h>
> -#ifdef CONFIG_DEBUG_FS
>   #include <linux/debugfs.h>
> -#endif
>   #ifdef CONFIG_DMA_RESTRICTED_POOL
>   #include <linux/io.h>
>   #include <linux/of.h>
> @@ -686,7 +684,6 @@ bool is_swiotlb_active(struct device *dev)
>   }
>   EXPORT_SYMBOL_GPL(is_swiotlb_active);
>   
> -#ifdef CONFIG_DEBUG_FS
>   static struct dentry *debugfs_dir;
>   
>   static void swiotlb_create_debugfs_files(struct io_tlb_mem *mem)
> @@ -709,8 +706,6 @@ static int __init swiotlb_create_default_debugfs(void)
>   
>   late_initcall(swiotlb_create_default_debugfs);
>   
> -#endif
> -
>   #ifdef CONFIG_DMA_RESTRICTED_POOL
>   struct page *swiotlb_alloc(struct device *dev, size_t size)
>   {
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ