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: <20190628.094457.246058762133976195.davem@davemloft.net>
Date:   Fri, 28 Jun 2019 09:44:57 -0700 (PDT)
From:   David Miller <davem@...emloft.net>
To:     brouer@...hat.com
Cc:     ilias.apalodimas@...aro.org, netdev@...r.kernel.org,
        jaswinder.singh@...aro.org, ard.biesheuvel@...aro.org,
        bjorn.topel@...el.com, magnus.karlsson@...el.com,
        daniel@...earbox.net, ast@...nel.org,
        makita.toshiaki@....ntt.co.jp, jakub.kicinski@...ronome.com,
        john.fastabend@...il.com, maciejromanfijalkowski@...il.com
Subject: Re: [PATCH 3/3, net-next] net: netsec: add XDP support

From: Jesper Dangaard Brouer <brouer@...hat.com>
Date: Fri, 28 Jun 2019 15:35:52 +0200

> On Fri, 28 Jun 2019 13:39:15 +0300
> Ilias Apalodimas <ilias.apalodimas@...aro.org> wrote:
> 
>> +static int netsec_xdp_setup(struct netsec_priv *priv, struct bpf_prog *prog,
>> +			    struct netlink_ext_ack *extack)
>> +{
>> +	struct net_device *dev = priv->ndev;
>> +	struct bpf_prog *old_prog;
>> +
>> +	/* For now just support only the usual MTU sized frames */
>> +	if (prog && dev->mtu > 1500) {
>> +		NL_SET_ERR_MSG_MOD(extack, "Jumbo frames not supported on XDP");
>> +		return -EOPNOTSUPP;
>> +	}
>> +
>> +	if (netif_running(dev))
>> +		netsec_netdev_stop(dev);
>> +
>> +	/* Detach old prog, if any */
>> +	old_prog = xchg(&priv->xdp_prog, prog);
>> +	if (old_prog)
>> +		bpf_prog_put(old_prog);
>> +
>> +	if (netif_running(dev))
>> +		netsec_netdev_open(dev);
> 
> Shouldn't the if-statement be if (!netif_running(dev))

Hmmm, does netsec_netdev_stop() clear the running flag?  That just
runs the driver internal routine and doesn't update IFF_UP et
al. which the core networking would do.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ