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-next>] [day] [month] [year] [list]
Message-ID: <92a355bd-7105-4a17-9543-ba2d8ae36a37@kernel.org>
Date: Tue, 28 Nov 2023 13:37:39 +0100
From: Jesper Dangaard Brouer <hawk@...nel.org>
To: Daniel Borkmann <daniel@...earbox.net>
Cc: Yan Zhai <yan@...udflare.com>, Stanislav Fomichev <sdf@...gle.com>,
 Netdev <netdev@...r.kernel.org>, bpf <bpf@...r.kernel.org>,
 Alexei Starovoitov <ast@...nel.org>, kernel-team
 <kernel-team@...udflare.com>, Jakub Kicinski <kuba@...nel.org>,
 Paolo Abeni <pabeni@...hat.com>, Eric Dumazet <edumazet@...gle.com>,
 "David S. Miller" <davem@...emloft.net>,
 Jakub Sitnicki <jakub@...udflare.com>
Subject: Does skb_metadata_differs really need to stop GRO aggregation?

Hi Daniel,

I'm trying to understand why skb_metadata_differs() needed to block GRO ?

I was looking at XDP storing information in metadata area that also
survives into SKBs layer.  E.g. the RX timestamp.

Then I noticed that GRO code (gro_list_prepare) will not allow
aggregating if metadata isn't the same in all packets via
skb_metadata_differs().  Is this really needed?
Can we lift/remove this limitation?

E.g. if I want to store a timestamp, then it will differ per packet.

--Jesper

Git history says it dates back to the original commit that added meta
pointer de8f3a83b0a0 ("bpf: add meta pointer for direct access") (author
Daniel).


diff --git a/net/core/gro.c b/net/core/gro.c
index 0759277dc14e..7fb6a6a24288 100644
--- a/net/core/gro.c
+++ b/net/core/gro.c
@@ -341,7 +341,7 @@ static void gro_list_prepare(const struct list_head 
*head,

                 diffs = (unsigned long)p->dev ^ (unsigned long)skb->dev;
                 diffs |= p->vlan_all ^ skb->vlan_all;
-               diffs |= skb_metadata_differs(p, skb);
+               diffs |= skb_metadata_differs(p, skb); // Why?
                 if (maclen == ETH_HLEN)
                         diffs |= compare_ether_header(skb_mac_header(p),

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ