From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.linuxfoundation.org ([140.211.169.12]:53598 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753728AbdJIHeQ (ORCPT ); Mon, 9 Oct 2017 03:34:16 -0400 Subject: Patch "net: change skb->mac_header when Generic XDP calls adjust_head" has been added to the 4.13-stable tree To: ecree@solarflare.com, davem@davemloft.net, gregkh@linuxfoundation.org Cc: , From: Date: Mon, 09 Oct 2017 09:34:08 +0200 Message-ID: <150753444851154@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org List-ID: This is a note to let you know that I've just added the patch titled net: change skb->mac_header when Generic XDP calls adjust_head to the 4.13-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: net-change-skb-mac_header-when-generic-xdp-calls-adjust_head.patch and it can be found in the queue-4.13 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let know about it. >>From foo@baz Mon Oct 9 09:32:35 CEST 2017 From: Edward Cree Date: Tue, 19 Sep 2017 18:45:56 +0100 Subject: net: change skb->mac_header when Generic XDP calls adjust_head From: Edward Cree [ Upstream commit 92dd5452c1be873a1193561f4f691763103d22ac ] Since XDP's view of the packet includes the MAC header, moving the start- of-packet with bpf_xdp_adjust_head needs to also update the offset of the MAC header (which is relative to skb->head, not to the skb->data that was changed). Without this, tcpdump sees packets starting from the old MAC header rather than the new one, at least in my tests on the loopback device. Fixes: b5cdae3291f7 ("net: Generic XDP") Signed-off-by: Edward Cree Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- net/core/dev.c | 1 + 1 file changed, 1 insertion(+) --- a/net/core/dev.c +++ b/net/core/dev.c @@ -4408,6 +4408,7 @@ static u32 netif_receive_generic_xdp(str __skb_pull(skb, off); else if (off < 0) __skb_push(skb, -off); + skb->mac_header += off; switch (act) { case XDP_TX: Patches currently in stable-queue which might be from ecree@solarflare.com are queue-4.13/net-change-skb-mac_header-when-generic-xdp-calls-adjust_head.patch queue-4.13/bpf-verifier-reject-bpf_alu64-bpf_end.patch