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: <aQnHMyJYU4kuCWCf@localhost>
Date: Tue, 4 Nov 2025 10:28:19 +0100
From: Miroslav Lichvar <mlichvar@...hat.com>
To: "Jason A. Donenfeld" <Jason@...c4.com>
Cc: netdev@...r.kernel.org, Willem de Bruijn <willemb@...gle.com>
Subject: Re: [PATCH net-next v2] wireguard: queuing: preserve napi_id on
 decapsulation

On Mon, Nov 03, 2025 at 05:00:19PM +0100, Jason A. Donenfeld wrote:
> On Mon, Nov 3, 2025 at 11:34 AM Miroslav Lichvar <mlichvar@...hat.com> wrote:
> > +       } else {
> > +#ifdef CONFIG_NET_RX_BUSY_POLL
> > +               skb->napi_id = napi_id;
> > +#endif
> 
> It looks like io_uring has timestamping on tx, not just rx:
> SOCKET_URING_OP_TX_TIMESTAMP -> io_uring_cmd_timestamp ->
> io_process_timestamp_skb -> skb_get_tx_timestamp -> skb_napi_id

That doesn't seem to be reachable. skb_get_tx_timestamp() calls
get_timestamp()->skb_napi_id() only when the SKBTX_HW_TSTAMP_NETDEV
flag is set, which is done only by two drivers (tsnep, igc) and only
in the RX path. Using a tx_flags field for RX is slightly confusing.

> So are you sure this should be in an `else {` block?

Yes, at least for the use case with the timestamping option I'm trying
to fix. If it was outside of the else block, it would be copying the
sender_cpu field of the union (used by XPS). Maybe it would make sense
to do that too, I know nothing about XPS, but in that case the value
shouldn't be read by skb_napi_id(), which is enabled only by
CONFIG_NET_RX_BUSY_POLL.

-- 
Miroslav Lichvar


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ