New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
mm/bpf/perf: Store build id in inode object #4684
Closed
Closed
Conversation
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
Storing build id in file's inode object for elf executable with build id defined. The build id is stored when file is mmaped. This is enabled with new config option CONFIG_INODE_BUILD_ID. The build id is valid only when the file with given inode is mmap-ed. We store either the build id itself or the error we hit during the retrieval. Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Use build id from file's inode object in stackmap if it's available. Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Use build id from file's inode object when available for perf's MMAP2 event build id data. Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Try to resolve uprobe/usdt binary path also in current directory, it's used in the test code in following changes. Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Adding read_build_id function that parses out build id from specified binary. It will replace extract_build_id and also be used in following changes. Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Moving error macros from profiler.inc.h to new err.h header. It will be used in following changes. Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Replacing extract_build_id with read_build_id that parses out build id directly from elf without using readelf tool. Signed-off-by: Jiri Olsa <jolsa@kernel.org>
The test attaches bpf program to sched_process_exec tracepoint and gets build of executed file from bprm->file->f_inode object. We use urandom_read as the test program and in addition we also attach uprobe to liburandom_read.so:urandlib_read_without_sema and retrieve and check build id of that shared library. Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Testing iterator access to build id in vma->vm_file->f_inode object by storing each binary with buildid into map and checking it against buildid retrieved in user space. Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Upstream branch: c8ee37b |
At least one diff in series https://patchwork.kernel.org/project/netdevbpf/list/?series=725442 expired. Closing PR. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Pull request for series with
subject: mm/bpf/perf: Store build id in inode object
version: 2
url: https://patchwork.kernel.org/project/netdevbpf/list/?series=725442