[PATCH bpf-next 0/2] Enable bpf_setsockopt() on ktls enabled sockets.

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

 



This patchset implements a change to bpf_setsockopt() which allows
ktls enabled sockets to be used with the SOL_TCP level. This is
necessary as when ktls is enabled, it changes the function pointer of
setsockopt of the socket, which bpf_setsockopt() checks in order to
make sure that the socket is a TCP socket. Checking sk_protocol
instead of the function pointer will ensure that bpf_setsockopt() with
the SOL_TCP level still works on sockets with ktls enabled.

Kui-Feng Lee (2):
  bpf: Check the protocol of a sock to agree the calls to
    bpf_setsockopt().
  selftests/bpf: Calls bpf_setsockopt() on a ktls enabled socket.

 net/core/filter.c                             |  2 +-
 .../selftests/bpf/prog_tests/setget_sockopt.c | 71 +++++++++++++++++++
 .../selftests/bpf/progs/setget_sockopt.c      |  8 +++
 3 files changed, 80 insertions(+), 1 deletion(-)

-- 
2.30.2





[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