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: Fri, 29 Mar 2024 10:22:47 +0530
From: "Maulik Shah (mkshah)" <quic_mkshah@...cinc.com>
To: Volodymyr Babchuk <Volodymyr_Babchuk@...m.com>
CC: Caleb Connolly <caleb.connolly@...aro.org>,
        "andersson@...nel.org >> Bjorn
 Andersson" <andersson@...nel.org>,
        Konrad Dybcio <konrad.dybcio@...aro.org>,
        linux-arm-msm <linux-arm-msm@...r.kernel.org>,
        LKML
	<linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] soc: qcom: cmd-db: map shared memory as WT, not WB



On 3/29/2024 3:49 AM, Volodymyr Babchuk wrote:
> 
> Hi Maulik
> 
> "Maulik Shah (mkshah)" <quic_mkshah@...cinc.com> writes:
> 
>> On 3/28/2024 1:39 AM, Volodymyr Babchuk wrote:
>>> It appears that hardware does not like cacheable accesses to this
>>> region. Trying to access this shared memory region as Normal Memory
>>> leads to secure interrupt which causes an endless loop somewhere in
>>> Trust Zone.
>>
>> Linux does not write into cmd-db region. This region is write
>> protected by XPU. Making this region uncached magically solves the XPU
>> write fault
>> issue.
>>
>> Can you please include above details?
> 
> Sure, I'll add this to the next version.
> 

Thanks.

>>
>> In downstream, we have below which resolved similar issue on qcm6490.
>>
>> cmd_db_header = memremap(rmem->base, rmem->size, MEMREMAP_WC);
>>
>> Downstream SA8155P also have MEMREMAP_WC. Can you please give it a try
>> on your device?
> 
> Yes, MEMREMAP_WC works as well. This opens the question: which type is
> more correct? I have no deep understanding in QCOM internals so it is
> hard to me to answer this question.
> 

XPU may have falsely detected clean cache eviction as "write" into the 
write protected region so using uncached flag MEMREMAP_WC may be helping 
here and is more correct in my understanding.

This can also be included in commit message.

Thanks,
Maulik

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ