From: Ilkka Koskinen <ilkka@os.amperecomputing.com>
To: Robin Murphy <robin.murphy@arm.com>
Cc: will@kernel.org, mark.rutland@arm.com,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] perf/arm-cmn: Validate cycles events fully
Date: Mon, 3 Apr 2023 23:05:17 -0700 (PDT) [thread overview]
Message-ID: <1184027-2e39-2ed2-fa93-70c0a9d8e11@os.amperecomputing.com> (raw)
In-Reply-To: <3124e8c276a1f513c1a415dc839ca4181b3c8bc8.1680522545.git.robin.murphy@arm.com>
On Mon, 3 Apr 2023, Robin Murphy wrote:
> DTC cycle count events don't have anything to validate or initialise in
> themselves, but we should not forget to still validate their whole group
> context. Otherwise, we may fail to correctly reject a contrived group
> containing an impossible number of cycles events.
>
> Signed-off-by: Robin Murphy <robin.murphy@arm.com>
Looks good to me and works as expected.
Cheers, Ilkka
> ---
> drivers/perf/arm-cmn.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/perf/arm-cmn.c b/drivers/perf/arm-cmn.c
> index 367d41c5d983..45819528facb 100644
> --- a/drivers/perf/arm-cmn.c
> +++ b/drivers/perf/arm-cmn.c
> @@ -1558,7 +1558,7 @@ static int arm_cmn_event_init(struct perf_event *event)
> type = CMN_EVENT_TYPE(event);
> /* DTC events (i.e. cycles) already have everything they need */
> if (type == CMN_TYPE_DTC)
> - return 0;
> + return arm_cmn_validate_group(cmn, event);
>
> eventid = CMN_EVENT_EVENTID(event);
> /* For watchpoints we need the actual XP node here */
> --
> 2.39.2.101.g768bb238c484.dirty
>
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
>
next prev parent reply other threads:[~2023-04-04 6:05 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-03 11:49 Robin Murphy
2023-04-04 6:05 ` Ilkka Koskinen [this message]
2023-04-06 15:51 ` Will Deacon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1184027-2e39-2ed2-fa93-70c0a9d8e11@os.amperecomputing.com \
--to=ilkka@os.amperecomputing.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=robin.murphy@arm.com \
--cc=will@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®