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-next>] [day] [month] [year] [list]
Message-ID:
 <DU0PR04MB9299C3EC247E1FE2C373440F80DE2@DU0PR04MB9299.eurprd04.prod.outlook.com>
Date: Thu, 4 Jul 2024 11:41:22 +0000
From: Aisheng Dong <aisheng.dong@....com>
To: "quic_obabatun@...cinc.com" <quic_obabatun@...cinc.com>
CC: Rob Herring <robh@...nel.org>, "devicetree@...r.kernel.org"
	<devicetree@...r.kernel.org>, "imx@...ts.linux.dev" <imx@...ts.linux.dev>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"linux-arm-kernel@...ts.infradead.org"
	<linux-arm-kernel@...ts.infradead.org>, Jason Liu <jason.hui.liu@....com>,
	"dongas86@...il.com" <dongas86@...il.com>, "saravanak@...gle.com"
	<saravanak@...gle.com>, Krzysztof Kozlowski <krzk@...nel.org>
Subject: CMA Regression issue - [PATCH v2] of: reserved_mem: Restructure code
 to call reserved mem init functions earlier

Hi Oreoluwa,

We observed a CMA regression issue on MX8MN that the CMA region failed to be
setup by rmem_cma_setup() since the following patch:
f2a524d9ef5b ("of: reserved_mem: Restructure code to call reserved mem init functions earlier") [1]
And the CMA node was incorrect parsed (e.g. non-reuseable) due to NULL node pointer.
Below is one line boot log tested with the tag next-20240703 of linux-next tree.
OF: reserved mem: 0x0000000058000000..0x000000007fffffff (655360 KiB) map non-reusable linux,cma
NOTE: actually there is a reusable property:
linux,cma {
        compatible = "shared-dma-pool";
        reusable;
        size = <0 0x28000000>;
        alloc-ranges = <0 0x40000000 0 0x40000000>;
        linux,cma-default;
};

The root cause was that the CMA region was initialized at a very early stage
since above commit in question.
The call flow became:
early_init_fdt_scan_reserved_mem()->fdt_scan_reserved_mem()->
__reserved_mem_alloc_size()->of_reserved_mem_save_node(NULL, xxx)->
of_init_reserved_mem_node()->__reserved_mem_init_node().

The rmem->dev_node is still NULL when calling __reserved_mem_init_node()
which fails to call the rmem_cma_setup().

Please let me know if there's already a fix patch.

[1] https://lore.kernel.org/all/20240620001027.2326275-1-quic_obabatun@quicinc.com/

Regards
Aisheng

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ