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]
Date:   Mon, 3 Apr 2023 23:05:17 -0700 (PDT)
From:   Ilkka Koskinen <ilkka@...amperecomputing.com>
To:     Robin Murphy <robin.murphy@....com>
cc:     will@...nel.org, mark.rutland@....com,
        linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] perf/arm-cmn: Validate cycles events fully


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@....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@...ts.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ