[bpf-next PATCH 0/3] bpf: Add sk_msg helpers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This series adds helpers for sk_msg program type.

Add a set of helpers that makes sk_msg more useful. Notable add the
*current_task* getters and the probe_* routines guarded by a capabilities
check for CAP_SYS_ADMIN.

 BPF_FUNC_perf_event_output
 BPF_FUNC_get_current_uid_gid
 BPF_FUNC_get_current_pid_tgid
 BPF_FUNC_get_current_cgroup_id
 BPF_FUNC_get_current_ancestor_cgroup_id
 BPF_FUNC_get_cgroup_classid

 BPF_FUNC_get_current_task
 BPF_FUNC_current_task_under_cgroup
 BPF_FUNC_probe_read_user
 BPF_FUNC_probe_read_kernel
 BPF_FUNC_probe_read
 BPF_FUNC_probe_read_user_str
 BPF_FUNC_probe_read_kernel_str
 BPF_FUNC_probe_read_str

 BPF_FUNC_sk_storage_get
 BPF_FUNC_sk_storage_delete

I have an RFC test for sk_storage_* patch that is pending merge of
other sockmap_test patches.

---

John Fastabend (3):
      bpf: sk_msg add some generic helpers that may be useful from sk_msg
      bpf: sk_msg helpers for probe_* and *current_task*
      bpf: sk_msg add get socket storage helpers


 include/uapi/linux/bpf.h |    2 +
 kernel/trace/bpf_trace.c |   16 ++++++-----
 net/core/filter.c        |   65 ++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 75 insertions(+), 8 deletions(-)

--
Signature



[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux