Linux CXL
 help / color / mirror / Atom feed
From: Alison Schofield <alison.schofield@intel.com>
To: Davidlohr Bueso <dave@stgolabs.net>,
	Jonathan Cameron <jic23@kernel.org>,
	Dave Jiang <dave.jiang@intel.com>,
	Alison Schofield <alison.schofield@intel.com>,
	Vishal Verma <vishal.l.verma@intel.com>,
	Ira Weiny <iweiny@kernel.org>, Dan Williams <djbw@kernel.org>,
	Li Ming <ming.li@zohomail.com>
Cc: linux-cxl@vger.kernel.org
Subject: [PATCH v2 0/3] cxl: Format the device serial number as unsigned
Date: Wed,  1 Jul 2026 17:30:43 -0700	[thread overview]
Message-ID: <cover.1782948930.git.alison.schofield@intel.com> (raw)

This series supersedes the previously posted standalone fix:
  cxl/pmem: Format nvdimm serial number as decimal

That patch addressed the immediate auto-unlock failure caused by the
kernel formatting the nvdimm security key description differently than
the decimal 'id' sysfs attribute used by ndctl.

Further review uncovered a second formatting issue affecting the same
serial number. The CXL device serial number is a u64 PCIe Device Serial
Number, yet several kernel interfaces format it with signed "%lld".
Devices whose vendor OUI sets bit 63 therefore appear with negative
decimal serial numbers.

Serials with bit 64 set are expected. The most significant byte of the
PCIe Device Serial Number contains the vendor OUI, so vendors such as
Montage naturally produce serial numbers with bit 63 set.

Rather than merge the decimal-format fix and immediately follow it with
another patch changing the same code to "%llu", fold both fixes into a
single series that consistently formats CXL serial numbers as unsigned
where appropriate and adds cxl_test coverage for the large serial case.


Alison Schofield (3):
  cxl/pmem: Format the nvdimm serial number as unsigned decimal
  cxl/core: Format the memdev serial number as unsigned in TP_printk
  cxl/test: Assign one mock memdev a full-width serial number

 Documentation/ABI/testing/sysfs-bus-nvdimm |  3 ++-
 drivers/cxl/core/pmem.c                    | 10 ++++++----
 drivers/cxl/core/trace.h                   | 10 +++++-----
 drivers/cxl/cxl.h                          |  3 ++-
 drivers/cxl/pmem.c                         |  2 +-
 tools/testing/cxl/test/mem.c               | 15 ++++++++++++++-
 6 files changed, 30 insertions(+), 13 deletions(-)


base-commit: dc59e4fea9d83f03bad6bddf3fa2e52491777482
-- 
2.37.3


             reply	other threads:[~2026-07-02  0:30 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-02  0:30 Alison Schofield [this message]
2026-07-02  0:30 ` [PATCH v2 1/3] cxl/pmem: Format the nvdimm serial number as unsigned decimal Alison Schofield
2026-07-03  6:28   ` Richard Cheng
2026-07-02  0:30 ` [PATCH v2 2/3] cxl/core: Format the memdev serial number as unsigned in TP_printk Alison Schofield
2026-07-02  0:30 ` [PATCH v2 3/3] cxl/test: Assign one mock memdev a full-width serial number Alison Schofield

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cover.1782948930.git.alison.schofield@intel.com \
    --to=alison.schofield@intel.com \
    --cc=dave.jiang@intel.com \
    --cc=dave@stgolabs.net \
    --cc=djbw@kernel.org \
    --cc=iweiny@kernel.org \
    --cc=jic23@kernel.org \
    --cc=linux-cxl@vger.kernel.org \
    --cc=ming.li@zohomail.com \
    --cc=vishal.l.verma@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox