Package: nvme-cli
Version: 2.2.1-4
Severity: normal
Dear Maintainer,
Since the update of nvme-cli to v2.x, the JSON output of an "nvme list"
command contains wrapped-around negative integers for various fields,
e.g.:
{
"Devices":[
{
"NameSpace":1,
"DevicePath":"/dev/nvme0n1",
"Firmware":"2B0QBXX7",
"ModelNumber":"Samsung SSD 950 PRO 256GB",
"SerialNumber":"",
"UsedBytes":-2147483648,
"MaximumLBA":500118192,
"PhysicalSize":-2147483648,
"SectorSize":512
}
]
}
Compare with the output of the previous nvme-cli v1.2:
{
"Devices" : [
{
"NameSpace" : 1,
"DevicePath" : "/dev/nvme0n1",
"Firmware" : "2B0QBXX7",
"Index" : 0,
"ModelNumber" : "Samsung SSD 950 PRO 256GB",
"ProductName" : "Non-Volatile memory controller: Samsung Electronics Co
Ltd VMe SSD Controller SM951/PM951 PM963 2.5\" NVMe PCIe SSD",
"SerialNumber" : "",
"UsedBytes" : 93811310592,
"MaximumLBA" : 500118192,
"PhysicalSize" : 256060514304,
"SectorSize" : 512
}
]
}
The PhysicalSize item appears to be an overflowed int32 in the v2.2.x
output.
Another example of bogus values for a 1TB drive with nvme-cli 2.2.1
{
"Devices":[
{
"NameSpace":1,
"DevicePath":"/dev/nvme0n1",
"Firmware":"41001131",
"ModelNumber":"PC711 NVMe SK hynix 1TB",
"SerialNumber":"",
"UsedBytes":-2147483648,
"MaximumLBA":2000409264,
"PhysicalSize":-2147483648,
"SectorSize":512
}
]
}
Upstream has published new releases of nvme-cli (v2.3) and libnvme
(v1.3) in the last 24 hours, and skimming through the changelog I get
the feeling that this bug may have been resolved by those releases.
-- System Information:
Debian Release: bookworm/sid
APT prefers testing
APT policy: (500, 'testing'), (400, 'unstable')
Architecture: amd64 (x86_64)
Kernel: Linux 6.1.0-2-amd64 (SMP w/4 CPU threads; PREEMPT)
Kernel taint flags: TAINT_FIRMWARE_WORKAROUND
Locale: LANG=en_NZ.UTF-8, LC_CTYPE=en_NZ.UTF-8 (charmap=UTF-8) (ignored: LC_ALL
set to en_US.UTF-8), LANGUAGE=en_NZ:en
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
Versions of packages nvme-cli depends on:
ii libc6 2.36-8
ii libjson-c50.16-2
ii libnvme1 1.2-3
ii uuid-runtime 2.38.1-4
ii zlib1g1:1.2.13.dfsg-1
Versions of packages nvme-cli recommends:
ii pci.ids 0.0~2023.01.18-1
nvme-cli suggests no packages.
-- no debconf information