lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  PHC 
Open Source and information security mailing list archives
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 12 May 2022 22:17:07 +0800
From:   Wan Jiabing <>
To:     Steven Rostedt <>,
        Ingo Molnar <>,
        Alexei Starovoitov <>,
        Daniel Borkmann <>,
        Andrii Nakryiko <>,
        Martin KaFai Lau <>,
        Song Liu <>, Yonghong Song <>,
        John Fastabend <>,
        KP Singh <>,,,
Cc:     Wan Jiabing <>
Subject: [PATCH 0/3] bpf: optimize the bpf_kprobe_multi_link_attach function

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(-)


Powered by blists - more mailing lists