summaryrefslogtreecommitdiff
path: root/scripts/stackusage
diff options
context:
space:
mode:
authorAlison Schofield <alison.schofield@intel.com>2026-07-24 13:37:17 -0700
committerDave Jiang <dave.jiang@intel.com>2026-08-05 13:20:33 -0700
commit8a80d3d65cd06ee35b913d8517fb2f2319f8e70c (patch)
tree5a487164ddfff1887073b55eef9afb4052f0c639 /scripts/stackusage
parent4ee75140669cd954a343443b9ed78665106e3fc1 (diff)
downloadlinux-8a80d3d65cd06ee35b913d8517fb2f2319f8e70c.tar.gz
linux-8a80d3d65cd06ee35b913d8517fb2f2319f8e70c.zip
cxl/pmem: Format the nvdimm serial number as unsigned decimal
The CXL NVDIMM security passphrase key description and the nvdimm 'id' sysfs attribute are both derived from the CXL device serial number, but the serial number is not formatted consistently. The key description is formatted in hexadecimal while the 'id' attribute is formatted in decimal. As a result, ndctl stores the key using a decimal description while the kernel later looks it up using a hexadecimal description. For serial numbers of 10 and above, the descriptions no longer match, preventing automatic unlock after reboot. The decimal formatting has a second problem: both the key description and the 'id' attribute use the signed %lld format for a u64 PCIe Device Serial Number. Devices whose vendor OUI sets bit 63, such as Montage CXL devices, appear with negative decimal serial numbers. Format the security key description and 'id' attribute as unsigned decimal, %llu, and document that the 'id' attribute is an unsigned decimal value. The key lookup mismatch was exposed by CXL unit test cxl-security.sh when cxl_test mock serial numbers were extended to 10 and above. A work around is described for ndctl load-key users here: https://github.com/pmem/ndctl/issues/299 Cc: stable@vger.kernel.org Fixes: b5807c80b5bc ("cxl: add dimm_id support for __nvdimm_create()") Acked-by: Dan Williams <djbw@kernel.org> Signed-off-by: Alison Schofield <alison.schofield@intel.com> Link: https://patch.msgid.link/2c673a5ba0a8fa93ad160578e193bd556091fa95.1784924949.git.alison.schofield@intel.com Signed-off-by: Dave Jiang <dave.jiang@intel.com>
Diffstat (limited to 'scripts/stackusage')
0 files changed, 0 insertions, 0 deletions