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: <584ACF82.5090609@arm.com>
Date:   Fri, 9 Dec 2016 15:36:34 +0000
From:   Vladimir Murzin <vladimir.murzin@....com>
To:     Benjamin Gaignard <benjamin.gaignard@...aro.org>,
        linux@...linux.org.uk, linux-arm-kernel@...ts.infradead.org,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Robin.Murphy@....com
Cc:     Catalin Marinas <catalin.marinas@....com>,
        Arnd Bergmann <arnd@...db.de>
Subject: Re: [PATCH] nommu: allow mmap when !CONFIG_MMU

On 09/12/16 15:27, Benjamin Gaignard wrote:
> + Vladimir

I'm not in DMA, but I can see that with your patch it deviates from
dma_common_mmap(), can you give more context, please?

Cheers
Vladimir

> 
> 2016-12-01 14:48 GMT+01:00 Benjamin Gaignard <benjamin.gaignard@...aro.org>:
>> commit ab6494f0c96f ("nommu: Add noMMU support to the DMA API") have
>> add CONFIG_MMU compilation flag but that prohibit to use dma_mmap_wc()
>> when the platform doesn't have MMU.
>>
>> This patch call vm_iomap_memory() in noMMU case to test if addresses
>> are correct and set wma->vm_flags rather than all return an error.
>>
>> Signed-off-by: Benjamin Gaignard <benjamin.gaignard@...aro.org>
>> Cc: Catalin Marinas <catalin.marinas@....com>
>> Cc: arnd@...db.de
>> ---
>>  arch/arm/mm/dma-mapping.c | 3 +++
>>  1 file changed, 3 insertions(+)
>>
>> diff --git a/arch/arm/mm/dma-mapping.c b/arch/arm/mm/dma-mapping.c
>> index ab4f745..230875e 100644
>> --- a/arch/arm/mm/dma-mapping.c
>> +++ b/arch/arm/mm/dma-mapping.c
>> @@ -868,6 +868,9 @@ static int __arm_dma_mmap(struct device *dev, struct vm_area_struct *vma,
>>                                       vma->vm_end - vma->vm_start,
>>                                       vma->vm_page_prot);
>>         }
>> +#else
>> +       ret = vm_iomap_memory(vma, vma->vm_start,
>> +                             (vma->vm_end - vma->vm_start));
>>  #endif /* CONFIG_MMU */
>>
>>         return ret;
>> --
>> 1.9.1
>>
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ