public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH bpf-next 0/3] Various BPF exception improvements
@ 2023-12-14 22:56 Daniel Xu
  2023-12-14 22:56 ` [PATCH bpf-next 1/3] bpf: xdp: Register generic_kfunc_set with XDP programs Daniel Xu
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Daniel Xu @ 2023-12-14 22:56 UTC (permalink / raw)
  To: linux-kernel, netdev, bpf, linux-kselftest, memxor

Two small improves to BPF exceptions in this patchset:

1. Allow throwing exceptions in XDP progs
2. Add some macros to help release references before throwing exceptions

Note the macros are intended to be temporary, at least until BPF
exception infra is able to automatically release acquired resources.

Daniel Xu (3):
  bpf: xdp: Register generic_kfunc_set with XDP programs
  bpf: selftests: Add bpf_assert_if() and bpf_assert_with_if() macros
  bpf: selftests: Test bpf_assert_if() and bpf_assert_with_if()

 kernel/bpf/helpers.c                          |  1 +
 .../testing/selftests/bpf/bpf_experimental.h  | 22 +++++++
 .../selftests/bpf/prog_tests/exceptions.c     |  5 ++
 .../testing/selftests/bpf/progs/exceptions.c  | 61 +++++++++++++++++++
 4 files changed, 89 insertions(+)

-- 
2.42.1


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2023-12-16 22:47 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-12-14 22:56 [PATCH bpf-next 0/3] Various BPF exception improvements Daniel Xu
2023-12-14 22:56 ` [PATCH bpf-next 1/3] bpf: xdp: Register generic_kfunc_set with XDP programs Daniel Xu
2023-12-14 22:56 ` [PATCH bpf-next 2/3] bpf: selftests: Add bpf_assert_if() and bpf_assert_with_if() macros Daniel Xu
2023-12-15  2:46   ` Alexei Starovoitov
2023-12-15  3:10     ` Alexei Starovoitov
2023-12-16 22:47       ` Alexei Starovoitov
2023-12-14 22:56 ` [PATCH bpf-next 3/3] bpf: selftests: Test bpf_assert_if() and bpf_assert_with_if() Daniel Xu
2023-12-15  3:20 ` [PATCH bpf-next 0/3] Various BPF exception improvements patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox