From: 黄高彬 <huanggaobin23@semi.ac.cn>
To: "Anisa Su" <anisa.su887@gmail.com>
Cc: "Ira Weiny" <iweiny@kernel.org>,
linux-cxl@vger.kernel.org, "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>,
"Dan Williams" <djbw@kernel.org>,
"Li Ming" <ming.li@zohomail.com>,
"Richard Cheng" <icheng@nvidia.com>,
linux-kernel@vger.kernel.org
Subject: Re: Re: [PATCH RESEND] cxl/mbox: validate the DCD extent list counts against the payload
Date: Tue, 29 Sep 2026 14:22:10 +0800 (GMT+08:00) [thread overview]
Message-ID: <2c3c870c.2a1df.1a0ebd3ee88.Coremail.huanggaobin23@semi.ac.cn> (raw)
In-Reply-To: <aq2qtqtPN97Kffvr@4470NRD-ASU.ssi.samsung.com>
Hi Anisa,
Thank you for the pointer, and sorry for the slow reply -- I had not found
your series. Since you have the fix in your tree, I am withdrawing this patch
rather than carrying a second copy of it, and I will not repost it.
> Sashiko reported the same issue on the previous revision ... and I have
> already patched it in my working tree.
If it is useful, we have a reproduction from a QEMU Type-3 device that lies in
the Get DC Extent List response, with the boundary measured rather than
inferred. The response header is 16 bytes and an extent is 40, so a 2048 byte
mailbox buffer holds 50: returned_extent_count = 50 stays inside it, 51 is the
first that reads past the end (KASAN in cxl_validate_extent, Read of size 2,
extent->shared_extn_seq), and 4096 fails the same way. A device reporting
total_extent_count = 100000 with returned_extent_count = 0 instead spins region
bring-up until the guest stops answering console commands -- that one is not
covered by a count check, because zero extents fit any payload.
Our version ended up doing what I think yours does: reject a count that does
not fit the payload with -EIO, and fail with -EIO when a response makes no
progress. Yours supersedes it. Happy to send the sweep as test cases, or to
run it against your series once it is posted.
> If the original send failed and did not make it to the mailing list, there's
> no need to prefix this patch with RESEND.
Noted, thank you. The list did receive the first posting; what bounced was a
maintainer address in the Cc list, so the RESEND prefix was misleading. There
is nothing to re-post now in any case.
> I plan to post the next revision after the DCD Prep Series is complete:
> https://lore.kernel.org/linux-cxl/20260918203049.7273-1-anisa.su@samsung.com/T/#t
> You are welcome to review both.
I will follow both. Jonathan's point earlier in this thread was right as well:
a snippet in the series thread would have been a better shape than a standalone
patch.
One more thing, since we were testing the older `dcd-v6-2025-04-13` branch: a
device that returns one partition and then zero while still claiming more
available makes `cxl_dev_dc_identify()` loop without progress (7.4 million
queries on our QEMU device, and the guest never reaches a shell). v11 already
guards that with the `rc == 0` check, so there is nothing to report -- just
confirming that the case we can reproduce is covered, and that the zero-progress
shape is reachable rather than theoretical.
> ... monthly meeting at 11AM PST every 3rd Tuesday of the month. So the next
> one is Tuesday October 20 11AM PST. If you would like to attend, I can
> forward the invite to you.
Thank you for the offer -- I will pass on the invite for now, but I will keep
following the published notes (https://pmem.io/ndctl/collab/). If something on
the call needs the author of this series, I am happy to join for that.
Gaobin
prev parent reply other threads:[~2026-09-29 6:22 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-17 10:46 Gaobin Huang
2026-09-18 19:35 ` Jonathan Cameron
2026-09-18 21:18 ` Anisa Su
2026-09-29 6:22 ` 黄高彬 [this message]
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=2c3c870c.2a1df.1a0ebd3ee88.Coremail.huanggaobin23@semi.ac.cn \
--to=huanggaobin23@semi.ac.cn \
--cc=alison.schofield@intel.com \
--cc=anisa.su887@gmail.com \
--cc=dave.jiang@intel.com \
--cc=dave@stgolabs.net \
--cc=djbw@kernel.org \
--cc=icheng@nvidia.com \
--cc=iweiny@kernel.org \
--cc=jic23@kernel.org \
--cc=linux-cxl@vger.kernel.org \
--cc=linux-kernel@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
all inboxes | Powered by JetHome®