From: Lukas Wunner <lukas@wunner.de>
To: Krishna Chaitanya Chundru <krishna.chundru@oss.qualcomm.com>
Cc: Bjorn Helgaas <bhelgaas@google.com>,
manivannan.sadhasivam@oss.qualcomm.com,
linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] PCI: Fix NULL pointer access in pci_store_saved_state()
Date: Wed, 8 Apr 2026 12:59:59 +0200 [thread overview]
Message-ID: <adY1L6R88SLtpZzN@wunner.de> (raw)
In-Reply-To: <89dda312-92ff-4957-bf67-dd0b60f681b8@oss.qualcomm.com>
On Wed, Apr 08, 2026 at 03:16:28PM +0530, Krishna Chaitanya Chundru wrote:
> On 4/5/2026 1:32 PM, Lukas Wunner wrote:
> > On Sat, Apr 04, 2026 at 02:23:00PM +0530, Krishna Chaitanya Chundru wrote:
> > No, please validate values read from config space with
> > PCI_POSSIBLE_ERROR() before using them to access memory at
> > a location that may be out-of-bounds. Or cache the size on
> > enumeration and avoid re-reading it upon pci_save_state().
>
> pci_save_state() has many config reading having check for each read
> is not ideal way
The ask is not to guard every config space read with a check,
but only ones which are used to calculate the offset into a
memory allocation. We only need to prevent out-of-bounds
memory accesses. We do not need to prevent saving "all ones".
Thanks,
Lukas
prev parent reply other threads:[~2026-04-08 11:00 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-04 8:52 [PATCH 0/2] PCI: Fix NULL pointer access in pci_store_saved_state() Krishna Chaitanya Chundru
2026-04-04 8:52 ` [PATCH 1/2] PCI: Add pcie_link_is_active() to determine if the link is active Krishna Chaitanya Chundru
2026-04-04 8:53 ` [PATCH 2/2] PCI: Fix NULL pointer access in pci_store_saved_state() Krishna Chaitanya Chundru
2026-04-05 8:02 ` Lukas Wunner
2026-04-08 9:46 ` Krishna Chaitanya Chundru
2026-04-08 10:59 ` Lukas Wunner [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=adY1L6R88SLtpZzN@wunner.de \
--to=lukas@wunner.de \
--cc=bhelgaas@google.com \
--cc=krishna.chundru@oss.qualcomm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=manivannan.sadhasivam@oss.qualcomm.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.