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: <20251114151810.GG3568724@e132581.arm.com>
Date: Fri, 14 Nov 2025 15:18:10 +0000
From: Leo Yan <leo.yan@....com>
To: James Clark <james.clark@...aro.org>
Cc: Suzuki K Poulose <suzuki.poulose@....com>,
	Mike Leach <mike.leach@...aro.org>,
	Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
	Jonathan Corbet <corbet@....net>, coresight@...ts.linaro.org,
	linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
	linux-doc@...r.kernel.org
Subject: Re: [PATCH v4 07/13] coresight: Don't reject unrecognized ETMv3
 format attributes

On Wed, Nov 12, 2025 at 03:22:13PM +0000, James Clark wrote:
> config isn't the only field, there are also config1, config2, etc.
> Rejecting unrecognized attributes is therefore inconsistent as it wasn't
> done for all fields. It was only necessary when we were directly
> programming attr->config into ETMCR and didn't hide the unsupported
> fields, but now it's not needed so remove it.

It is fine for not validating all configs (please ignore my comment for
checking all configs in my reply for patch 04).

I am wandering if need to remove ETM3X_SUPPORTED_OPTIONS totally. I
saw etm_enable_hw() uses it to clear config bits, so it makes sense to
keep it.

Reviewed-by: Leo Yan <leo.yan@....com>

> 
> Signed-off-by: James Clark <james.clark@...aro.org>
> ---
>  drivers/hwtracing/coresight/coresight-etm3x-core.c | 7 -------
>  1 file changed, 7 deletions(-)
> 
> diff --git a/drivers/hwtracing/coresight/coresight-etm3x-core.c b/drivers/hwtracing/coresight/coresight-etm3x-core.c
> index 4511fc2f8d72..584d653eda81 100644
> --- a/drivers/hwtracing/coresight/coresight-etm3x-core.c
> +++ b/drivers/hwtracing/coresight/coresight-etm3x-core.c
> @@ -333,13 +333,6 @@ static int etm_parse_event_config(struct etm_drvdata *drvdata,
>  	if (config->mode)
>  		etm_config_trace_mode(config);
>  
> -	/*
> -	 * At this time only cycle accurate, return stack  and timestamp
> -	 * options are available.
> -	 */
> -	if (attr->config & ~ETM3X_SUPPORTED_OPTIONS)
> -		return -EINVAL;
> -
>  	config->ctrl = 0;
>  
>  	if (ATTR_CFG_GET_FLD(attr, cycacc))
> 
> -- 
> 2.34.1
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ