-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
libbpf-tools: Check biolatency tracepoints using BTF
The biolatency has a kernel version check to detect changes in the some block tracepoint format. But it can be a problem if the old kernel backported the change. Then the BPF verifier would reject the program due to invalid access to the argument. We can do better using BTF since it has the type information. Instead of checking kernel version, it can check the prototype of the tracepoint function. For example, block_rq_issue tracepoint has this for recent kernels: typedef void (*btf_trace_block_rq_issue)(void *, struct request *); Let's check the number of arguments in the prototype - actually it has one more argument for the context. Signed-off-by: Namhyung Kim <[email protected]>
- Loading branch information
1 parent
0eb0120
commit 952415e
Showing
2 changed files
with
38 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters