Thread (6 messages) flat view 6 messages, 3 authors, 2021-10-12

RE: [PATCH v4] skmsg: lose offset info in sk_psock_skb_ingress

From: John Fastabend <john.fastabend@gmail.com>
Date: 2021-09-30 22:48:38
Also in: bpf

Liu Jian wrote:
If sockmap enable strparser, there are lose offset info in
sk_psock_skb_ingress. If the length determined by parse_msg function
is not skb->len, the skb will be converted to sk_msg multiple times,
and userspace app will get the data multiple times.

Fix this by get the offset and length from strp_msg.
And as Cong suggestion, add one bit in skb->_sk_redir to distinguish
enable or disable strparser.

Signed-off-by: Liu Jian <redacted>
---
Thanks. Please add Fixes tags so we can track these I've added it here.

This has been broken from the initial patches and after a quick glance I
suspect this will need manual backports if we need it. Also all the
I use and all the selftests set parser to a nop by returning skb->len.

Can you also create a test so we can ensure we don't break this
again?

Fixes: 604326b41a6fb ("bpf, sockmap: convert to generic sk_msg interface")
Acked-by: John Fastabend <john.fastabend@gmail.com>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help