lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 14 Jun 2022 12:44:47 +0200
From:   Jörn-Thorben Hinz <jthinz@...lbox.tu-berlin.de>
To:     <bpf@...r.kernel.org>
CC:     Alexei Starovoitov <ast@...nel.org>,
        Daniel Borkmann <daniel@...earbox.net>,
        Andrii Nakryiko <andrii@...nel.org>,
        Martin KaFai Lau <kafai@...com>, <netdev@...r.kernel.org>,
        Jörn-Thorben Hinz <jthinz@...lbox.tu-berlin.de>
Subject: [PATCH bpf-next v3 0/5] Align BPF TCP CCs implementing cong_control() with non-BPF CCs

Addressed feedback by Martin KaFai Lau in this v3 of the series. See the
details below.

This series corrects some inconveniences for a BPF TCP CC that
implements and uses tcp_congestion_ops.cong_control(). Until now, such a
CC did not have all necessary write access to struct sock and
unnecessarily needed to implement cong_avoid().

v3:
 - Add a selftest writing sk_pacing_*
 - Add a selftest with incomplete tcp_congestion_ops
 - Add a selftest with unsupported get_info()
 - Remove an unused variable
 - Reword a comment about reg() in bpf_struct_ops_map_update_elem()
v2:
 - Drop redundant check for required functions and just rely on
   tcp_register_congestion_control() (Martin KaFai Lau)

Jörn-Thorben Hinz (5):
  bpf: Allow a TCP CC to write sk_pacing_rate and sk_pacing_status
  bpf: Require only one of cong_avoid() and cong_control() from a TCP CC
  selftests/bpf: Test a BPF CC writing sk_pacing_*
  selftests/bpf: Test an incomplete BPF CC
  selftests/bpf: Test a BPF CC implementing the unsupported get_info()

 kernel/bpf/bpf_struct_ops.c                   |  7 +-
 net/ipv4/bpf_tcp_ca.c                         | 39 ++---------
 .../selftests/bpf/prog_tests/bpf_tcp_ca.c     | 66 +++++++++++++++++++
 .../bpf/progs/tcp_ca_incompl_cong_ops.c       | 35 ++++++++++
 .../bpf/progs/tcp_ca_unsupp_cong_op.c         | 21 ++++++
 .../bpf/progs/tcp_ca_write_sk_pacing.c        | 60 +++++++++++++++++
 6 files changed, 191 insertions(+), 37 deletions(-)
 create mode 100644 tools/testing/selftests/bpf/progs/tcp_ca_incompl_cong_ops.c
 create mode 100644 tools/testing/selftests/bpf/progs/tcp_ca_unsupp_cong_op.c
 create mode 100644 tools/testing/selftests/bpf/progs/tcp_ca_write_sk_pacing.c

-- 
2.30.2

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ