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]
Date:   Sun, 23 Apr 2017 21:05:06 -0700
From:   Jakub Kicinski <kubakici@...pl>
To:     John Fastabend <john.fastabend@...il.com>
Cc:     jeffrey.t.kirsher@...el.com, netdev@...r.kernel.org
Subject: Re: [PATCH 1/2] ixgbe: add XDP support for pass and drop actions

Hi!

On Sun, 23 Apr 2017 18:31:19 -0700, John Fastabend wrote:
> +static int ixgbe_xdp_setup(struct net_device *dev, struct bpf_prog *prog)
> +{
> +	int i, frame_size = dev->mtu + ETH_HLEN + ETH_FCS_LEN + VLAN_HLEN;
> +	struct ixgbe_adapter *adapter = netdev_priv(dev);
> +	struct bpf_prog *old_prog;
> +
> +	if (adapter->flags & IXGBE_FLAG_SRIOV_ENABLED)
> +		return -EINVAL;
> +
> +	if (adapter->flags & IXGBE_FLAG_DCB_ENABLED)
> +		return -EINVAL;
> +
> +	/* verify ixgbe ring attributes are sufficient for XDP */
> +	for (i = 0; i < adapter->num_rx_queues; i++) {
> +		struct ixgbe_ring *ring = adapter->rx_ring[i];
> +
> +		if (ring_is_rsc_enabled(ring))
> +			return -EINVAL;
> +
> +		if (frame_size > ixgbe_rx_bufsz(ring))
> +			return -EINVAL;
> +	}

I was just looking through the drivers, working on extended ack
reporting, trying to bring out the driver XDP error messages out
directly to iproute2.  It seems that multiple drivers are only 
checking that MTU/buffer size is appropriate in the XDP_SETUP 
function, and ignore XDP in case user tries to change MTU later.  
And I think it's the same story with LRO?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ