bpf: Introduce bpf_in_interrupt kfunc
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v2 Latest2 patches 9 repliesIn review
- v12 patches 0 repliesSuperseded
Changes in v2 from the cover letter
* Fix a build error reported by test bot.
Patches in v2 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | bpf: Introduce bpf_in_interrupt kfunckernel/ kernel/ | +20 | 6 replies | |
| 2/2 | selftests/bpf: Add case to test bpf_in_interrupt kfunctools/ | +7 | 3 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.
Cover letter [PATCH bpf-next v2 0/2] bpf: Introduce bpf_in_interrupt kfunc
Filtering pid_tgid is meaningless when the current task is preempted by an interrupt.
To address this, introduce the bpf_in_interrupt kfunc, which allows BPF programs to determine whether they are executing in interrupt context.
Internally, bpf_in_interrupt() is a thin wrapper around in_interrupt(). It is marked as fastcall function.
On x86_64, it is inlined for efficiency.
Changes:
v1 -> v2:
* Fix a build error reported by test bot.
Leon Hwang (2):
bpf: Introduce bpf_in_interrupt kfunc selftests/bpf: Add case to test bpf_in_interrupt kfunc
kernel/bpf/helpers.c | 9 +++++++++ kernel/bpf/verifier.c | 11 +++++++++++ tools/testing/selftests/bpf/progs/irq.c | 7 +++++++ 3 files changed, 27 insertions(+)
--
2.50.1