Linux PCI subsystem development
 help / color / mirror / Atom feed
From: Philipp Stanner <phasta@kernel.org>
To: "Krzysztof Wilczyński" <kw@linux.com>,
	"Bjorn Helgaas" <bhelgaas@google.com>
Cc: linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org,
	Philipp Stanner <phasta@kernel.org>
Subject: [PATCH v3 0/2] Harden PCI resource array indexing
Date: Wed, 12 Mar 2025 09:06:33 +0100	[thread overview]
Message-ID: <20250312080634.13731-2-phasta@kernel.org> (raw)

This is a v3, spiritually successing "v1" the original implementation of
length checking [1], and "v2", the fix squashed in by Krzyzstof [2].

Changes in v3:
  - Use PCI_NUM_RESOURCES as the devres array length and provide that as
    a bugfix to be backported. (Damien)

[1] https://lore.kernel.org/linux-pci/20250304143112.104190-2-phasta@kernel.org/
[2] https://lore.kernel.org/linux-pci/20250305075354.118331-2-phasta@kernel.org/

Philipp Stanner (2):
  PCI: Fix wrong length of devres array
  PCI: Check BAR index for validity

 drivers/pci/devres.c | 18 +++++++++++++++---
 drivers/pci/iomap.c  | 29 +++++++++++++++++++++--------
 drivers/pci/pci.c    |  6 ++++++
 drivers/pci/pci.h    | 16 ++++++++++++++++
 4 files changed, 58 insertions(+), 11 deletions(-)

-- 
2.48.1


             reply	other threads:[~2025-03-12  8:06 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-12  8:06 Philipp Stanner [this message]
2025-03-12  8:06 ` [PATCH v3 1/2] PCI: Fix wrong length of devres array Philipp Stanner
2025-03-12  8:06 ` [PATCH v3 2/2] PCI: Check BAR index for validity Philipp Stanner
2025-03-12 20:39 ` [PATCH v3 0/2] Harden PCI resource array indexing Bjorn Helgaas

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=20250312080634.13731-2-phasta@kernel.org \
    --to=phasta@kernel.org \
    --cc=bhelgaas@google.com \
    --cc=kw@linux.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    /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