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:	Thu, 23 Oct 2014 10:15:44 +0200
From:	Marek Szyprowski <m.szyprowski@...sung.com>
To:	Laura Abbott <lauraa@...eaurora.org>,
	Stefan Hengelein <stefan.hengelein@....de>
Cc:	linux-kernel@...r.kernel.org, linux@....linux.org.uk,
	akpm@...ux-foundation.org, linux-arm-kernel@...ts.infradead.org,
	andreas.herrmann@...xeda.com,
	Valentin Rothberg <valentinrothberg@...il.com>,
	iommu@...ts.linux-foundation.org
Subject: Re: [PATCH] arm: dma-mapping: fix compilation error when CONFIG_MMU is
 not present

Hello,

On 2014-10-21 02:05, Laura Abbott wrote:
> On 10/20/2014 6:50 AM, Stefan Hengelein wrote:
>> Well,
>>
>> arch/arm/mm/dma-mapping.c: In function ‘__atomic_get_pages’:
>> arch/arm/mm/dma-mapping.c:1265:31: error: ‘atomic_pool’ undeclared
>> (first use in this function)
>>
>> arch/arm/mm/dma-mapping.c: In function ‘__iommu_get_pages’:
>> arch/arm/mm/dma-mapping.c:1275:2: error: implicit declaration of
>> function ‘__in_atomic_pool’ [-Werror=implicit-function-declaration]
>>
>>
>> others:
>> arch/arm/mm/dma-mapping.c: In function ‘__iommu_alloc_remap’:
>> arch/arm/mm/dma-mapping.c:1200:4: error: ‘VM_ARM_DMA_CONSISTENT’
>> undeclared (first use in this function)
>> arch/arm/mm/dma-mapping.c:1200:4: note: each undeclared identifier is
>> reported only once for each function it appears in
>>
>> arch/arm/mm/dma-mapping.c: In function ‘__iommu_get_pages’:
>> arch/arm/mm/dma-mapping.c:1282:29: error: ‘VM_ARM_DMA_CONSISTENT’
>> undeclared (first use in this function)
>> arch/arm/mm/dma-mapping.c: In function ‘arm_iommu_free_attrs’:
>> arch/arm/mm/dma-mapping.c:1411:4: error: ‘VM_ARM_DMA_CONSISTENT’
>> undeclared (first use in this function)
>>
>>
>> i've attached a configuration where it happens.
>> when you place the configuration in your tree and compile the file,
>> the errors should show up.
>>
>> However, within the configuration CONFIG_ARM_DMA_USE_IOMMU is defined
>> and CONFIG_MMU is not. AFAIUI, if both should be enabled together, it
>> should be mapped in Kconfig somewhere, right?
>
> There isn't a nice way to fixup the dma consistent flags so I would
> say this option should just depend on MMU.

The question is which option should depend on MMU? Making 
CONFIG_ARM_DMA_USE_IOMMU
to depend on MMU doesn't solve this case. It only gives following 
warning with the
mentioned .config:
warning: (VIDEO_OMAP3 && EXYNOS_IOMMU && SHMOBILE_IOMMU && IPMMU_VMSA && 
ARM_SMMU) selects ARM_DMA_USE_IOMMU which has unmet direct dependencies 
(MMU)

IMHO the best solution will be to either make the whole IOMMU subsystem 
to depend
on MMU or alternatively, add this dependency to all IOMMU drivers which 
can be
enabled by COMPILE_TEST option (here the issue is caused by 
SHMOBILE_IOMMU, which
otherwise cannot be enabled when no-mmu systems are selected).

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