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: <20230312184515.5eabc8df@hermes.local>
Date:   Sun, 12 Mar 2023 18:45:15 -0700
From:   Stephen Hemminger <stephen@...workplumber.org>
To:     Willem de Bruijn <willemdebruijn.kernel@...il.com>
Cc:     Jakub Kicinski <kuba@...nel.org>, netdev@...r.kernel.org,
        davem@...emloft.net, edumazet@...gle.com, pabeni@...hat.com,
        alexanderduyck@...com, roman.gushchin@...ux.dev
Subject: Re: [RFC net-next 1/3] net: provide macros for commonly copied
 lockless queue stop/wake code

On Sun, 12 Mar 2023 21:37:39 -0400
Willem de Bruijn <willemdebruijn.kernel@...il.com> wrote:

> Stephen Hemminger wrote:
> > On Fri, 10 Mar 2023 21:01:28 -0800
> > Jakub Kicinski <kuba@...nel.org> wrote:
> >   
> > > A lot of drivers follow the same scheme to stop / start queues
> > > without introducing locks between xmit and NAPI tx completions.
> > > I'm guessing they all copy'n'paste each other's code.
> > > 
> > > Smaller drivers shy away from the scheme and introduce a lock
> > > which may cause deadlocks in netpoll.
> > > 
> > > Provide macros which encapsulate the necessary logic.  
> > 
> > Could any of these be inline functions instead for type safety?  
> 
> I suppose not because of the condition that is evaluated.

It is more that the condition needs to evaluated after some other
pre-conditions.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ