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: <66f1c86bae4b5_3ee6fb2946c@willemb.c.googlers.com.notmuch>
Date: Mon, 23 Sep 2024 15:58:35 -0400
From: Willem de Bruijn <willemdebruijn.kernel@...il.com>
To: Florian Westphal <fw@...len.de>, 
 greearb@...delatech.com
Cc: netdev@...r.kernel.org, 
 dsahern@...nel.org
Subject: Re: [PATCH] Revert "vrf: Remove unnecessary RCU-bh critical section"

Florian Westphal wrote:
> greearb@...delatech.com <greearb@...delatech.com> wrote:
> > diff --git a/drivers/net/vrf.c b/drivers/net/vrf.c
> > index 4d8ccaf9a2b4..4087f72f0d2b 100644
> > --- a/drivers/net/vrf.c
> > +++ b/drivers/net/vrf.c
> > @@ -608,7 +608,9 @@ static void vrf_finish_direct(struct sk_buff *skb)
> >  		eth_zero_addr(eth->h_dest);
> >  		eth->h_proto = skb->protocol;
> >  
> > +		rcu_read_lock_bh();
> >  		dev_queue_xmit_nit(skb, vrf_dev);
> > +		rcu_read_unlock_bh();
> 
> [..]
> 
> > + *	BH must be disabled before calling this.
> 
> Can you replace the rcu_read_lock_bh with plain local_bh_enable/disable?
> I think that would make more sense.
> 
> Otherwise comment should explain why rcu read lock has to be held too,
> I see no reason for it.

This path should duplicate how __dev_queue_xmit calls
dev_queue_xmit_nit.



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ