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: <b5c9aa6e-69d1-165a-4ff9-b5a9f33688e6@linaro.org>
Date:   Fri, 10 Mar 2023 09:13:29 +0100
From:   Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>
To:     Eric Biggers <ebiggers@...nel.org>
Cc:     Abel Vesa <abel.vesa@...aro.org>,
        Ulf Hansson <ulf.hansson@...aro.org>,
        Rob Herring <robh+dt@...nel.org>,
        Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
        Andy Gross <agross@...nel.org>,
        Bjorn Andersson <andersson@...nel.org>,
        Konrad Dybcio <konrad.dybcio@...aro.org>,
        Manivannan Sadhasivam <mani@...nel.org>,
        Alim Akhtar <alim.akhtar@...sung.com>,
        Avri Altman <avri.altman@....com>,
        Bart Van Assche <bvanassche@....org>,
        Adrian Hunter <adrian.hunter@...el.com>,
        "James E . J . Bottomley" <jejb@...ux.ibm.com>,
        "Martin K . Petersen" <martin.petersen@...cle.com>,
        linux-mmc@...r.kernel.org, devicetree@...r.kernel.org,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        linux-arm-msm@...r.kernel.org, linux-scsi@...r.kernel.org
Subject: Re: [RFC PATCH v2 7/7] arm64: dts: qcom: Add the Inline Crypto Engine
 nodes

On 09/03/2023 19:31, Eric Biggers wrote:
> On Thu, Mar 09, 2023 at 11:31:46AM +0100, Krzysztof Kozlowski wrote:
>> On 08/03/2023 16:58, Abel Vesa wrote:
>>> Drop all properties related to ICE from every UFS and SDCC node,
>>> for all platforms, and add dedicated ICE nodes for each platform.
>>> On most platforms, there is only one ICE instance, used by either
>>> UFS or SDCC, but there are some platforms that have two separate
>>> instances and, therefore, two separate nodes are added.
>>>
>>> Signed-off-by: Abel Vesa <abel.vesa@...aro.org>
>>> ---
>>>
>>> Changes since v1:
>>>  * Made changes for all platforms that use ICE, as a single patch since
>>>    most changes look really similar.
>>>
>>>  arch/arm64/boot/dts/qcom/sdm630.dtsi | 18 +++++++++-----
>>>  arch/arm64/boot/dts/qcom/sdm670.dtsi | 15 +++++++----
>>>  arch/arm64/boot/dts/qcom/sdm845.dtsi | 21 +++++++++-------
>>>  arch/arm64/boot/dts/qcom/sm6115.dtsi | 37 +++++++++++++++++-----------
>>>  arch/arm64/boot/dts/qcom/sm6350.dtsi | 31 ++++++++++++++---------
>>>  arch/arm64/boot/dts/qcom/sm8150.dtsi | 21 +++++++++-------
>>>  arch/arm64/boot/dts/qcom/sm8450.dtsi | 22 ++++++++++-------
>>>  7 files changed, 102 insertions(+), 63 deletions(-)
>>>
>>> diff --git a/arch/arm64/boot/dts/qcom/sdm630.dtsi b/arch/arm64/boot/dts/qcom/sdm630.dtsi
>>> index 5827cda270a0..2aed49104d9d 100644
>>> --- a/arch/arm64/boot/dts/qcom/sdm630.dtsi
>>> +++ b/arch/arm64/boot/dts/qcom/sdm630.dtsi
>>> @@ -1330,9 +1330,8 @@ opp-200000000 {
>>>  		sdhc_1: mmc@...4000 {
>>>  			compatible = "qcom,sdm630-sdhci", "qcom,sdhci-msm-v5";
>>>  			reg = <0x0c0c4000 0x1000>,
>>> -			      <0x0c0c5000 0x1000>,
>>> -			      <0x0c0c8000 0x8000>;
>>> -			reg-names = "hc", "cqhci", "ice";
>>> +			      <0x0c0c5000 0x1000>;
>>> +			reg-names = "hc", "cqhci";
>>
>> I believe this will break the ICE on these platforms without valid
>> reason. The commit msg does not explain why you do it or why this is
>> necessary.
>>
>> We already we received comment that we keep breaking Qualcomm platforms
>> all the time and need to keep them in some shape.
>>
>> Also, patchset is non-applicable in current set (breaks users) and
>> neither commit nor cover letter mentions it.
>>
> 
> FWIW, I tested this patchset on SDA845, and ICE continues to work fine.

Really? I clearly see of_find_device_by_node -> "return NULL" and all
old code gone, so ABI is broken. Are you sure you applied patch 1-6 and
ICE was working?

> 
> (Though if I understand the patchset correctly, the ICE clock is no longer
> turned off when the UFS host controller is suspended.  That isn't ideal as it
> wastes power.  I would like that to be fixed.)
> 
> Anyway, when you say "break the ICE", do you really mean "make an incompatible
> change to the device-tree bindings"?

It breaks existing users of DTS and kernel.

> 
> I'd think there would be no problem with that as long as everything is updated
> at once, which this patchset does.

Which is obviously not possible. DTS always goes separate branch,
always. It cannot be combined with code into the same branch! So how do
you even imagine this?

> 
> I've heard before that some people consider the device-tree bindings to be a
> stable UAPI.  That doesn't make sense to me. 

It is stable ABI. Bindings and DTS are used by other firmwares,
bootloaders and systems. The kernel *must* work with old and out of tree
DTS.

Even if this does not make sense to you, these are the realities,
practice and current rules.


> Actually, my original ICE patches
> ran into this issue too, and the resolution was simply that the Qualcomm
> platforms maintainer (Bjorn) decided to take the patches anyway.  I never heard
> any complaints afterwards.  Maybe the same is fine here too?


No, it is not fine. The patchset breaks ABI, breaks existing kernel with
old DTS and breaks other projects using DTS and bindings.

Best regards,
Krzysztof

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ