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  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]
Date:   Wed, 15 Jul 2020 17:22:50 -0700
From:   Jakub Kicinski <kuba@...nel.org>
To:     Willem de Bruijn <willemdebruijn.kernel@...il.com>
Cc:     John Ogness <john.ogness@...utronix.de>,
        "David S . Miller" <davem@...emloft.net>,
        Sebastian Andrzej Siewior <bigeasy@...utronix.de>,
        Thomas Gleixner <tglx@...utronix.de>,
        Network Development <netdev@...r.kernel.org>,
        linux-kernel <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] af_packet: TPACKET_V3: replace busy-wait loop

On Wed, 15 Jul 2020 18:35:00 -0400 Willem de Bruijn wrote:
> On Wed, Jul 15, 2020 at 4:21 PM Jakub Kicinski <kuba@...nel.org> wrote:
> >
> > On Tue,  7 Jul 2020 17:28:04 +0206 John Ogness wrote:  
> > > A busy-wait loop is used to implement waiting for bits to be copied
> > > from the skb to the kernel buffer before retiring a block. This is
> > > a problem on PREEMPT_RT because the copying task could be preempted
> > > by the busy-waiting task and thus live lock in the busy-wait loop.
> > >
> > > Replace the busy-wait logic with an rwlock_t. This provides lockdep
> > > coverage and makes the code RT ready.
> > >
> > > Signed-off-by: John Ogness <john.ogness@...utronix.de>  
> >
> > Is taking a lock and immediately releasing it better than a completion?
> > Seems like the lock is guaranteed to dirty a cache line, which would
> > otherwise be avoided here.
> >
> > Willem, would you be able to take a look as well? Is this path
> > performance sensitive in real life?  
> 
> No objections from me.
> 
> I guess this resolves the issue on preempt_rt, because the spinlocks act as
> mutexes. It will still spin on write_lock otherwise, no huge difference from
> existing logic.

Thanks!

If no one else objects I'm putting this in net-next.

Seems a little late for 5.8.

Powered by blists - more mailing lists