Skip to content

bpf: Run exception cleanup landing pads when bpf_unwind() unwinds

Yonghong Song bpf sashiko-reviews 12 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v12 Latest25 patches 7 repliesIn review
  2. v1126 patches 5 repliesSuperseded
  3. v1024 patches 14 repliesSuperseded
Earlier versions · 9
VersionPostedPatchesRepliesStatus
v923 patches7 repliesSuperseded
v822 patches18 repliesSuperseded
v722 patches11 repliesSuperseded
v621 patches17 repliesSuperseded
v521 patches21 repliesSuperseded
v420 patches48 repliesSuperseded
v320 patches11 repliesSuperseded
v220 patches17 repliesSuperseded
v120 patches11 repliesSuperseded

Changes in v12 from the cover letter

- v11: https://lore.kernel.org/bpf/[email protected]/
- Rebase on bpf-next, and drop patch 1, which landed there as commit a3923834d155 ("bpf: Pack bpf_insn_aux_data flags into bit fields").
- Patch 12: put an exit after a call that ends a subprog before the CFG walk, so no later pass needs to know about such a call. check_subprogs() alone decides which final calls are accepted; a call to a global subprog or to bpf_throw() no longer is.
- Patch 11: drop the adjustment of a final call's offset, since no subprog ends with a call by the time it runs.

Patches in v12 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/25bpf: Accept the compiler's exception cleanup table at program loadinclude/linux/bpf_verifier.h include/uapi/linux/bpf.h kernel/bpf/Makefile +5 more+190 -20 replies
2/25bpf: Add the bpf_unwind() and bpf_unwind_resume() kfuncskernel/bpf/helpers.c+13 -00 replies
3/25bpf: Keep a call site's landing pad in insn_aux_data, add lookupsinclude/linux/bpf_verifier.h kernel/bpf/exception.c kernel/bpf/exception.h +1 more+58 -10 replies
4/25bpf: Mark covered call sites and check a program can take a tableinclude/linux/filter.h kernel/bpf/core.c kernel/bpf/exception.c +2 more+81 -00 replies
5/25bpf: Make exception landing pads reachable in the CFGkernel/bpf/cfg.c kernel/bpf/liveness.c+61 -10 replies
6/25bpf: Verify an unwind through landing pads and epiloguesinclude/linux/bpf_verifier.h kernel/bpf/backtrack.c kernel/bpf/cfg.c +2 more+281 -111 reply
7/25bpf: Refuse a callback that can unwindkernel/bpf/exception.c kernel/bpf/exception.h kernel/bpf/verifier.c+14 -01 reply
8/25bpf: Refuse a landing pad that does not resumeinclude/linux/bpf_verifier.h kernel/bpf/exception.c kernel/bpf/exception.h +2 more+78 -10 replies
9/25bpf: Do not use a private stack for a program that can unwindkernel/bpf/exception.c kernel/bpf/exception.h kernel/bpf/verifier.c+22 -00 replies
10/25bpf: Prepare JITed programs for dispatching cleanup padsinclude/linux/bpf.h include/linux/bpf_verifier.h include/linux/filter.h +5 more+232 -20 replies
11/25bpf: Keep an epilogue for each subprog an unwind can pass throughkernel/bpf/fixups.c+53 -30 replies
12/25bpf: Allow a subprog to end with a call that does not returnkernel/bpf/verifier.c+94 -191 reply
13/25bpf: Dispatch cleanup pads by rewriting return addresseskernel/bpf/fixups.c kernel/bpf/helpers.c+68 -10 replies
14/25bpf: Refuse a trampoline that calls a subprog that can unwindinclude/linux/bpf.h kernel/bpf/fixups.c kernel/bpf/verifier.c+19 -00 replies
15/25bpf, x86: Dispatch exception cleanup pads at run timearch/x86/net/bpf_jit_comp.c+36 -00 replies
16/25bpf, arm64: Dispatch exception cleanup pads at run timearch/arm64/kernel/stacktrace.c arch/arm64/net/bpf_jit_comp.c+93 -00 replies
17/25libbpf: Resolve the compiler's _Unwind_Resume to the kernel's kfunctools/lib/bpf/libbpf.c+43 -130 replies
18/25libbpf: Add cleanup_info to bpf_prog_load_optstools/lib/bpf/bpf.c tools/lib/bpf/bpf.h+14 -20 replies
19/25libbpf: Collect .bpf_cleanup records and pass them to the kerneltools/lib/bpf/libbpf.c tools/lib/bpf/libbpf_internal.h+288 -20 replies
20/25libbpf: Carry the exception cleanup table through the light skeletontools/lib/bpf/gen_loader.c tools/lib/bpf/libbpf_internal.h+33 -30 replies
21/25libbpf: Let the static linker carry .bpf_cleanup relocationstools/lib/bpf/linker.c+38 -10 replies
22/25selftests/bpf: Add end-to-end and negative .bpf_cleanup exception teststools/testing/selftests/bpf/exceptions_cleanup.h tools/testing/selftests/bpf/prog_tests/exceptions_cleanup.c tools/testing/selftests/bpf/progs/exceptions_cleanup.c +2 more+1142 -00 replies
23/25selftests/bpf: Add __set_global() and __ret_global() test tagstools/testing/selftests/bpf/progs/bpf_misc.h tools/testing/selftests/bpf/test_loader.c+330 -10 replies
24/25selftests/bpf: Cover more accepted .bpf_cleanup exception shapestools/testing/selftests/bpf/exceptions_cleanup.h tools/testing/selftests/bpf/prog_tests/exceptions_cleanup.c tools/testing/selftests/bpf/progs/exceptions_cleanup_shapes.c+1157 -00 replies
25/25selftests/bpf: Load an exception cleanup program from a light skeletontools/testing/selftests/bpf/Makefile.skel tools/testing/selftests/bpf/prog_tests/exceptions_cleanup.c+32 -10 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v12 yet.

Read the v12 thread

Cover letter [PATCH bpf-next v12 00/25] bpf: Run exception cleanup landing pads when bpf_unwind() unwinds

bpf_throw() walks the BPF call stack to the exception boundary and discards every frame in between. A frame that owns something -- an RCU read lock, a preemption-disabled section, a referenced kptr -- never gets to give it back, so the verifier refuses to let such a frame throw at all. That is the whole reason a Rust program cannot use bpf_throw() as its panic path right now: Rust's Drop glue *is* that give-back, and there is nowhere to run it.

LLVM 23 added the compiler half ([1]). A Rust function that owns a value across a call that can unwind

    fn foo() {
        let _guard = RcuReadGuard::new();  /* bpf_rcu_read_lock()   */
        may_throw();                       /* extern "C-unwind"     */
    }                                      /* Drop: rcu_read_unlock */

lowers to an invoke with a cleanup landing pad holding the Drop call, and the BPF backend writes one record per invoke region into a .bpf_cleanup
section: a flat table of 12-byte (begin, end, landing_pad) triples, each field a byte offset into the code section. The rule is "a frame suspended at a call in [begin, end) resumes at landing_pad when an unwind passes through". A pad ends with a call to _Unwind_Resume(), which the kernel provides as the bpf_unwind_resume() kfunc.

Rather than overload bpf_throw(), which keeps its own meaning -- leave for the exception boundary with the frames in between discarded -- a new bpf_unwind() kfunc raises the unwind this series dispatches.

This series is the kernel half: take that table at BPF_PROG_LOAD, teach the verifier to follow an unwind to the landing pad it reaches, and have bpf_unwind() send each frame it leaves there.

C has no unwinding, so the selftests spell out by hand what a frontend emits -- a call site bracketed by two labels, a landing pad, and a record tying them together. The frame above, written that way:

"call bpf_rcu_read_lock;"
"1:" "call foo3;" /* cleanup region */
"2:"
... normal path, ends in bpf_rcu_read_unlock ...
"6:" /* landing pad */
"call bpf_rcu_read_unlock;"
"call bpf_unwind_resume;" CLEANUP_REC("1b", "2b", "6b")

Design
======

A pad runs in the frame that owns it, entered by an ordinary return. bpf_unwind() walks the frames with arch_bpf_stack_walk_ra(), which hands out the slot each frame's return address came from, and rewrites that slot for every frame above the one that called it: to the landing pad where a record covers the call the address returns into, and to that frame's epilogue where nothing does. It finds the frames in the calling program itself, whose aux the verifier passes it as an implicit argument. Then it returns. The frame that called it goes on after the call, where the fixups put 'r0 = 0' and then a jump to its own pad, or an exit where no record covers the call.

Each frame therefore runs its own pad, on its own stack, and leaves through its own epilogue -- which is what puts its caller's r6-r9 back. The unwind needs no trampoline, no spill area and no per-frame metadata beyond the table itself. The fixups lower a pad's bpf_unwind_resume() to 'r0 = 0; exit', so the frame returns and the address rewritten below it carries the unwind on to the next pad. For main -> A -> B -> C with only A's call to B covered, an unwind raised in C runs:

  frame   runs
  -----   ----------------------------------------------------------
  C       'r0 = 0; exit', patched in after its bpf_unwind()
  B       its epilogue, putting back A's r6-r9
  A       its pad, which drops A's resources; the resume is an exit
  main    its epilogue, returning 0 to the kernel

The verifier follows the same path. A bpf_unwind() goes on at its own frame's pad, or pops frames to the first pad that covers a call, or to the main program's exit, where nothing may still be held and the zero returned has to suit the program type. Only there are an unwind's resources checked, since a pad may drop what another frame acquired, as when Rust moves a value into a callee. A resume goes on below its frame the same way. The pad is entered from the state the unwind leaves, not from a snapshot at the call: before unwinding, a callee may have written its caller's stack through a pointer, overwritten a spilled pointer, or changed packet data, and the callee's epilogue puts back none of that. A global subprog is verified on its own, so a call to one that can unwind gets a second successor, the unwind, taken from the state the call returns in. Precision backtracking follows the same edges back, into the frame the unwind left.

1-2 uapi: cleanup_info in BPF_PROG_LOAD and struct bpf_cleanup_info;
the bpf_unwind() and bpf_unwind_resume() kfuncs
3-5 keep a call site's pad in insn_aux_data, mark the covered call
sites, refuse what cannot carry a table, and make the landing pads reachable in the CFG and in liveness
6 verifier: follow an unwind through landing pads and epilogues
7-9 refuse a callback that can unwind and a pad that does not
resume; no private stack for a program that can unwind
10 lower the unwind and resume calls, and build the native cleanup
tables
11 keep an exit in every function the walk can pass, putting one in
a function that has none
12 let a subprog end with a call that does not return, as a compiler
emits one

  13     bpf_unwind(): rewrite the return addresses as it walks
  14     refuse a trampoline that calls a subprog that can unwind
  15-16  x86-64 and arm64 JITs
  17-21  libbpf: resolve _Unwind_Resume, collect .bpf_cleanup and pass it

to the kernel, carry it through the light skeleton and the static linker
22-25 selftests

Limitations
===========

- Cleanup pads only. A catch pad, which Rust's catch_unwind would need, is refused: bpf_unwind() rewrites every frame in one pass.
- Needs a JIT that dispatches pads: x86-64 with CONFIG_UNWINDER_ORC, and arm64. Elsewhere the load fails with -EOPNOTSUPP.
- Not with offload, a private stack, a verifier_ops epilogue, bpf_throw() or an exception callback.
- In a pad's frame: no tail call, BPF_LD_[ABS|IND] or indirect jump, and no second unwind in the pad or anything it calls.
- A subprog that can unwind cannot be a callback, nor be attached by fexit, fmod_ret or fsession. One with a callx counts as able to unwind when any subprog whose address is taken can.
- Until the Rust toolchain supports BPF exception handling, the selftests write their tables by hand in inline asm.

[1] https://github.com/llvm/llvm-project/pull/192164
llvm commit 9d51c891b719 ("[BPF] Add exception handling support with .bpf_cleanup section")

Changelog
=========
v11 -> v12:
- v11: https://lore.kernel.org/bpf/[email protected]/
- Rebase on bpf-next, and drop patch 1, which landed there as commit a3923834d155 ("bpf: Pack bpf_insn_aux_data flags into bit fields").
- Patch 12: put an exit after a call that ends a subprog before the CFG walk, so no later pass needs to know about such a call. check_subprogs() alone decides which final calls are accepted; a call to a global subprog or to bpf_throw() no longer is.
- Patch 11: drop the adjustment of a final call's offset, since no subprog ends with a call by the time it runs.
v10 -> v11:
- v10: https://lore.kernel.org/bpf/[email protected]/
- New patch 12, split out of patch 11: a subprog an unwind passes through without an exit, such as one ending in the loop rustc puts after a call that does not return, gets one after its last insn instead of being refused. The last insn keeps its aux data.
- New patch 13: let a subprog end with a call that does not return, the way rustc ends one with a call to a '-> !' function and LLVM a pad with its _Unwind_Resume call. check_subprogs() accepts a final call to a subprog with no exit, or to bpf_unwind(), bpf_unwind_resume() or bpf_throw(); do_check() refuses a path on which the call returns. The CFG walk, stack liveness and precision backtracking handle a call with no fall-through.
- When an unwind with no pad leaves a resource held, report it as "bpf_unwind cannot be used inside ..." at the unwinding insn, instead of as a BPF_EXIT in main.
- Run the in-pad checks from do_check_insn().
- arm64: sign the new return address with PACIA1716, so no assembler support for pointer authentication is needed.
- libbpf: read the .bpf_cleanup fields with memcpy(), as the section may be unaligned in a linked object; when _Unwind_Resume's prototype does not match, name bpf_unwind_resume in the warning.
v9 -> v10:
- v9: https://lore.kernel.org/bpf/[email protected]/
- Split the callback refusal into its own patch 8.
- Fix a verifier_bug() when a global call's pad is the next insn.
- On a cleanup_info record with a nonzero tail, fail with -E2BIG without writing a record size back into the attr.
v8 -> v9:
- v8: https://lore.kernel.org/bpf/[email protected]/
- unwind_frames() destroys popped frames' dynptrs.
- Drop patch 8: it refused a callee's pad dropping a reference its caller acquired, which is how Rust compiles moving a value into a callee. Held resources are checked only where main or a global subprog returns.
- Drop the per-insn in/outside-pad marks; compare in_pad when pruning.
- Split patch 11 into 10 (prepare the JITed program) and 11 (the walk).
- bpf_unwind() finds frames in its program's aux (KF_IMPLICIT_ARGS), not in kallsyms, which can go while an instance still runs.
- New patch 12: refuse fexit/fmod_ret/fsession on an unwinding subprog.
- x86, arm64: make bpf_unwind() notrace and NOKPROBE, drop the hooked-return warning; arm64: drop the PAC modifier check.
- Fix an unwind out of main inside a loop, and a global subprog returning in R0:R2; narrow the callx might_unwind marking.
- libbpf: skip records of an overridden weak function; leave table checks to the kernel.
v7 -> v8:
- v7: https://lore.kernel.org/bpf/[email protected]/
- Follow an unwind to its pad from the state it leaves, not from a snapshot at the call; patch 7 is renamed to match.
- Follow the unwind out of a call to a global subprogram as well: the call continues at the next insn and, from the state it returns in, at its pad or further out.
- Backtrack precision across an unwind; clear r1-r5 at a main-frame unwind exit.
- bpf_unwind() leaves its own caller alone; the fixups put 'r0 = 0' and a jump to its pad after the call.
- Refuse bpf_throw() and an exception callback with any unwind, not only with a table.
- Refuse a subprogram an unwind passes through that has no exit.
- Patch 8's rule that a frame an unwind leaves holds what it entered with no longer keeps the pads safe; it stays to refuse a program at the frame at fault.
- A speculative walk leaves no in-pad or outside-pad mark.
- x86, arm64: warn on a hooked return. arm64: take the PAC modifier as record + 16, and allow a shadow call stack.
- libbpf: narrow the _Unwind_Resume translation, close the opts hole, size the light skeleton's attr by need, and tighten the linker check.
v6 -> v7:
- v6: https://lore.kernel.org/bpf/[email protected]/
- New patch: require an unwind to leave a frame holding what it entered with, including at a call it passes through with no record over it.
- A resume ends the verifier's path instead of walking back to the instruction after the call, where an unwind never returns.
- Refuse a private stack for any program that can unwind, not only one carrying a table.
- Refuse a table for a program whose verifier_ops plants an epilogue, and scan the whole instruction stream for bpf_throw().
- Keep the last exit of every subprogram an unwind can pass through, not only the one after a bpf_unwind() call, and search for it.
- Fix precision backtracking across a resume, push a landing pad by itself so the CFG walk's DFS invariant holds, and mark callx sites.
- x86: leave a frame whose return a tracer has hooked alone; no ENDBR at a pad head, which is only ever reached by a return.
- arm64: no BTI at a pad head; ask the build whether a return address is signed; refuse cleanup pads where a shadow call stack is in use.
- Answer a speculative walk reaching a pad with a barrier, not a refusal.
- selftests: add the negative shapes for the above, allow repeated __set_global()/__ret_global(), and drop duplicate accepted shapes.
v5 -> v6:
- v5: https://lore.kernel.org/bpf/[email protected]/
- Run a pad in the frame that owns it: bpf_unwind() rewrites each frame's saved return address rather than calling the pad as a subroutine of the walker. The bpf_cleanup_pad.S trampolines, the per-frame spill area and the pad-entry register header all go away.
- Raise the unwind with a new bpf_unwind() kfunc, so that bpf_throw() keeps its meaning.
- Add arch_bpf_stack_walk_ra(), which also hands out the slot a return address came from. arm64 re-signs the address it writes there.
- A pad is an ordinary second successor of a covered call, so the verifier needs no unwind edge of its own: the cross-frame precision and liveness work is gone, with the v5 fixes it needed, and two patches become one.
- Refuse the undispatchable shapes per instruction in do_check(), keyed on a per-frame mark, rather than by walking each pad.
- Allow on-stack call arguments in a pad, which now has its own frame.
- Add __set_global() and __ret_global() test tags, so RUN_TESTS() drives the shapes and test_shapes() goes away (suggested by Eduard).
- Drop the shapes that needed a driver of their own, and the three extension objects with them.
v4 -> v5:
- v4: https://lore.kernel.org/bpf/[email protected]/
- Rebase on bpf-next.
- Clear r0 where a throw enters a landing pad: no instruction defines it, so a precision request for it outlived the state and oopsed the verifier.
- Defer entering the frames an unwind edge crossed until the backtrack reads an instruction from them; entering at the landing pad could leave bt->frame past the parent state's frames and oops the verifier.
- Stamp the popped frame count inside bpf_push_jmp_history(), so a pad's entry carries it even when the prune path is what creates the entry.
- Replace the hand-rolled CFG traversal and its separate pass with per-instruction checks in do_check(), keyed on the verifier's unwinding state; kernel/bpf/exception.c halves.
- Add a first patch packing bpf_insn_aux_data's flags into one bit field word, 144 bytes to 128, so the flags this series adds cost bits.
- Drop the per-subprogram arrays the JITs consulted for throw sites, resume sites and pad bodies, and read insn_aux_data, which a JIT already has.
- Drop the pad-entry r0 header: r0 at a pad is an unknown scalar, and a dispatcher writes a defined value there only to keep a kernel one out of BPF.
- Take the bool arguments back out of verifier_remove_insns() and the site collector, and share pop_frame() with prepare_func_exit().
- Rename the recorded call sites to throw_call and resume_call, give the exported functions a bpf_exc_ prefix, and drop cleanup_ from the statics.
v3 -> v4:
- v3: https://lore.kernel.org/bpf/[email protected]/
- Rebase on bpf-next due to conflict.
- Reserve the throw-site spill area only in a (sub)program that calls bpf_throw(): 40 bytes of stack per frame on x86-64, 80 on arm64.
- Bound the record count by the number of instructions in the program, and name both in the message.
- Refuse a .bpf_cleanup section in libbpf whose record count cannot be handed to the kernel as a count times a record size in an int.
- Fix the static linker's new bounds check, which could itself wrap, and refuse a section too small to hold one field.
- WARN once if the body of bpf_unwind_resume() is ever reached, the way bpf_throw() does where its exception callback should never return.
- Rename nr_pad_body to pad_body_bits, use BTF_ID_LIST_SINGLE, move cleanup_pad out of insn_aux_data's bools, drop an arm64 include.
v2 -> v3:
- v2: https://lore.kernel.org/bpf/[email protected]/
- Keep a landing pad's record when opt_remove_nops() deletes a pad that is a nop, instead of dropping it after the verifier has already checked the call site against it.
- Refuse a BPF_LD_[ABS|IND] in a pad body.
- Teach mark_chain_precision() about the throw-to-pad edge, which crosses frames with no instruction to account for them.
- Refuse a bpf_unwind_resume() in any frame but the one whose landing pad the walker entered.
- Check raw_data, alignment and bounds before the static linker writes through a relocation in a non-executable section, which may be SHT_NOBITS.
v1 -> v2:
- v1: https://lore.kernel.org/bpf/[email protected]/
- Consolidate all usages of kern_extern_name() in a single patch in libbpf.
- Avoid compiler warning and add proper cleanup_info_cnt guard in libbpf when collecting .bpf_cleanup records.
- Add cleanup_info_cnt condition for emit_rel_store() with cleanup_info.

Yonghong Song (25):
bpf: Accept the compiler's exception cleanup table at program load
bpf: Add the bpf_unwind() and bpf_unwind_resume() kfuncs
bpf: Keep a call site's landing pad in insn_aux_data, add lookups
bpf: Mark covered call sites and check a program can take a table
bpf: Make exception landing pads reachable in the CFG
bpf: Verify an unwind through landing pads and epilogues
bpf: Refuse a callback that can unwind
bpf: Refuse a landing pad that does not resume
bpf: Do not use a private stack for a program that can unwind
bpf: Prepare JITed programs for dispatching cleanup pads
bpf: Keep an epilogue for each subprog an unwind can pass through
bpf: Allow a subprog to end with a call that does not return
bpf: Dispatch cleanup pads by rewriting return addresses
bpf: Refuse a trampoline that calls a subprog that can unwind bpf, x86: Dispatch exception cleanup pads at run time
bpf, arm64: Dispatch exception cleanup pads at run time
libbpf: Resolve the compiler's _Unwind_Resume to the kernel's kfunc
libbpf: Add cleanup_info to bpf_prog_load_opts
libbpf: Collect .bpf_cleanup records and pass them to the kernel
libbpf: Carry the exception cleanup table through the light skeleton
libbpf: Let the static linker carry .bpf_cleanup relocations selftests/bpf: Add end-to-end and negative .bpf_cleanup exception
tests
selftests/bpf: Add __set_global() and __ret_global() test tags selftests/bpf: Cover more accepted .bpf_cleanup exception shapes selftests/bpf: Load an exception cleanup program from a light skeleton

 arch/arm64/kernel/stacktrace.c                |   77 ++
 arch/arm64/net/bpf_jit_comp.c                 |   16 +
 arch/x86/net/bpf_jit_comp.c                   |   36 +
 include/linux/bpf.h                           |   31 +
 include/linux/bpf_verifier.h                  |   20 +-
 include/linux/filter.h                        |    3 +
 include/uapi/linux/bpf.h                      |   14 +
 kernel/bpf/Makefile                           |    2 +-
 kernel/bpf/backtrack.c                        |   40 +-
 kernel/bpf/cfg.c                              |  126 ++
 kernel/bpf/core.c                             |   12 +
 kernel/bpf/exception.c                        |  379 ++++++
 kernel/bpf/exception.h                        |   30 +
 kernel/bpf/fixups.c                           |  191 ++-
 kernel/bpf/helpers.c                          |   78 ++
 kernel/bpf/liveness.c                         |   24 +-
 kernel/bpf/states.c                           |   11 +-
 kernel/bpf/syscall.c                          |    2 +-
 kernel/bpf/verifier.c                         |  322 ++++-
 tools/include/uapi/linux/bpf.h                |   14 +
 tools/lib/bpf/bpf.c                           |    6 +-
 tools/lib/bpf/bpf.h                           |   10 +-
 tools/lib/bpf/gen_loader.c                    |   29 +-
 tools/lib/bpf/libbpf.c                        |  343 ++++-
 tools/lib/bpf/libbpf_internal.h               |   10 +
 tools/lib/bpf/linker.c                        |   39 +-
 tools/testing/selftests/bpf/Makefile.skel     |    2 +-
 .../selftests/bpf/exceptions_cleanup.h        |   48 +
 .../bpf/prog_tests/exceptions_cleanup.c       |  173 +++
 tools/testing/selftests/bpf/progs/bpf_misc.h  |   12 +
 .../selftests/bpf/progs/exceptions_cleanup.c  |  157 +++
 .../bpf/progs/exceptions_cleanup_fail.c       |  792 ++++++++++++
 .../bpf/progs/exceptions_cleanup_shapes.c     | 1134 +++++++++++++++++
 .../bpf/progs/exceptions_cleanup_tracing.c    |   26 +
 tools/testing/selftests/bpf/test_loader.c     |  319 ++++-
 35 files changed, 4467 insertions(+), 61 deletions(-)
 create mode 100644 kernel/bpf/exception.c
 create mode 100644 kernel/bpf/exception.h
 create mode 100644 tools/testing/selftests/bpf/exceptions_cleanup.h
 create mode 100644 tools/testing/selftests/bpf/prog_tests/exceptions_cleanup.c
 create mode 100644 tools/testing/selftests/bpf/progs/exceptions_cleanup.c
 create mode 100644 tools/testing/selftests/bpf/progs/exceptions_cleanup_fail.c
 create mode 100644 tools/testing/selftests/bpf/progs/exceptions_cleanup_shapes.c
 create mode 100644 tools/testing/selftests/bpf/progs/exceptions_cleanup_tracing.c
Signature · 1 line
2.53.0-Meta