[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230124160802.1122124-1-void@manifault.com>
Date: Tue, 24 Jan 2023 10:07:58 -0600
From: David Vernet <void@...ifault.com>
To: bpf@...r.kernel.org
Cc: ast@...nel.org, daniel@...earbox.net, andrii@...nel.org,
martin.lau@...ux.dev, song@...nel.org, yhs@...a.com,
john.fastabend@...il.com, kpsingh@...nel.org, sdf@...gle.com,
haoluo@...gle.com, jolsa@...nel.org, linux-kernel@...r.kernel.org,
kernel-team@...a.com, tj@...nel.org
Subject: [PATCH bpf-next v2 0/4] Enable struct_ops programs to be sleepable
This is part 2 of https://lore.kernel.org/bpf/20230123232228.646563-1-void@manifault.com/
Changelog:
----------
v1 -> v2:
- Add support for specifying sleepable struct_ops programs with
struct_ops.s in libbpf (Alexei).
- Move failure test case into new dummy_st_ops_fail.c prog file.
- Update test_dummy_sleepable() to use struct_ops.s instead of manually
setting prog flags. Also remove open_load_skel() helper which is no
longer needed.
- Fix verifier tests to expect new sleepable prog failure message.
David Vernet (4):
bpf: Allow BPF_PROG_TYPE_STRUCT_OPS programs to be sleepable
libbpf: Support sleepable struct_ops.s section
bpf: Pass const struct bpf_prog * to .check_member
bpf/selftests: Verify struct_ops prog sleepable behavior
include/linux/bpf.h | 4 +-
kernel/bpf/verifier.c | 7 ++-
net/bpf/bpf_dummy_struct_ops.c | 18 ++++++
net/bpf/test_run.c | 6 ++
net/ipv4/bpf_tcp_ca.c | 3 +-
tools/lib/bpf/libbpf.c | 1 +
.../selftests/bpf/prog_tests/dummy_st_ops.c | 56 ++++++++++++++-----
.../selftests/bpf/progs/dummy_st_ops_common.h | 20 +++++++
.../selftests/bpf/progs/dummy_st_ops_fail.c | 41 ++++++++++++++
...{dummy_st_ops.c => dummy_st_ops_success.c} | 18 +++---
10 files changed, 145 insertions(+), 29 deletions(-)
create mode 100644 tools/testing/selftests/bpf/progs/dummy_st_ops_common.h
create mode 100644 tools/testing/selftests/bpf/progs/dummy_st_ops_fail.c
rename tools/testing/selftests/bpf/progs/{dummy_st_ops.c => dummy_st_ops_success.c} (75%)
--
2.39.0
Powered by blists - more mailing lists