[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YlQ3q9YFhQU9JsBt@robh.at.kernel.org>
Date: Mon, 11 Apr 2022 09:14:03 -0500
From: Rob Herring <robh@...nel.org>
To: Mark Rutland <mark.rutland@....com>
Cc: Will Deacon <will@...nel.org>, Al Grant <al.grant@....com>,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] arm_pmu: Validate single/group leader events
On Mon, Apr 11, 2022 at 11:04:26AM +0100, Mark Rutland wrote:
> Hi Rob,
>
> On Fri, Apr 08, 2022 at 03:33:30PM -0500, Rob Herring wrote:
> > In the case where there is only a cycle counter available (i.e.
> > PMCR_EL0.N is 0) and an event other than CPU cycles is opened, the open
> > should fail as the event can never possibly be scheduled. However, the
> > event validation when an event is opened is skipped when the group
> > leader is opened. Fix this by always validating the group leader events.
> >
> > Reported-by: Al Grant <al.grant@....com>
> > Cc: Will Deacon <will@...nel.org>
> > Cc: Mark Rutland <mark.rutland@....com>
> > Signed-off-by: Rob Herring <robh@...nel.org>
>
> This looks obviously correct to me, so FWIW:
>
> Acked-by: Mark Rutland <mark.rutland@....com>
Thanks.
> Just to check, have you tested this (e.g. by running on a platform with
> PMCR_EL0.N == 0, or hacking the PMU probing to report just the cycle counter)
Yes, tested on FVP with 0 counters running the libperf evsel userspace
access tests as that tries both the cycle counter and instruction
counts.
Rob
Powered by blists - more mailing lists