]> git.baikalelectronics.ru Git - kernel.git/commit
libbpf: Improve string parsing for uprobe auto-attach
authorAlan Maguire <alan.maguire@oracle.com>
Wed, 6 Apr 2022 11:43:50 +0000 (12:43 +0100)
committerAndrii Nakryiko <andrii@kernel.org>
Thu, 7 Apr 2022 18:42:50 +0000 (11:42 -0700)
commite9af2da213667092a7458ce1d06f1ef942f3b4ed
treecfbd452d47e6abc4d573cba56346b31081ed9d15
parent7a3926a403af167bcdb7e7a93003aba9539fe12e
libbpf: Improve string parsing for uprobe auto-attach

For uprobe auto-attach, the parsing can be simplified for the SEC()
name to a single sscanf(); the return value of the sscanf can then
be used to distinguish between sections that simply specify
"u[ret]probe" (and thus cannot auto-attach), those that specify
"u[ret]probe/binary_path:function+offset" etc.

Suggested-by: Andrii Nakryiko <andrii@kernel.org>
Signed-off-by: Alan Maguire <alan.maguire@oracle.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/1649245431-29956-3-git-send-email-alan.maguire@oracle.com
tools/lib/bpf/libbpf.c