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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20190526.212914.2234426418598671959.davem@davemloft.net>
Date:   Sun, 26 May 2019 21:29:14 -0700 (PDT)
From:   David Miller <davem@...emloft.net>
To:     stephen@...workplumber.org
Cc:     jiri@...nulli.us, netdev@...r.kernel.org, sthemmin@...rosoft.com
Subject: Re: [PATCH v3 2/2] net: core: support XDP generic on stacked
 devices.

From: Stephen Hemminger <stephen@...workplumber.org>
Date: Thu, 23 May 2019 10:54:29 -0700

> @@ -4858,6 +4841,17 @@ static int __netif_receive_skb_core(struct sk_buff *skb, bool pfmemalloc,
>  
>  	__this_cpu_inc(softnet_data.processed);
>  
> +	if (static_branch_unlikely(&generic_xdp_needed_key)) {
> +		int ret2;
> +
> +		preempt_disable();
> +		ret2 = do_xdp_generic(rcu_dereference(skb->dev->xdp_prog), skb);
> +		preempt_enable();
> +
> +		if (ret2 != XDP_PASS)
> +			return NET_RX_DROP;
> +	}

This function just did a skb_reset_mac_len().

do_xdp_generic() can modify skb->mac_header.

This means we have to redo the skb_reset_mac_len() to handle the
potentially changed value.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ