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] [day] [month] [year] [list]
Message-ID: <20250724115722.GK1150792@horms.kernel.org>
Date: Thu, 24 Jul 2025 12:57:22 +0100
From: Simon Horman <horms@...nel.org>
To: Harshitha Ramamurthy <hramamurthy@...gle.com>
Cc: netdev@...r.kernel.org, jeroendb@...gle.com, andrew+netdev@...n.ch,
	davem@...emloft.net, edumazet@...gle.com, kuba@...nel.org,
	pabeni@...hat.com, willemb@...gle.com, pkaligineedi@...gle.com,
	joshwash@...gle.com, linux-kernel@...r.kernel.org,
	Mina Almasry <almasrymina@...gle.com>,
	Ziwei Xiao <ziweixiao@...gle.com>
Subject: Re: [PATCH net-next] gve: support unreadable netmem

On Wed, Jul 23, 2025 at 10:28:29PM +0000, Harshitha Ramamurthy wrote:

...

> diff --git a/drivers/net/ethernet/google/gve/gve_rx_dqo.c b/drivers/net/ethernet/google/gve/gve_rx_dqo.c

...

> @@ -793,13 +811,19 @@ static int gve_rx_dqo(struct napi_struct *napi, struct gve_rx_ring *rx,
>  		rx->rx_hsplit_unsplit_pkt += unsplit;
>  		rx->rx_hsplit_bytes += hdr_len;
>  		u64_stats_update_end(&rx->statss);
> +	} else if (!rx->ctx.skb_head && rx->dqo.page_pool &&
> +		   netmem_is_net_iov(buf_state->page_info.netmem)) {
> +		/* when header split is disabled, the header went to the packet
> +		 * buffer. If the packet buffer is a net_iov, those can't be
> +		 * easily mapped into the kernel space to access the header
> +		 * required to process the packet.
> +		 */
> +		gve_free_buffer(rx, buf_state);
> +		return -EFAULT;

nit: I think it would be nice to consistently handle error paths
     in this function using goto error.

>  	}
>  
>  	/* Sync the portion of dma buffer for CPU to read. */
> -	dma_sync_single_range_for_cpu(&priv->pdev->dev, buf_state->addr,
> -				      buf_state->page_info.page_offset +
> -				      buf_state->page_info.pad,
> -				      buf_len, DMA_FROM_DEVICE);
> +	gve_dma_sync(priv, rx, buf_state, buf_len);
>  
>  	/* Append to current skb if one exists. */
>  	if (rx->ctx.skb_head) {

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ