* Patch "net: change skb->mac_header when Generic XDP calls adjust_head" has been added to the 4.13-stable tree
@ 2017-10-09 7:34 gregkh
0 siblings, 0 replies; only message in thread
From: gregkh @ 2017-10-09 7:34 UTC (permalink / raw)
To: ecree, davem, gregkh; +Cc: stable, stable-commits
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 <stable@vger.kernel.org> know about it.
>From foo@baz Mon Oct 9 09:32:35 CEST 2017
From: Edward Cree <ecree@solarflare.com>
Date: Tue, 19 Sep 2017 18:45:56 +0100
Subject: net: change skb->mac_header when Generic XDP calls adjust_head
From: Edward Cree <ecree@solarflare.com>
[ 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 <ecree@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2017-10-09 7:34 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-10-09 7:34 Patch "net: change skb->mac_header when Generic XDP calls adjust_head" has been added to the 4.13-stable tree gregkh
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).