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: <20241006192332.00001973@gmail.com>
Date: Sun, 6 Oct 2024 19:27:52 +0800
From: Furong Xu <0x1207@...il.com>
To: Jakub Kicinski <kuba@...nel.org>
Cc: davem@...emloft.net, netdev@...r.kernel.org, edumazet@...gle.com,
 pabeni@...hat.com, Jon Hunter <jonathanh@...dia.com>,
 alexandre.torgue@...s.st.com, joabreu@...opsys.com,
 mcoquelin.stm32@...il.com, hawk@...nel.org
Subject: Re: [PATCH net] Revert "net: stmmac: set PP_FLAG_DMA_SYNC_DEV only
 if XDP is enabled"

On Fri,  4 Oct 2024 07:21:15 -0700, Jakub Kicinski <kuba@...nel.org> wrote:

> This reverts commit b514c47ebf41a6536551ed28a05758036e6eca7c.
> 
> The commit describes that we don't have to sync the page when
> recycling, and it tries to optimize that case. But we do need
> to sync after allocation. Recycling side should be changed to
> pass the right sync size instead.

Thanks for pointing this regression out.

I will send a new patch that passes the right sync size as you
suggested after this revert is applied to all affected
kernel versions to finish what I have stared :)

Reviewed-by: Furong Xu <0x1207@...il.com>

> 
> Fixes: b514c47ebf41 ("net: stmmac: set PP_FLAG_DMA_SYNC_DEV only if XDP is enabled")
> Reported-by: Jon Hunter <jonathanh@...dia.com>
> Link: https://lore.kernel.org/20241004070846.2502e9ea@kernel.org
> Signed-off-by: Jakub Kicinski <kuba@...nel.org>
> ---
> CC: alexandre.torgue@...s.st.com
> CC: joabreu@...opsys.com
> CC: mcoquelin.stm32@...il.com
> CC: hawk@...nel.org
> CC: 0x1207@...il.com
> ---
>  drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
> index e2140482270a..d3895d7eecfc 100644
> --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
> +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
> @@ -2035,7 +2035,7 @@ static int __alloc_dma_rx_desc_resources(struct stmmac_priv *priv,
>  	rx_q->queue_index = queue;
>  	rx_q->priv_data = priv;
>  
> -	pp_params.flags = PP_FLAG_DMA_MAP | (xdp_prog ? PP_FLAG_DMA_SYNC_DEV : 0);
> +	pp_params.flags = PP_FLAG_DMA_MAP | PP_FLAG_DMA_SYNC_DEV;
>  	pp_params.pool_size = dma_conf->dma_rx_size;
>  	num_pages = DIV_ROUND_UP(dma_conf->dma_buf_sz, PAGE_SIZE);
>  	pp_params.order = ilog2(num_pages);


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ