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: <ee18e89b77f0c08ef45cbcc75e2361bf.sboyd@kernel.org>
Date: Mon, 06 May 2024 17:04:35 -0700
From: Stephen Boyd <sboyd@...nel.org>
To: Md Sadre Alam <quic_mdalam@...cinc.com>, andersson@...nel.org, bhupesh.sharma@...aro.org, linux-arm-msm@...r.kernel.org, linux-clk@...r.kernel.org, linux-kernel@...r.kernel.org, mturquette@...libre.com, quic_anusha@...cinc.com
Cc: quic_mdalam@...cinc.com, quic_srichara@...cinc.com, quic_varada@...cinc.com, stable@...r.kernel.org
Subject: Re: [PATCH v2] clk: qcom: gcc-ipq9574: Add BRANCH_HALT_VOTED flag

Quoting Md Sadre Alam (2024-05-05 23:37:51)
> Add BRANCH_HALT_VOTED flag to inform clock framework
> don't check for CLK_OFF bit.
> 
> CRYPTO_AHB_CLK_ENA and CRYPTO_AXI_CLK_ENA enable bit is
> present in other VOTE registers also, like TZ.
> If anyone else also enabled this clock, even if we turn
> off in GCC_APCS_CLOCK_BRANCH_ENA_VOTE | 0x180B004, it won't
> turn off.
> Also changes the CRYPTO_AHB_CLK_ENA & CRYPTO_AXI_CLK_ENA
> offset to 0xb004 from 0x16014.

How about this?

 The crypto_ahb and crypto_axi clks are hardware voteable. This means
 that the halt bit isn't reliable because some other voter in the
 system, e.g. TrustZone, could be keeping the clk enabled when the
 kernel turns it off from clk_disable(). Make these clks use voting mode
 by changing the halt check to BRANCH_HALT_VOTED and toggle the voting
 bit in the voting register instead of directly controlling the branch
 by writing to the branch register. This fixes stuck clk warnings seen
 on ipq9574 and saves power by actually turning the clk off.

> 
> Cc: stable@...r.kernel.org
> Fixes: f6b2bd9cb29a ("clk: qcom: gcc-ipq9574: Enable crypto clocks")
> Signed-off-by: Md Sadre Alam <quic_mdalam@...cinc.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ