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: <20200125080509.x5onhuib3xoxuubo@SvensMacBookAir.sven.lan>
Date:   Sat, 25 Jan 2020 08:05:13 +0000
From:   Sven Auhagen <sven.auhagen@...eatech.de>
To:     Florian Fainelli <f.fainelli@...il.com>
CC:     "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        "lorenzo.bianconi@...hat.com" <lorenzo.bianconi@...hat.com>,
        "davem@...emloft.net" <davem@...emloft.net>,
        "thomas.petazzoni@...tlin.com" <thomas.petazzoni@...tlin.com>,
        "brouer@...hat.com" <brouer@...hat.com>,
        "ilias.apalodimas@...aro.org" <ilias.apalodimas@...aro.org>,
        "matteo.croce@...hat.com" <matteo.croce@...hat.com>,
        "jakub.kicinski@...ronome.com" <jakub.kicinski@...ronome.com>
Subject: Re: [PATCH v4] mvneta driver disallow XDP program on hardware buffer
 management

On Fri, Jan 24, 2020 at 10:03:53AM -0800, Florian Fainelli wrote:
> On 1/23/20 11:26 PM, Sven Auhagen wrote:
> > Recently XDP Support was added to the mvneta driver
> > for software buffer management only.
> > It is still possible to attach an XDP program if
> > hardware buffer management is used.
> > It is not doing anything at that point.
> > 
> > The patch disallows attaching XDP programs to mvneta
> > if hardware buffer management is used.
> > 
> > Signed-off-by: Sven Auhagen <sven.auhagen@...eatech.de>
> > 
> > diff --git a/drivers/net/ethernet/marvell/mvneta.c b/drivers/net/ethernet/marvell/mvneta.c
> > index 71a872d46bc4..96593b9fbd9b 100644
> > --- a/drivers/net/ethernet/marvell/mvneta.c
> > +++ b/drivers/net/ethernet/marvell/mvneta.c
> > @@ -4225,6 +4225,12 @@ static int mvneta_xdp_setup(struct net_device *dev, struct bpf_prog *prog,
> >  		return -EOPNOTSUPP;
> >  	}
> >  
> > +		if (pp->bm_priv) {
> > +			NL_SET_ERR_MSG_MOD(extack,
> > +					   "Hardware Buffer Management not supported on XDP");
> > +			return -EOPNOTSUPP;
> > +		}
> 
> Your indentation is still a bit off here, looks like you have one too
> many tabs. This is what we would expect:

Ah sorry I missed it.
I will resubmit with the corrected tab size.

Best
Sven

> 
> 	if (pp->bm_priv) {
> 	}
> 
> > +
> >  	need_update = !!pp->xdp_prog != !!prog;
> >  	if (running && need_update)
> >  		mvneta_stop(dev);
> > 
> 
> 
> -- 
> Florian

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ