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]
Date:   Sun, 20 Mar 2022 12:00:39 +0100
From:   Krzysztof Kozlowski <krzk@...nel.org>
To:     Luca Weiss <luca.weiss@...rphone.com>,
        linux-arm-msm@...r.kernel.org
Cc:     ~postmarketos/upstreaming@...ts.sr.ht, phone-devel@...r.kernel.org,
        Andy Gross <agross@...nel.org>,
        Bjorn Andersson <bjorn.andersson@...aro.org>,
        Rob Herring <robh+dt@...nel.org>,
        Krzysztof Kozlowski <krzk+dt@...nel.org>,
        devicetree@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 5/6] arm64: dts: qcom: sm6350: Add UFS nodes

On 19/03/2022 19:29, Luca Weiss wrote:
> Hi Krzysztof,
> 
> On Sat Mar 19, 2022 at 3:43 PM CET, Krzysztof Kozlowski wrote:
>> On 18/03/2022 19:30, Luca Weiss wrote:
>>> Add the necessary nodes for UFS and its PHY.
>>>
>>> Signed-off-by: Luca Weiss <luca.weiss@...rphone.com>
>>> ---
>>>  arch/arm64/boot/dts/qcom/sm6350.dtsi | 79 ++++++++++++++++++++++++++++
>>>  1 file changed, 79 insertions(+)
>>>
>>> diff --git a/arch/arm64/boot/dts/qcom/sm6350.dtsi b/arch/arm64/boot/dts/qcom/sm6350.dtsi
>>> index d7c9edff19f7..c5c93b6bcd2a 100644
>>> --- a/arch/arm64/boot/dts/qcom/sm6350.dtsi
>>> +++ b/arch/arm64/boot/dts/qcom/sm6350.dtsi
>>> @@ -541,6 +541,85 @@ uart2: serial@...000 {
>>>  			};
>>>  		};
>>>  
>>> +		ufs_mem_hc: ufshc@...4000 {
>>
>> Generic node name, so ufs.
> 
> With the node name changes UFS doesn't probe anymore.
> 
> [    1.893762] ufshcd-qcom 1d84000.ufs: ufshcd_variant_hba_init: variant qcom init failed err -19
> [    1.902674] ufshcd-qcom 1d84000.ufs: Initialization failed
> [    1.908391] ufshcd-qcom 1d84000.ufs: ufshcd_pltfrm_init() failed -19
> 
> I didn't debug this in detail but it's likely from the
> androidboot.bootdevice=1d84000.ufshc parameter in cmdline that
> ufs-qcom.c uses to fail probe with -ENODEV for all UFS other than the
> selected one. Not sure why this behavior exists in mainline (didn't look
> into this either).
> 
> This cmdline parameter (among many others) is added by the stock
> bootloader and as far as I know there's no way to turn that off.

I see now in the driver weird Android code like:
  static char android_boot_dev[ANDROID_BOOT_DEV_MAX];
  ....
  if (strlen(android_boot_dev) && strcmp(android_boot_dev, dev_name(dev)))

This is wrong. How is Android boot arguments needed for UFS? UFS is
independent of Android... what if you run it with different bootloader
and different system?

I understand that it is inconvenient for you to change the name, but
looking at driver code, I insist even more. :)


Best regards,
Krzysztof

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ