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] [day] [month] [year] [list]
Message-ID: <e545b630-1a89-40b1-996c-c843a9e8fad7@fujitsu.com>
Date: Fri, 11 Jul 2025 05:34:27 +0000
From: "Zhijian Li (Fujitsu)" <lizhijian@...itsu.com>
To: Nathan Fontenot <nathan.fontenot@....com>, "Koralahalli Channabasappa,
 Smita" <Smita.KoralahalliChannabasappa@....com>, "Bowman, Terry"
	<terry.bowman@....com>, Alison Schofield <alison.schofield@...el.com>,
	"linux-cxl@...r.kernel.org" <linux-cxl@...r.kernel.org>, Jonathan Cameron
	<Jonathan.Cameron@...wei.com>, "dan.j.williams@...el.com"
	<dan.j.williams@...el.com>, "dave.jiang@...el.com" <dave.jiang@...el.com>,
	"vishal.l.verma@...el.com" <vishal.l.verma@...el.com>, Robert Richter
	<rrichter@....com>, Gregory Price <gourry@...rry.net>, Fan Ni
	<fan.ni@...sung.com>, Davidlohr Bueso <dave@...olabs.net>
CC: "Yasunori Gotou (Fujitsu)" <y-goto@...itsu.com>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [RFC] CXL/ACPI: Remove overlapping Soft Reserved regions before
 adding CFMW resources



On 11/07/2025 05:15, Nathan Fontenot wrote:
>> My proposal is to remove the "Soft Reserved" resource at the moment we add the root decoder resource (the CFMW) from `CXL_ACPI`.
> A couple of thoughts on this approach.
> 
> If the device_hmem driver loads prior to the cxl_acpi driver this could be an issue. The device
> hmem driver init routine makes a copy of all soft reserve resources into hmem_active. It is
> this hmem_active list that is used by the hmem driver to create dax devices, this could possibly
> create a dax device for a soft reserve that no longer exists, or has been split up.
> 
> Perhaps moving the MODULE_SOFTDEP("pre: cxl_acpi") from dax/hmem/hmem.c to dax/hmem/device.c
> could solve this to ensure the cxl_acpi code runs prior to building the hmem_active list.
> 
> One other aspect that this approach would prevent is the ability to use the memory covered by
> a cxl region if there is an error in creating that region. 

> In previous approaches for instance,
> if during cxl region discovery we get an error and fail to create the region, the soft reserve
> intersecting that failed region would still exist and be available for the dax driver to consume.

It seems this not always works.
For example, when there is a misconfigured HDM decoder, so the cxl_region will be registered(but not readiness).
In this case(with your V4 patch), we would see:
```
5d0000000-6cfffffff : CXL Window 0
   5d0000000-6cfffffff : region0
```
Actually, it cannot be consumed by the hmem/dax_hmem neither.

This made me realize that my current idea ignores the case of CXL_ACPI=y && CXL_REGION=n. I quickly tested it(I will take a deeper look later):

After the OS boots, we can see this resource. Can anyone tell me how to create the corresponding dax_region? Because I tried using dax create-device without success.
```
5d0000000-6cfffffff : CXL Window 0
   5d0000000-6cfffffff : Soft Reserved
```

Thanks
Zhijian

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ