bpf.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Martin KaFai Lau <kafai@fb.com>
To: <bpf@vger.kernel.org>, <netdev@vger.kernel.org>
Cc: Alexei Starovoitov <ast@kernel.org>,
	Daniel Borkmann <daniel@iogearbox.net>,
	David Miller <davem@davemloft.net>, <kernel-team@fb.com>
Subject: [PATCH v4 bpf-next 0/2] Add array support to btf_struct_access
Date: Thu, 7 Nov 2019 10:09:01 -0800	[thread overview]
Message-ID: <20191107180901.4097452-1-kafai@fb.com> (raw)

This series adds array support to btf_struct_access().
Please see individual patch for details.

v4:
- Avoid removing a useful comment from btf_struct_access()
- Add comments to clarify the "mtrue_end" naming and
  how it may not always correspond to mtype/msize/moff.

v3:
- Fixed an interpreter issue that missed accounting
  for insn->off

v2:
- Fix a divide-by-zero when there is empty array in
  a struct (e.g. "__u8 __cloned_offset[0];" in skbuff)
- Add 'static' to a global var in prog_tests/kfree_skb.c

Martin KaFai Lau (2):
  bpf: Add array support to btf_struct_access
  bpf: Add cb access in kfree_skb test

 kernel/bpf/btf.c                              | 195 +++++++++++++++---
 .../selftests/bpf/prog_tests/kfree_skb.c      |  54 ++++-
 tools/testing/selftests/bpf/progs/kfree_skb.c |  25 ++-
 3 files changed, 229 insertions(+), 45 deletions(-)

-- 
2.17.1


             reply	other threads:[~2019-11-07 18:09 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-07 18:09 Martin KaFai Lau [this message]
2019-11-07 18:09 ` [PATCH v4 bpf-next 1/2] bpf: Add array support to btf_struct_access Martin KaFai Lau
2019-11-07 18:09 ` [PATCH v4 bpf-next 2/2] bpf: Add cb access in kfree_skb test Martin KaFai Lau
2019-11-07 22:15 ` [PATCH v4 bpf-next 0/2] Add array support to btf_struct_access Alexei Starovoitov

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=20191107180901.4097452-1-kafai@fb.com \
    --to=kafai@fb.com \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=davem@davemloft.net \
    --cc=kernel-team@fb.com \
    --cc=netdev@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).