On 9/23/2022 3:31 AM, Davidlohr Bueso wrote:
On Wed, 21 Sep 2022, Dave Jiang wrote:

Set the cxlds->serial as the dimm_id to be fed to __nvdimm_create(). The
security code uses that as the key description for the security key of the
memory device. The nvdimm unlock code cannot find the respective key
without the dimm_id.

Maybe I'm being daft but I don't see why cxlds->serial could not just be
used for __nvdimm_create() instead of adding a new member.

The reason is cxlds->serial is a u64 and __nvdimm_create() wants a string for dimm_id. And also __nvdimm_create() just points to the original string instead of duplicating it. So we need a string member defined instead of creating a temp string derived from cxlds->serial for __nvdimm_create().

Reply via email to