Skip to content
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
wants to merge 9 commits into from

Conversation

kernel-patches-bot
Copy link

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

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>
@kernel-patches-bot
Copy link
Author

Upstream branch: c8ee37b
series: https://patchwork.kernel.org/project/netdevbpf/list/?series=725442
version: 2

@kernel-patches-bot
Copy link
Author

At least one diff in series https://patchwork.kernel.org/project/netdevbpf/list/?series=725442 expired. Closing PR.

@kernel-patches-bot kernel-patches-bot deleted the series/725442=>bpf-next branch March 2, 2023 18:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants