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]
Date:   Tue, 10 Mar 2020 23:53:28 +0000
From:   Saeed Mahameed <saeedm@...lanox.com>
To:     "kuba@...nel.org" <kuba@...nel.org>,
        "brouer@...hat.com" <brouer@...hat.com>
CC:     "kernel-team@...com" <kernel-team@...com>,
        Li Rongqing <lirongqing@...du.com>,
        "jonathan.lemon@...il.com" <jonathan.lemon@...il.com>,
        "davem@...emloft.net" <davem@...emloft.net>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        "ilias.apalodimas@...aro.org" <ilias.apalodimas@...aro.org>
Subject: Re: [PATCH] page_pool: use irqsave/irqrestore to protect ring access.

On Tue, 2020-03-10 at 14:09 -0700, Jakub Kicinski wrote:
> On Tue, 10 Mar 2020 11:04:12 +0100 Jesper Dangaard Brouer wrote:
> > On Tue, 10 Mar 2020 02:30:34 +0000
> > Saeed Mahameed <saeedm@...lanox.com> wrote:
> > > On Mon, 2020-03-09 at 17:55 -0700, David Miller wrote:  
> > > > From: Jonathan Lemon <jonathan.lemon@...il.com>
> > > > Date: Mon, 9 Mar 2020 12:49:29 -0700
> > > >     
> > > > > netpoll may be called from IRQ context, which may access the
> > > > > page pool ring.  The current _bh variants do not provide
> > > > > sufficient
> > > > > protection, so use irqsave/restore instead.
> > > > > 
> > > > > Error observed on a modified mlx4 driver, but the code path
> > > > > exists
> > > > > for any driver which calls page_pool_recycle from napi
> > > > > poll.  
> > 
> > Netpoll calls into drivers are problematic, nasty and annoying.
> > Drivers
> > usually catch netpoll calls via seeing NAPI budget is zero, and
> > handle
> > the situation inside the driver e.g.[1][2]. (even napi_consume_skb
> > catch it this way).
> 
> I'm probably just repeating what you said, but would it be reasonable
> to expect page_pool users to special-case XDP rings to not be
> cleaned?
> netpoll has no use for them.
> 

sounds like a better band-aid

> Perhaps that would not solve the issue for those funky drivers which
> use the same rings for both XDP and the stack. Sigh. Do we care about
> them?

They can special case per-page, if it is an XDP tx page, don't recycle
to ptr ring .. 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ