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: <20241014135653.GA17505@willie-the-truck>
Date: Mon, 14 Oct 2024 14:56:53 +0100
From: Will Deacon <will@...nel.org>
To: Youwan Wang <youwan@...china.com>
Cc: jonathan.cameron@...wei.com, yangyicong@...ilicon.com,
	mark.rutland@....com, linux-arm-kernel@...ts.infradead.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] drivers/perf: hisi: Fix readl DDRC_VERSION stuck

On Thu, Oct 10, 2024 at 04:42:17PM +0800, Youwan Wang wrote:
> The CPU of the device I am using is kunpeng 920,
> which can start normally with version 5.4 kernel.
> However, when installing version 6.6 kernel, the
> kernel gets stuck when loading the "hisi_dddrc_pmu"
> driver. I went to debug and found that it gets stuck
> when "readl (ddrc_pmu ->base+DDRC_VERSION)". I suspect
> that the hardware does not support it. My modification is:
> for the "HISI0233" device, according to the implementation
> of version 5.4 kernel, the identity is not obtained from
> the register. For "identifier" sysfs, identifier: 0
> 
> Signed-off-by: Youwan Wang <youwan@...china.com>
> ---
>  drivers/perf/hisilicon/hisi_uncore_ddrc_pmu.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/perf/hisilicon/hisi_uncore_ddrc_pmu.c b/drivers/perf/hisilicon/hisi_uncore_ddrc_pmu.c
> index b804e3738113..3cecad46b01f 100644
> --- a/drivers/perf/hisilicon/hisi_uncore_ddrc_pmu.c
> +++ b/drivers/perf/hisilicon/hisi_uncore_ddrc_pmu.c
> @@ -321,6 +321,9 @@ static int hisi_ddrc_pmu_init_data(struct platform_device *pdev,
>  		return PTR_ERR(ddrc_pmu->base);
>  	}
>  
> +	if (strstr(pdev->name, "HISI0233"))
> +		return 0;

If your firmware is advertising devices that don't exist, then you should
fix that rather than adding a hack to the driver.

Will

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ