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:   Wed, 11 Jul 2018 09:03:42 -0700
From:   Paul Burton <paul.burton@...s.com>
To:     Thomas Bogendoerfer <tbogendoerfer@...e.de>
Cc:     Ralf Baechle <ralf@...ux-mips.org>,
        James Hogan <jhogan@...nel.org>, linux-mips@...ux-mips.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/2] mips: Fix mips_dma_map_sg by using correct dma
 mapping function

Hi Thomas,

On Wed, Jul 11, 2018 at 01:38:51PM +0200, Thomas Bogendoerfer wrote:
> sg list elements could cover more than one page of data. Therefore
> using plat_map_dma_mem_page() doesn't work for platforms, which have
> IOMMU functionality hidden behind plat_map_dma_XXX functions.
> 
> Fixes: e36863a550da ("MIPS: HIGHMEM DMA on noncoherent MIPS32 processors")
> Signed-off-by: Thomas Bogendoerfer <tbogendoerfer@...e.de>
> ---
>  arch/mips/mm/dma-default.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/mips/mm/dma-default.c b/arch/mips/mm/dma-default.c
> index f9fef0028ca2..2718185a3d38 100644
> --- a/arch/mips/mm/dma-default.c
> +++ b/arch/mips/mm/dma-default.c
> @@ -288,8 +288,8 @@ static int mips_dma_map_sg(struct device *dev, struct scatterlist *sglist,
>  #ifdef CONFIG_NEED_SG_DMA_LENGTH
>  		sg->dma_length = sg->length;
>  #endif
> -		sg->dma_address = plat_map_dma_mem_page(dev, sg_page(sg)) +
> -				  sg->offset;
> +		sg->dma_address = plat_map_dma_mem(dev, sg_virt(sg),
> +						   sg->length);
>  	}
>  
>  	return nents;

This doesn't apply after Christoph's massive MIPS DMA cleanup which can
be found in mips-next (or linux-next). After this work we end up using
the generic dma_direct_map_sg() on most systems, and the code above has
been removed.

Thanks,
    Paul

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ