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: <685049c36304b_2150e229495@willemb.c.googlers.com.notmuch>
Date: Mon, 16 Jun 2025 12:43:47 -0400
From: Willem de Bruijn <willemdebruijn.kernel@...il.com>
To: Pavel Begunkov <asml.silence@...il.com>, 
 Willem de Bruijn <willemdebruijn.kernel@...il.com>, 
 io-uring@...r.kernel.org, 
 Vadim Fedorenko <vadim.fedorenko@...ux.dev>
Cc: netdev@...r.kernel.org, 
 Eric Dumazet <edumazet@...gle.com>, 
 Kuniyuki Iwashima <kuniyu@...zon.com>, 
 Paolo Abeni <pabeni@...hat.com>, 
 Willem de Bruijn <willemb@...gle.com>, 
 "David S . Miller" <davem@...emloft.net>, 
 Jakub Kicinski <kuba@...nel.org>, 
 Richard Cochran <richardcochran@...il.com>, 
 Stanislav Fomichev <sdf@...ichev.me>, 
 Jason Xing <kerneljasonxing@...il.com>
Subject: Re: [PATCH v5 1/5] net: timestamp: add helper returning skb's tx
 tstamp

Pavel Begunkov wrote:
> On 6/16/25 16:01, Willem de Bruijn wrote:
> > Pavel Begunkov wrote:
> >> Add a helper function skb_get_tx_timestamp() that returns a tx timestamp
> >> associated with an error queue skb.
> >>
> >> Signed-off-by: Pavel Begunkov <asml.silence@...il.com>
> >> ---
> >>   include/net/sock.h |  4 ++++
> >>   net/socket.c       | 46 ++++++++++++++++++++++++++++++++++++++++++++++
> >>   2 files changed, 50 insertions(+)
> >>
> >> diff --git a/include/net/sock.h b/include/net/sock.h
> >> index 92e7c1aae3cc..f5f5a9ad290b 100644
> >> --- a/include/net/sock.h
> >> +++ b/include/net/sock.h
> >> @@ -2677,6 +2677,10 @@ void __sock_recv_timestamp(struct msghdr *msg, struct sock *sk,
> >>   void __sock_recv_wifi_status(struct msghdr *msg, struct sock *sk,
> >>   			     struct sk_buff *skb);
> >>   
> >> +bool skb_has_tx_timestamp(struct sk_buff *skb, const struct sock *sk);
> >> +int skb_get_tx_timestamp(struct sk_buff *skb, struct sock *sk,
> >> +			 struct timespec64 *ts);
> >> +
> >>   static inline void
> >>   sock_recv_timestamp(struct msghdr *msg, struct sock *sk, struct sk_buff *skb)
> >>   {
> >> diff --git a/net/socket.c b/net/socket.c
> >> index 9a0e720f0859..2cab805943c0 100644
> >> --- a/net/socket.c
> >> +++ b/net/socket.c
> >> @@ -843,6 +843,52 @@ static void put_ts_pktinfo(struct msghdr *msg, struct sk_buff *skb,
> >>   		 sizeof(ts_pktinfo), &ts_pktinfo);
> >>   }
> >>   
> >> +bool skb_has_tx_timestamp(struct sk_buff *skb, const struct sock *sk)
> >> +{
> > 
> > I forgot to ask earlier, and not a reason for a respin.
> > 
> > Is the only reason that skb is not const here skb_hwtstamps?
> 
> Yes, and also get_timestamp() for skb_get_tx_timestamp(). It's easy to patch,
> but I was hoping we can merge it through the io_uring tree without deps on
> net-next and add const to the new helpers after. It's definitely less trouble
> than orchestrating a separate branch otherwise.

Makes sense.

> FWIW, it'd be fine to add
> const to the existing helpers in the meantime as long as the new functions
> stay non-const for now. Hope that works

Yeah, agreed no need to add such dependencies.

> -- 
> Pavel Begunkov
> 



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ