lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250424094050.GE19534@noisy.programming.kicks-ass.net>
Date: Thu, 24 Apr 2025 11:40:50 +0200
From: Peter Zijlstra <peterz@...radead.org>
To: kan.liang@...ux.intel.com
Cc: mingo@...hat.com, acme@...nel.org, namhyung@...nel.org,
	irogers@...gle.com, linux-kernel@...r.kernel.org,
	Luo Gengkun <luogengkun@...weicloud.com>
Subject: Re: [PATCH 1/2] perf/x86/intel: Only check the group flag for X86
 leader

On Wed, Apr 23, 2025 at 03:10:14PM -0700, kan.liang@...ux.intel.com wrote:
> From: Kan Liang <kan.liang@...ux.intel.com>
> 
> A warning in intel_pmu_lbr_counters_reorder() may be triggered by below
> perf command.
> 
> perf record -e "{cpu-clock,cycles/call-graph="lbr"/}" -- sleep 1
> 
> It's because the group is mistakenly treated as a branch counter group.
> 
> The hw.flags of the leader are used to determine whether a group is a
> branch counters group. However, the hw.flags is only available for a
> hardware event. The field to store the flags is a union type. For a
> software event, it's a hrtimer. The corresponding bit may be set if the
> leader is a software event.
> 
> For a branch counter group and other groups that have a group flag
> (e.g., topdown, PEBS counters snapshotting, and ACR), the leader must
> be a X86 event. Check the X86 event before checking the flag.
> 
> There may be an alternative way to fix the issue by moving the hw.flags
> out of the union type. It should work for now. But it's still possible
> that the flags will be used by other types of events later. As long as
> that type of event is used as a leader, a similar issue will be
> triggered. So the alternative way is dropped.
> 
> Reported-by: Luo Gengkun <luogengkun@...weicloud.com>
> Closes: https://lore.kernel.org/lkml/20250412091423.1839809-1-luogengkun@huaweicloud.com/
> Signed-off-by: Kan Liang <kan.liang@...ux.intel.com>

Can I get a Fixes tag for this such that I can stick it in urgent?


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ