[PATCH RFC v2 bpf-next 0/2] bpf: Enable bpf_skc_to_* sock casting helper to networking prog type

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

 



This set allows networking prog type to directly read fields from
the in-kernel socket type, e.g. "struct tcp_sock".

Patch 2 has the details on the use case.

It is currently under RFC since it needs proper tests and it builds on
top of Lorenz's patches: 
   https://lore.kernel.org/bpf/20200910125631.225188-1-lmb@xxxxxxxxxxxxxx/

v2:
- Add ARG_PTR_TO_SOCK_COMMON_OR_NULL (Lorenz)

Martin KaFai Lau (2):
  bpf: Move the PTR_TO_BTF_ID check to check_reg_type()
  bpf: Enable bpf_skc_to_* sock casting helper to networking prog type

 include/linux/bpf.h   |  1 +
 kernel/bpf/verifier.c | 97 +++++++++++++++++++++++++++++--------------
 net/core/filter.c     | 73 ++++++++++++++++++++++----------
 3 files changed, 117 insertions(+), 54 deletions(-)

-- 
2.24.1





[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