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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAGXJAmy3xy1hVjFAVjVS=diYLeOTV1kQ9wGQ1usoDa1D5xk0Gg@mail.gmail.com>
Date: Mon, 1 Sep 2025 13:21:18 -0700
From: John Ousterhout <ouster@...stanford.edu>
To: Paolo Abeni <pabeni@...hat.com>
Cc: netdev@...r.kernel.org, edumazet@...gle.com, horms@...nel.org, 
	kuba@...nel.org
Subject: Re: [PATCH net-next v15 10/15] net: homa: create homa_outgoing.c

On Tue, Aug 26, 2025 at 4:50 AM Paolo Abeni <pabeni@...hat.com> wrote:

> > +/**
> > + * homa_rpc_tx_end() - Return the offset of the first byte in an
> > + * RPC's outgoing message that has not yet been fully transmitted.
> > + * "Fully transmitted" means the message has been transmitted by the
> > + * NIC and the skb has been released by the driver. This is different from
> > + * rpc->msgout.next_xmit_offset, which computes the first offset that
> > + * hasn't yet been passed to the IP stack.
> > + * @rpc:    RPC to check
> > + * Return:  See above. If the message has been fully transmitted then
> > + *          rpc->msgout.length is returned.
> > + */
> > +int homa_rpc_tx_end(struct homa_rpc *rpc)
> > +{
> > +     struct sk_buff *skb = rpc->msgout.first_not_tx;
> > +
> > +     while (skb) {
> > +             struct homa_skb_info *homa_info = homa_get_skb_info(skb);
> > +
> > +             /* next_xmit_offset tells us whether the packet has been
> > +              * passed to the IP stack. Checking the reference count tells
> > +              * us whether the packet has been released by the driver
> > +              * (which only happens after notification from the NIC that
> > +              * transmission is complete).
> > +              */
> > +             if (homa_info->offset >= rpc->msgout.next_xmit_offset ||
> > +                 refcount_read(&skb->users) > 1)
> > +                     return homa_info->offset;
>
> Pushing skbs with refcount > 1 into the tx stack calls for trouble. You
> should instead likely clone the tx skb.

Can you say more about what the problems are? So far I have not
encountered any issues and this approach is pretty useful (it will
become even more useful with additional Homa mechanisms that aren't in
this patch).

I have fixed all of the other comments on this patch in the way you suggested.

-John-

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ