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]
Date:	Mon, 20 Oct 2014 09:42:55 +0200
From:	Marek Szyprowski <m.szyprowski@...sung.com>
To:	Stefan Hengelein <stefan.hengelein@....de>,
	linux-kernel@...r.kernel.org
Cc:	linux@....linux.org.uk, akpm@...ux-foundation.org,
	lauraa@...eaurora.org, linux-arm-kernel@...ts.infradead.org,
	andreas.herrmann@...xeda.com
Subject: Re: [PATCH] arm: dma-mapping: fix compilation error when CONFIG_MMU is
 not present

Hello,

On 2014-10-19 17:59, Stefan Hengelein wrote:
> When CONFIG_MMU is not present, the variable 'atomic_pool' and the
> function '__in_atomic_pool' are undeclared but used in part of the
> code. Therefore, the compilation breaks.
> Now, they are defined to dummy values when CONFIG_MMU is undefined.
>
> This error was found with vampyr.

Frankly, those variables are used only when CONFIG_MMU or
CONFIG_ARM_DMA_USE_IOMMU are set. The latter imho makes only sense
together with CONFIG_MMU, so the issue reported here doesn't really
happen in real world.

> Signed-off-by: Stefan Hengelein <stefan.hengelein@....de>
> ---
>   arch/arm/mm/dma-mapping.c | 2 ++
>   1 file changed, 2 insertions(+)
>
> diff --git a/arch/arm/mm/dma-mapping.c b/arch/arm/mm/dma-mapping.c
> index c245d90..7d04cf7 100644
> --- a/arch/arm/mm/dma-mapping.c
> +++ b/arch/arm/mm/dma-mapping.c
> @@ -573,12 +573,14 @@ static inline pgprot_t __get_dma_pgprot(struct dma_attrs *attrs, pgprot_t prot)
>   #else	/* !CONFIG_MMU */
>   
>   #define nommu() 1
> +#define atomic_pool 0
>   
>   #define __get_dma_pgprot(attrs, prot)	__pgprot(0)
>   #define __alloc_remap_buffer(dev, size, gfp, prot, ret, c)	NULL
>   #define __alloc_from_pool(size, ret_page)			NULL
>   #define __alloc_from_contiguous(dev, size, prot, ret, c)	NULL
>   #define __free_from_pool(cpu_addr, size)			0
> +#define __in_atomic_pool(start, size)				0
>   #define __free_from_contiguous(dev, page, cpu_addr, size)	do { } while (0)
>   #define __dma_free_remap(cpu_addr, size)			do { } while (0)
>   

Best regards
-- 
Marek Szyprowski, PhD
Samsung R&D Institute Poland

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ