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: <6e4732eb-9eaf-7e5b-863c-d3faa47bb513@arm.com>
Date:   Wed, 10 Jan 2018 11:07:55 +0000
From:   Robin Murphy <robin.murphy@....com>
To:     Christoph Hellwig <hch@....de>, iommu@...ts.linux-foundation.org
Cc:     linux-mips@...ux-mips.org, linux-ia64@...r.kernel.org,
        linux-sh@...r.kernel.org, sparclinux@...r.kernel.org,
        Guan Xuetao <gxt@...c.pku.edu.cn>, linux-arch@...r.kernel.org,
        linux-s390@...r.kernel.org, linux-c6x-dev@...ux-c6x.org,
        linux-hexagon@...r.kernel.org, x86@...nel.org,
        Konrad Rzeszutek Wilk <konrad@...nok.org>,
        linux-snps-arc@...ts.infradead.org,
        linux-m68k@...ts.linux-m68k.org, patches@...ups.riscv.org,
        linux-metag@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
        Michal Simek <monstr@...str.eu>, linux-parisc@...r.kernel.org,
        linux-cris-kernel@...s.com, linux-kernel@...r.kernel.org,
        linux-alpha@...r.kernel.org, linuxppc-dev@...ts.ozlabs.org
Subject: Re: [PATCH 09/33] dma-mapping: take dma_pfn_offset into account in
 dma_max_pfn

On 10/01/18 08:00, Christoph Hellwig wrote:
> This makes sure the generic version can be used with architectures /
> devices that have a DMA offset in the direct mapping.

Reviewed-by: Robin Murphy <robin.murphy@....com>

> Signed-off-by: Christoph Hellwig <hch@....de>
> ---
>   include/linux/dma-mapping.h | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/include/linux/dma-mapping.h b/include/linux/dma-mapping.h
> index 81ed9b2d84dc..d84951865be7 100644
> --- a/include/linux/dma-mapping.h
> +++ b/include/linux/dma-mapping.h
> @@ -692,7 +692,7 @@ static inline int dma_set_seg_boundary(struct device *dev, unsigned long mask)
>   #ifndef dma_max_pfn
>   static inline unsigned long dma_max_pfn(struct device *dev)
>   {
> -	return *dev->dma_mask >> PAGE_SHIFT;
> +	return (*dev->dma_mask >> PAGE_SHIFT) + dev->dma_pfn_offset;
>   }
>   #endif
>   
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ