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: <8feaae24-835a-43e3-bd4a-615390a0ba3b@arm.com>
Date: Mon, 30 Jun 2025 11:37:48 +0100
From: Suzuki K Poulose <suzuki.poulose@....com>
To: Yuanfang Zhang <quic_yuanfang@...cinc.com>,
 Mike Leach <mike.leach@...aro.org>, James Clark <james.clark@...aro.org>,
 Alexander Shishkin <alexander.shishkin@...ux.intel.com>
Cc: kernel@....qualcomm.com, coresight@...ts.linaro.org,
 linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] coresight: Only register perf symlink for sinks with
 alloc_buffer

On 30/06/2025 11:26, Yuanfang Zhang wrote:
> Ensure that etm_perf_add_symlink_sink() is only called for devices
> that implement the alloc_buffer operation. This prevents invalid
> symlink creation for dummy sinks that do not implement alloc_buffer.
> 
> Without this check, perf may attempt to use a dummy sink that lacks
> alloc_buffer operationsu to initialise perf's ring buffer, leading
> to runtime failures.
> 
> Fixes: 9d3ba0b6c0569 ("Coresight: Add coresight dummy driver")
> Signed-off-by: Yuanfang Zhang <quic_yuanfang@...cinc.com>
> ---
>   drivers/hwtracing/coresight/coresight-core.c | 5 +++--
>   1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/hwtracing/coresight/coresight-core.c b/drivers/hwtracing/coresight/coresight-core.c
> index fa758cc21827552a5c97b6bdd05d22dec4994b22..fddf04c5ee46eb4d559416296f7e85ce6c5689fa 100644
> --- a/drivers/hwtracing/coresight/coresight-core.c
> +++ b/drivers/hwtracing/coresight/coresight-core.c
> @@ -1374,8 +1374,9 @@ struct coresight_device *coresight_register(struct coresight_desc *desc)
>   		goto out_unlock;
>   	}
>   
> -	if (csdev->type == CORESIGHT_DEV_TYPE_SINK ||
> -	    csdev->type == CORESIGHT_DEV_TYPE_LINKSINK) {
> +	if ((csdev->type == CORESIGHT_DEV_TYPE_SINK ||
> +	     csdev->type == CORESIGHT_DEV_TYPE_LINKSINK) &&
> +	    sink_ops(csdev)->alloc_buffer) {
>   		ret = etm_perf_add_symlink_sink(csdev);
>   
>   		if (ret) {
> 

Looks good to me, I will queue this

Suzuki


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ