BPF List
 help / color / mirror / Atom feed
* [PATCH bpf-next v2 0/3] bpf: bpf trampoline improvements
@ 2023-05-15 13:08 Yafang Shao
  2023-05-15 13:08 ` [PATCH bpf-next v2 1/3] bpf: Fix memleak due to fentry attach failure Yafang Shao
                   ` (2 more replies)
  0 siblings, 3 replies; 12+ messages in thread
From: Yafang Shao @ 2023-05-15 13:08 UTC (permalink / raw)
  To: ast, daniel, andrii, kafai, songliubraving, yhs, john.fastabend,
	kpsingh, sdf, haoluo, jolsa
  Cc: bpf, Yafang Shao

When we run fexit bpf programs (e.g. attaching tcp_recvmsg) on our servers
which were running old kernels, some of these servers crashed. Finally we
figured out that it was caused by the same issue resolved by
commit e21aa341785c ("bpf: Fix fexit trampoline."). After we backported
that commit, the crash disappears. However new issues are introduced by
that commit. This patchset fixes them.

PATCH #1: Fix a memory leak found on our server
PATCH #2: Remove bpf trampoline selector and also fix the issue in perf
          caused by the name change in bpf trampoline
PATCH #3: Show target_{obj,btf}_id when link to a bpf trampoline

v1->v2:
- Reuse the common code between __bpf_tramp_image_put_deferred and
  bpf_tramp_image_free (Song)
- Add fixes tag in patch #1 (Song)
- Restore the old bpf trampoline name format (Song)
- Jiri pointed out a issue in perf
- Show btf information in the tracing link info

Yafang Shao (3):
  bpf: Fix memleak due to fentry attach failure
  bpf: Remove bpf trampoline selector
  bpf: Show target_{obj,btf}_id in tracing link info

 include/linux/bpf.h      |  1 -
 kernel/bpf/syscall.c     | 12 ++++++++++--
 kernel/bpf/trampoline.c  | 32 +++++++++++++++++++-------------
 tools/bpf/bpftool/link.c |  4 ++++
 4 files changed, 33 insertions(+), 16 deletions(-)

-- 
1.8.3.1


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

end of thread, other threads:[~2023-05-16  2:21 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-05-15 13:08 [PATCH bpf-next v2 0/3] bpf: bpf trampoline improvements Yafang Shao
2023-05-15 13:08 ` [PATCH bpf-next v2 1/3] bpf: Fix memleak due to fentry attach failure Yafang Shao
2023-05-15 15:52   ` Song Liu
2023-05-15 20:17     ` Daniel Borkmann
2023-05-15 21:14       ` Song Liu
2023-05-15 21:49         ` Daniel Borkmann
2023-05-15 13:08 ` [PATCH bpf-next v2 2/3] bpf: Remove bpf trampoline selector Yafang Shao
2023-05-15 15:53   ` Song Liu
2023-05-15 20:42     ` Daniel Borkmann
2023-05-15 13:08 ` [PATCH bpf-next v2 3/3] bpf: Show target_{obj,btf}_id in tracing link info Yafang Shao
2023-05-15 16:12   ` Song Liu
2023-05-16  2:21     ` Yafang Shao

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