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: <Z-qzLyGKskaqgFh5@mini-arch>
Date: Mon, 31 Mar 2025 08:22:23 -0700
From: Stanislav Fomichev <stfomichev@...il.com>
To: Wang Liang <wangliang74@...wei.com>
Cc: bjorn@...nel.org, magnus.karlsson@...el.com,
	maciej.fijalkowski@...el.com, jonathan.lemon@...il.com,
	davem@...emloft.net, edumazet@...gle.com, kuba@...nel.org,
	pabeni@...hat.com, horms@...nel.org, ast@...nel.org,
	daniel@...earbox.net, hawk@...nel.org, john.fastabend@...il.com,
	yuehaibing@...wei.com, zhangchangzhong@...wei.com,
	netdev@...r.kernel.org, bpf@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH net] xsk: correct tx_ring_empty_descs count statistics

On 03/29, Wang Liang wrote:
> The tx_ring_empty_descs count may be incorrect, when set the XDP_TX_RING
> option but do not reserve tx ring. Because xsk_poll() try to wakeup the
> driver by calling xsk_generic_xmit() for non-zero-copy mode. So the
> tx_ring_empty_descs count increases once the xsk_poll()is called:
> 
>   xsk_poll
>     xsk_generic_xmit
>       __xsk_generic_xmit
>         xskq_cons_peek_desc
>           xskq_cons_read_desc
>             q->queue_empty_descs++;
> 
> To avoid this count error, add check for tx descs before send msg in poll.
> 
> Fixes: df551058f7a3 ("xsk: Fix crash in poll when device does not support ndo_xsk_wakeup")
> Signed-off-by: Wang Liang <wangliang74@...wei.com>

Acked-by: Stanislav Fomichev <sdf@...ichev.me>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ