Re: [PATCH] perf dso: Stay in perf's mount namespace for cached debuginfo
From: Namhyung Kim
Date: Mon Nov 23 2026 - 16:42:27 EST
On Sat, 21 Nov 2026 14:25:23 -0800, Alireza Haghdoost wrote:
> When perf reads the data of a DSO that belongs to a process in another
> mount namespace, open_dso() enters that namespace to open the file. It
> does not do this for files in perf's own build-id cache, but it only
> checks for DSO_BINARY_TYPE__BUILD_ID_CACHE.
>
> Cached debuginfo files (DSO_BINARY_TYPE__BUILD_ID_CACHE_DEBUGINFO) are
> in the same build-id cache, yet open_dso() looks for them in the
> target's namespace. The file is usually not there, so for example
> perf script -F +insn prints no instruction bytes. If a file with the
> same path does exist there, perf reads the wrong file.
>
> [...]
Applied to perf-tools-next, thanks!
Best regards
Namhyung