Skip to content

bpf: Get rid of trace_printk_lock

Jiri Olsa bpf 1 version Applied

Status from this message: This series was applied to bpf/bpf-next.git (master)

Get series with b4
b4 am [email protected]

Versions newest first

  1. v3 Latest3 patches 3 repliesApplied 3/3

Changes in v3 from the cover letter

- added struct to hold return data in bpf_bprintf_prepare
- fix bug in bpf_bprintf_cleanup
- adjust printk helpers to use new bpf_bprintf_prepare data argument

Patches in v3 All 3 applied

#Subject and filesSizeRepliesApplied
1/3bpf: Add struct for bin_args arg in bpf_bprintf_prepareinclude/linux/bpf.h kernel/bpf/helpers.c kernel/bpf/verifier.c +1 more+41 -271 replyApplied
2/3bpf: Do cleanup in bpf_bprintf_cleanup only when neededinclude/linux/bpf.h kernel/bpf/helpers.c kernel/trace/bpf_trace.c+13 -111 replyApplied
3/3bpf: Remove trace_printk_lockinclude/linux/bpf.h kernel/bpf/helpers.c kernel/trace/bpf_trace.c+28 -261 replyApplied

Reviews trailers per patch

All 3 patches have a Reviewed-by or Acked-by.

PatchYonghong Song
1/3A-b
2/3A-b
3/3A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v3 thread

Cover letter [PATCHv3 bpf-next 0/3] bpf: Get rid of trace_printk_lock

hi,
In the last revision Andrii suggested we could have the buffer provided by bpf_bprintf_prepare [1]. It's bit more changes but it looks like more compact solution.

v3 changes:
- added struct to hold return data in bpf_bprintf_prepare
- fix bug in bpf_bprintf_cleanup
- adjust printk helpers to use new bpf_bprintf_prepare data argument

thanks,
jirka

[1] https://lore.kernel.org/bpf/Y5pgxd9+G2wHROlp@krava/T/#m4b256e9138cdb37cd4477571f32e47a960aad317
---
Jiri Olsa (3):
bpf: Add struct for bin_args arg in bpf_bprintf_prepare
bpf: Do cleanup in bpf_bprintf_cleanup only when needed
bpf: Remove trace_printk_lock

 include/linux/bpf.h      | 12 ++++++++++--
 kernel/bpf/helpers.c     | 67 +++++++++++++++++++++++++++++++++++++++----------------------------
 kernel/bpf/verifier.c    |  3 ++-
 kernel/trace/bpf_trace.c | 56 +++++++++++++++++++++++++++-----------------------------
 4 files changed, 78 insertions(+), 60 deletions(-)