public inbox for [email protected]
 help / color / mirror / Atom feed
* [PATCH 0/3] bpf: optimize the bpf_kprobe_multi_link_attach function
@ 2022-05-12 14:17 Wan Jiabing
  2022-05-12 14:17 ` [PATCH 1/3] bpf: use 'error_xxx' tags in bpf_kprobe_multi_link_attach Wan Jiabing
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Wan Jiabing @ 2022-05-12 14:17 UTC (permalink / raw)
  To: Steven Rostedt, Ingo Molnar, Alexei Starovoitov, Daniel Borkmann,
	Andrii Nakryiko, Martin KaFai Lau, Song Liu, Yonghong Song,
	John Fastabend, KP Singh, netdev, bpf, linux-kernel
  Cc: Wan Jiabing

This patch series tries to optimize the bpf_kporbe_multi_link_attach
in bpf_trace.c

Firstly, there is only one 'error' tag to handle error code. But in one
'error' tag, there are three 'free' functions which is not efficient. So
I split this one tag to three tags to make it clear.

Secondly, I simplify double 'if' statements to one statement.

Finally, coccicheck reports an opportunity for vmemdup_user. So I use
vmemdup_user to make code cleaner.

Wan Jiabing (3):
  bpf: use 'error_xxx' tags in bpf_kprobe_multi_link_attach
  bpf: simplify if-if to if in bpf_kprobe_multi_link_attach
  bpf: use vmemdup_user instead of kvmalloc and copy_from_user

 kernel/trace/bpf_trace.c | 34 +++++++++++++++-------------------
 1 file changed, 15 insertions(+), 19 deletions(-)

-- 
2.35.1



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

end of thread, other threads:[~2022-05-12 17:05 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-05-12 14:17 [PATCH 0/3] bpf: optimize the bpf_kprobe_multi_link_attach function Wan Jiabing
2022-05-12 14:17 ` [PATCH 1/3] bpf: use 'error_xxx' tags in bpf_kprobe_multi_link_attach Wan Jiabing
2022-05-12 16:40   ` Song Liu
2022-05-12 17:05   ` David Vernet
2022-05-12 14:17 ` [PATCH 2/3] bpf: simplify if-if to if " Wan Jiabing
2022-05-12 16:44   ` Song Liu
2022-05-12 14:17 ` [PATCH 3/3] bpf: use vmemdup_user instead of kvmalloc and copy_from_user Wan Jiabing
2022-05-12 16:45   ` Song Liu

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