bpf.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 bpf-next 0/3] bpf: Add array support to btf_struct_access
@ 2019-11-07  1:46 Martin KaFai Lau
  2019-11-07  1:46 ` [PATCH v3 bpf-next 1/3] bpf: Account for insn->off when doing bpf_probe_read_kernel Martin KaFai Lau
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Martin KaFai Lau @ 2019-11-07  1:46 UTC (permalink / raw)
  To: bpf, netdev
  Cc: Alexei Starovoitov, Daniel Borkmann, David Miller, kernel-team

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

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 (3):
  bpf: Account for insn->off when doing bpf_probe_read_kernel
  bpf: Add array support to btf_struct_access
  bpf: Add cb access in kfree_skb test

 kernel/bpf/btf.c                              | 187 +++++++++++++++---
 kernel/bpf/core.c                             |   2 +-
 .../selftests/bpf/prog_tests/kfree_skb.c      |  54 +++--
 tools/testing/selftests/bpf/progs/kfree_skb.c |  25 ++-
 4 files changed, 221 insertions(+), 47 deletions(-)

-- 
2.17.1


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2019-11-07 17:29 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-07  1:46 [PATCH v3 bpf-next 0/3] bpf: Add array support to btf_struct_access Martin KaFai Lau
2019-11-07  1:46 ` [PATCH v3 bpf-next 1/3] bpf: Account for insn->off when doing bpf_probe_read_kernel Martin KaFai Lau
2019-11-07  2:45   ` Andrii Nakryiko
2019-11-07  5:57   ` Alexei Starovoitov
2019-11-07  1:46 ` [PATCH v3 bpf-next 2/3] bpf: Add array support to btf_struct_access Martin KaFai Lau
2019-11-07  2:41   ` Andrii Nakryiko
2019-11-07 17:22     ` Martin Lau
2019-11-07 17:26       ` Andrii Nakryiko
2019-11-07  1:46 ` [PATCH v3 bpf-next 3/3] bpf: Add cb access in kfree_skb test Martin KaFai Lau
2019-11-07  2:50   ` Andrii Nakryiko
2019-11-07 17:29     ` Martin Lau

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).