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: <20230911180113.GA113013@kernel.org>
Date: Mon, 11 Sep 2023 20:01:13 +0200
From: Simon Horman <horms@...nel.org>
To: Shinas Rasheed <srasheed@...vell.com>
Cc: netdev@...r.kernel.org, linux-kernel@...r.kernel.org, hgani@...vell.com,
	vimleshk@...vell.com, mschmidt@...hat.com, egallen@...hat.com,
	Veerasenareddy Burru <vburru@...vell.com>,
	Sathesh Edara <sedara@...vell.com>,
	"David S. Miller" <davem@...emloft.net>,
	Eric Dumazet <edumazet@...gle.com>,
	Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
	Satananda Burla <sburla@...vell.com>,
	Abhijit Ayarekar <aayarekar@...vell.com>
Subject: Re: [net PATCH] octeon_ep: fix tx dma unmap len values in SG

On Mon, Sep 11, 2023 at 02:23:06AM -0700, Shinas Rasheed wrote:
> Lengths of SG pointers are in big-endian
> 
> Fixes: 37d79d059606 ("octeon_ep: add Tx/Rx processing and interrupt support")
> Signed-off-by: Shinas Rasheed <srasheed@...vell.com>
> ---
>  drivers/net/ethernet/marvell/octeon_ep/octep_tx.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/net/ethernet/marvell/octeon_ep/octep_tx.c b/drivers/net/ethernet/marvell/octeon_ep/octep_tx.c
> index 5a520d37bea0..7e99486c274b 100644
> --- a/drivers/net/ethernet/marvell/octeon_ep/octep_tx.c
> +++ b/drivers/net/ethernet/marvell/octeon_ep/octep_tx.c
> @@ -69,12 +69,12 @@ int octep_iq_process_completions(struct octep_iq *iq, u16 budget)
>  		compl_sg++;
>  
>  		dma_unmap_single(iq->dev, tx_buffer->sglist[0].dma_ptr[0],
> -				 tx_buffer->sglist[0].len[0], DMA_TO_DEVICE);
> +				 tx_buffer->sglist[0].len[3], DMA_TO_DEVICE);
>  
>  		i = 1; /* entry 0 is main skb, unmapped above */
>  		while (frags--) {
>  			dma_unmap_page(iq->dev, tx_buffer->sglist[i >> 2].dma_ptr[i & 3],
> -				       tx_buffer->sglist[i >> 2].len[i & 3], DMA_TO_DEVICE);
> +				       tx_buffer->sglist[i >> 2].len[3 - (i & 3)], DMA_TO_DEVICE);
>  			i++;
>  		}

Hi Shinas,

is this change also needed in octep_iq_process_completions() ?
The code there looks rather similar.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ