All of lore.kernel.org
 help / color / mirror / Atom feed
From: Liz Fong-Jones <lizf@honeycomb.io>
To: sashiko-reviews@lists.linux.dev
Cc: sashiko-bot@kernel.org, linux-pci@vger.kernel.org, lizf@honeycomb.io
Subject: Re: [PATCH v5] PCI: Fix BAR resize for devices on a root bus
Date: Tue, 08 Sep 2026 23:25:38 +0000 (UTC)	[thread overview]
Message-ID: <20260908232537.64461-1-lizf@honeycomb.io> (raw)
In-Reply-To: <20260908231349.682101F00A3A@smtp.kernel.org>

On Sashiko (Gemini 3.1 pro preview) wrote:
> Finding 1: Optional Resource Assignment Failure
> Severity: High
>
> Location: drivers/pci/setup-bus.c, lines 2429-2433
>
> Issue: The stricter validation incorrectly treats optional resources
> (ROM BARs) as required. If pci_bus_assign_resources() succeeds for
> the target BAR but leaves an optional resource unassigned, the
> function aborts with -ENOSPC, breaking valid BAR resizes.

This is a known, deliberate tradeoff, not an oversight -- it's
disclosed directly in the v5 commit message:

  "Unlike the bridged path, this treats failure to place any released
  resource -- including optional ones, e.g. an unclaimed expansion
  ROM -- as fatal, rather than checking only required resources.
  That's the more conservative choice: on a root bus everything
  released here tends to share one window, and failing loudly seemed
  better than leaving something silently unassigned."

Concretely, for the bug this patch fixes it doesn't apply at all: the
device's ROM shares a different resource window than the released
BARs (confirmed against the actual hardware log -- only BAR0 and BAR2
are ever released, no ROM), so it's never in the "saved" list this
check walks. The scenario in the finding is theoretical for other
root-bus devices whose optional resources do share the same window
as the target BAR, not something this bug's hardware or reported
failure exercises.

Marking this a false positive rather than a code defect. Finding 2
("Preexisting") is correctly scoped and not disputed.


  reply	other threads:[~2026-09-08 23:25 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-08 23:03 [PATCH v5] PCI: Fix BAR resize for devices on a root bus Liz Fong-Jones
2026-09-08 23:13 ` sashiko-bot
2026-09-08 23:25   ` Liz Fong-Jones [this message]
2026-09-09 10:17 ` Ilpo Järvinen
2026-09-10 16:23   ` Liz Fong-Jones
2026-09-10 16:23     ` Liz Fong-Jones

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=20260908232537.64461-1-lizf@honeycomb.io \
    --to=lizf@honeycomb.io \
    --cc=linux-pci@vger.kernel.org \
    --cc=sashiko-bot@kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    /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.