Netdev List
 help / color / mirror / Atom feed
* [PATCH v5 bpf-next 0/2] bpf: add cg_skb_is_valid_access
@ 2018-10-19  5:01 Song Liu
  2018-10-19  5:01 ` [PATCH v5 bpf-next 1/2] bpf: add cg_skb_is_valid_access for BPF_PROG_TYPE_CGROUP_SKB Song Liu
  2018-10-19  5:01 ` [PATCH v5 bpf-next 2/2] bpf: add tests for direct packet access from CGROUP_SKB Song Liu
  0 siblings, 2 replies; 5+ messages in thread
From: Song Liu @ 2018-10-19  5:01 UTC (permalink / raw)
  To: netdev; +Cc: ast, daniel, kernel-team, Song Liu

Changes v4 -> v5:
1. Replaced bpf_compute_and_save_data_pointers() with
   bpf_compute_and_save_data_end();
   Replaced bpf_restore_data_pointers() with bpf_restore_data_end().
2. Fixed indentation in test_verifier.c

Changes v3 -> v4:
1. Fixed crash issue reported by Alexei.

Changes v2 -> v3:
1. Added helper function bpf_compute_and_save_data_pointers() and
   bpf_restore_data_pointers().

Changes v1 -> v2:
1. Updated the list of read-only fields, and read-write fields.
2. Added dummy sk to bpf_prog_test_run_skb().

This set enables BPF program of type BPF_PROG_TYPE_CGROUP_SKB to access
some __skb_buff data directly.

Song Liu (2):
  bpf: add cg_skb_is_valid_access for BPF_PROG_TYPE_CGROUP_SKB
  bpf: add tests for direct packet access from CGROUP_SKB

 include/linux/filter.h                      |  21 +++
 kernel/bpf/cgroup.c                         |   6 +
 net/bpf/test_run.c                          |   7 +
 net/core/filter.c                           |  36 ++++-
 tools/testing/selftests/bpf/test_verifier.c | 171 ++++++++++++++++++++
 5 files changed, 240 insertions(+), 1 deletion(-)

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

end of thread, other threads:[~2018-10-19 13:54 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-10-19  5:01 [PATCH v5 bpf-next 0/2] bpf: add cg_skb_is_valid_access Song Liu
2018-10-19  5:01 ` [PATCH v5 bpf-next 1/2] bpf: add cg_skb_is_valid_access for BPF_PROG_TYPE_CGROUP_SKB Song Liu
2018-10-19  5:01 ` [PATCH v5 bpf-next 2/2] bpf: add tests for direct packet access from CGROUP_SKB Song Liu
2018-10-19  5:22   ` Eric Dumazet
2018-10-19  5:49     ` Song Liu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox