Re: [PATCH v4] perf test: Fixes for check branch stack sampling

From: Namhyung Kim

Date: Tue Apr 14 2026 - 13:15:32 EST


On Wed, 08 Apr 2026 17:02:16 -0700, Ian Rogers wrote:
> When filtering branch stack samples on user events they sample in user
> land but may have come from the kernel. Aarch64 avoids leaking the
> kernel address for kaslr reasons but other platforms, for now,
> don't. Be more permissive in allowing kernel addresses in the source
> of user branch stacks.
>
> When filtering branch stack samples on kernel events they sample in
> kernel land but may have come from user land. Avoid the target being a
> user address but allow the source to be in user land. Aarch64 may not
> leak the user land addresses (making them 0) but other platforms
> do. As the kernel address sampling implies privelege, just allow this.
>
> [...]
Applied to perf-tools-next, thanks!

Best regards,
Namhyung