Linux CXL
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: Alison Schofield <alison.schofield@intel.com>
Cc: Davidlohr Bueso <dave@stgolabs.net>,
	Dave Jiang <dave.jiang@intel.com>,
	Vishal Verma <vishal.l.verma@intel.com>,
	Ira Weiny <iweiny@kernel.org>, Li Ming <ming.li@zohomail.com>,
	linux-cxl@vger.kernel.org,
	Srirangan Madhavan <smadhavan@nvidia.com>,
	Richard Cheng <icheng@nvidia.com>
Subject: Re: [PATCH v5 1/4] cxl/hdm: Reject switch decoder interleave ways that overflow targets
Date: Tue, 22 Sep 2026 01:52:09 +0100	[thread overview]
Message-ID: <20260922015209.4106942b@jic23-hlaptop> (raw)
In-Reply-To: <af094094813d7f51d86cbf608936270b7d85526e.1786143520.git.alison.schofield@intel.com>

On Fri,  7 Aug 2026 17:05:48 -0700
Alison Schofield <alison.schofield@intel.com> wrote:

> Switch decoder enumeration validates that the interleave ways encoding
> is legal, but not that the resulting number of ways fits the available
> targets. This can overrun the target array (target_list.target_id[])
> during enumeration of 12 or 16 way interleaves.
> 
> Bound the target count where it is established rather than at each use.
> Reject an HDM capability whose reported target count is zero or exceeds
> the target list register capacity, and reject a zero target switch
> decoder allocation in cxl_switch_decoder_init(). Enumeration is then
> left with a single check: reject a decoder whose interleave ways exceed
> the targets it has.
> 
> Add a clarifying comment that target_count is a direct count, not
> 0-based like decoder_count.
> 
> Link: https://sashiko.dev/#/patchset/20260711180755.1779002-1-alison.schofield@intel.com?part=1
> Fixes: d17d0540a0db ("cxl/core/hdm: Add CXL standard decoder enumeration to the core")
> Tested-by: Davidlohr Bueso <dave@stgolabs.net>
> Reviewed-by: Davidlohr Bueso <dave@stgolabs.net>
> Reviewed-by: Richard Cheng <icheng@nvidia.com>
> Signed-off-by: Alison Schofield <alison.schofield@intel.com>
Reviewed-by: Jonathan Cameron <jonathan.cameron@oss.qualcomm.com>

  parent reply	other threads:[~2026-09-22  0:52 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-08  0:05 [PATCH v5 0/4] Harden HDM decoder enumeration Alison Schofield
2026-08-08  0:05 ` [PATCH v5 1/4] cxl/hdm: Reject switch decoder interleave ways that overflow targets Alison Schofield
2026-08-08  0:17   ` sashiko-bot
2026-08-08  0:36     ` Alison Schofield
2026-08-08  5:50   ` Li Ming
2026-09-22  0:52   ` Jonathan Cameron [this message]
2026-08-08  0:05 ` [PATCH v5 2/4] cxl/hdm: Make switch decoder target parsing endian-safe Alison Schofield
2026-08-08  5:51   ` Li Ming
2026-08-08  0:05 ` [PATCH v5 3/4] cxl/hdm: Restore commit_end when decoder enumeration fails Alison Schofield
2026-08-08  0:05 ` [PATCH v5 4/4] cxl/port: Bound switch decoder target array access by nr_targets Alison Schofield
2026-08-08  5:52   ` Li Ming
2026-09-04 23:30 ` [PATCH v5 0/4] Harden HDM decoder enumeration Alison Schofield
2026-09-16 16:50 ` Dave Jiang

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=20260922015209.4106942b@jic23-hlaptop \
    --to=jic23@kernel.org \
    --cc=alison.schofield@intel.com \
    --cc=dave.jiang@intel.com \
    --cc=dave@stgolabs.net \
    --cc=icheng@nvidia.com \
    --cc=iweiny@kernel.org \
    --cc=linux-cxl@vger.kernel.org \
    --cc=ming.li@zohomail.com \
    --cc=smadhavan@nvidia.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