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: <fa241568-32f1-4135-aacb-e94020d99c66@gmail.com>
Date: Sat, 16 Mar 2024 18:28:09 +0100
From: Artur Weber <aweber.kernel@...il.com>
To: Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>,
 Rob Herring <robh+dt@...nel.org>,
 Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
 Conor Dooley <conor+dt@...nel.org>, Alim Akhtar <alim.akhtar@...sung.com>
Cc: devicetree@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
 linux-samsung-soc@...r.kernel.org, linux-kernel@...r.kernel.org,
 ~postmarketos/upstreaming@...ts.sr.ht
Subject: Re: [PATCH] ARM: dts: exynos4212-tab3: limit usable memory range

On 22.02.2024 16:55, Krzysztof Kozlowski wrote:
> On 21/02/2024 09:26, Krzysztof Kozlowski wrote:
>> On 19/02/2024 20:49, Artur Weber wrote:
>>> On 19.02.2024 08:44, Krzysztof Kozlowski wrote:
>>>> On 17/02/2024 20:02, Artur Weber wrote:
>>>>> The stock bootloader on the Samsung Galaxy Tab 3 8.0 provides an
>>>>> incorrect available memory range over ATAG_MEM. Limit the usable
>>>>> memory in the DTS to prevent it from doing so, without having to
>>>>> disable ATAG support.
>>>>>
>>>>> Signed-off-by: Artur Weber <aweber.kernel@...il.com>
>>>>> ---
>>>>>    arch/arm/boot/dts/samsung/exynos4212-tab3.dtsi | 6 ++++++
>>>>>    1 file changed, 6 insertions(+)
>>>>>
>>>>> diff --git a/arch/arm/boot/dts/samsung/exynos4212-tab3.dtsi b/arch/arm/boot/dts/samsung/exynos4212-tab3.dtsi
>>>>> index e5254e32aa8f..9bc05961577d 100644
>>>>> --- a/arch/arm/boot/dts/samsung/exynos4212-tab3.dtsi
>>>>> +++ b/arch/arm/boot/dts/samsung/exynos4212-tab3.dtsi
>>>>> @@ -45,6 +45,12 @@ chosen {
>>>>>    		/* Default S-BOOT bootloader loads initramfs here */
>>>>>    		linux,initrd-start = <0x42000000>;
>>>>>    		linux,initrd-end = <0x42800000>;
>>>>> +
>>>>> +		/*
>>>>> +		 * Stock bootloader provides incorrect memory size in ATAG_MEM;
>>>>> +		 * override it here
>>>>> +		 */
>>>>> +		linux,usable-memory-range = <0x40000000 0x3fc00000>;
>>>>
>>>> Applied and dropped:
>>>>    chosen: linux,usable-memory-range:0: [4611686019496935424] is too short
>>>
>>> This seems to be a binding issue; the DT schema expects a 64-bit memory
>>> address and size, and doesn't allow a 32-bit range. I've tested the DTS
>>> on my device and this property seems to be handled fine, so I think this
>>> should allow 32-bit values as well.
>>
>> Regardless where is the issue: please test before sending.
>>
>>>
>>> I've opened a PR[1] against devicetree-org/dt-schema (where the schema
>>> for the chosen node is stored) to try and fix this. If my approach is
>>> incorrect, feel free to comment there as well.
>>
>>
>> According to Rob's comments, the DTS is the issue.
> 
> With updated dtschema I still see the same warning. Is something else
> missing?

My bad, turns out I didn't test my dt-schemas patch correctly... looks
like this has been *properly* fixed now in latest dt-schema[1][2], and I
no longer get warnings about the linux,usable-memory-range property.
(There are some new warnings though, for some nodes in exynos4.dtsi that
have 2 reg values, but that's out of scope for this patch.)

Sorry for the general confusion, I'll make sure to double-check my
patches next time...

Best regards
Artur

[1] https://github.com/devicetree-org/dt-schema/commit/08eff8e6167e9e0bc1694af6c298b4584105a057
[2] https://github.com/devicetree-org/dt-schema/commit/c95c9ad63c51f8d9cfb258e6f17a8001efab6d64


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ