diff options
| author | James Clark <james.clark@linaro.org> | 2025-11-24 13:59:08 +0300 |
|---|---|---|
| committer | Namhyung Kim <namhyung@kernel.org> | 2025-11-26 21:13:38 +0300 |
| commit | 834ebb5678d75d844f5d4f44ede78724d8c96630 (patch) | |
| tree | 5fb8b2822b690d6fbd2c5da826b08d816e6a4134 /tools/lib/python | |
| parent | c9573287729bc5ed3d2adbc028fe33d265917ae5 (diff) | |
| download | linux-834ebb5678d75d844f5d4f44ede78724d8c96630.tar.xz | |
perf tools: Don't read build-ids from non-regular files
Simplify the build ID reading code by removing the non-blocking option.
Having to pass the correct option to this function was fragile and a
mistake would result in a hang, see the linked fix. Furthermore,
compressed files are always opened blocking anyway, ignoring the
non-blocking option.
We also don't expect to read build IDs from non-regular files. The only
hits to this function that are non-regular are devices that won't be elf
files with build IDs, for example "/dev/dri/renderD129".
Now instead of opening these as non-blocking and failing to read, we
skip them. Even if something like a pipe or character device did have a
build ID, I don't think it would have worked because you need to call
read() in a loop, check for -EAGAIN and handle timeouts to make
non-blocking reads work.
Link: https://lore.kernel.org/linux-perf-users/20251022-james-perf-fix-dso-block-v1-1-c4faab150546@linaro.org/
Signed-off-by: James Clark <james.clark@linaro.org>
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Diffstat (limited to 'tools/lib/python')
0 files changed, 0 insertions, 0 deletions
