Netdev List
 help / color / mirror / Atom feed
From: Cong Wang <xiyou.wangcong@gmail.com>
To: John Fastabend <john.fastabend@gmail.com>
Cc: Zijian Zhang <zijianzhang@bytedance.com>,
	netdev@vger.kernel.org, bpf@vger.kernel.org,
	Cong Wang <cong.wang@bytedance.com>,
	Daniel Borkmann <daniel@iogearbox.net>
Subject: Re: [External] [Patch bpf 2/2] selftests/bpf: Add a BPF selftest for bpf_skb_change_tail()
Date: Thu, 28 Nov 2024 10:38:03 -0800	[thread overview]
Message-ID: <Z0i4i0Db8EnRjzZJ@pop-os.localdomain> (raw)
In-Reply-To: <6746cb81870d7_f422208e@john.notmuch>

On Tue, Nov 26, 2024 at 11:34:25PM -0800, John Fastabend wrote:
> Zijian Zhang wrote:
> > 
> > LGTM!
> > 
> > I think it will be better if the test could also cover the case you
> > indicated in the first patch, where skb_transport_offset is a negative
> > value.
> > 
> > Thanks,
> > Zijian
> > 
> 
> Hi Cong,
> 
> I agree it would be great to see the skb_transport_offset is
> negative pattern. Could we add it?

Hmm? It is already negative for sockmap, as I already mentioned in patch
1/1:

"skb_transport_offset() and skb_transport_offset() can be negative when
they are called after we pull the transport header, for example, when
we use eBPF sockmap (aka at the point of ->sk_data_ready())."

My test case uses skb verdict, which is one of the sockmap hooks.

Or I guess you mean positive? In that case, we would need hook different
locations, like TC. I can certainly add it, but once again, it would
make backporting this patchset even harder.

Thanks!

      reply	other threads:[~2024-11-28 18:38 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-07  3:41 [Patch bpf 1/2] bpf: check negative offsets in __bpf_skb_min_len() Cong Wang
2024-11-07  3:41 ` [Patch bpf 2/2] selftests/bpf: Add a BPF selftest for bpf_skb_change_tail() Cong Wang
2024-11-08  0:02   ` [External] " Zijian Zhang
2024-11-27  7:34     ` John Fastabend
2024-11-28 18:38       ` Cong Wang [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Z0i4i0Db8EnRjzZJ@pop-os.localdomain \
    --to=xiyou.wangcong@gmail.com \
    --cc=bpf@vger.kernel.org \
    --cc=cong.wang@bytedance.com \
    --cc=daniel@iogearbox.net \
    --cc=john.fastabend@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=zijianzhang@bytedance.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox