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: <YtaH523Jz39smaNO@localhost.localdomain>
Date:   Tue, 19 Jul 2022 12:31:03 +0200
From:   Lorenzo Bianconi <lorenzo.bianconi@...hat.com>
To:     Paolo Abeni <pabeni@...hat.com>
Cc:     Lorenzo Bianconi <lorenzo@...nel.org>, netdev@...r.kernel.org,
        nbd@....name, john@...ozen.org, sean.wang@...iatek.com,
        Mark-MC.Lee@...iatek.com, davem@...emloft.net, edumazet@...gle.com,
        kuba@...nel.org, matthias.bgg@...il.com,
        linux-mediatek@...ts.infradead.org, ilias.apalodimas@...aro.org,
        jbrouer@...hat.com
Subject: Re: [PATCH v3 net-next 2/5] net: ethernet: mtk_eth_soc: add basic
 XDP support

> On Sat, 2022-07-16 at 09:34 +0200, Lorenzo Bianconi wrote:
> > Introduce basic XDP support to mtk_eth_soc driver.
> > Supported XDP verdicts:
> > - XDP_PASS
> > - XDP_DROP
> > - XDP_REDIRECT
> > 
> > Signed-off-by: Lorenzo Bianconi <lorenzo@...nel.org>
> > ---
> >  drivers/net/ethernet/mediatek/mtk_eth_soc.c | 147 +++++++++++++++++---
> >  drivers/net/ethernet/mediatek/mtk_eth_soc.h |   2 +
> >  2 files changed, 131 insertions(+), 18 deletions(-)
> > 
> > diff --git a/drivers/net/ethernet/mediatek/mtk_eth_soc.c b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
> > index 9a92d602ebd5..bc3a7dcab207 100644
> > --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
> > +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
> > @@ -1494,11 +1494,44 @@ static void mtk_rx_put_buff(struct mtk_rx_ring *ring, void *data, bool napi)
> >  		skb_free_frag(data);
> >  }
> >  
> > +static u32 mtk_xdp_run(struct mtk_eth *eth, struct mtk_rx_ring *ring,
> > +		       struct xdp_buff *xdp, struct net_device *dev)
> > +{
> > +	struct bpf_prog *prog = rcu_dereference(eth->prog);
> 
> It looks like here you need to acquire the RCU read lock. lockdep
> should splat otherwise.

ack, I will fix it in the next version.

Regards,
Lorenzo

> 
> /P
> 

Download attachment "signature.asc" of type "application/pgp-signature" (229 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ