From: Simon Horman <horms@kernel.org>
To: Ivy Lopez <skunkolee@gmail.com>
Cc: ionut@badula.org, andrew+netdev@lunn.ch, davem@davemloft.net,
edumazet@google.com, kuba@kernel.org, pabeni@redhat.com,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] net: starfire: fix ioaddr sign-extension causing ioremap() failure
Date: Tue, 8 Sep 2026 13:41:19 +0100 [thread overview]
Message-ID: <20260908124119.GW40544@horms.kernel.org> (raw)
In-Reply-To: <20260907225748.167279-1-skunkolee@gmail.com>
On Mon, Sep 07, 2026 at 04:57:48PM -0600, Ivy Lopez wrote:
> ioaddr is declared as a signed long, but is assigned the result of
> pci_resource_start(), which returns an unsigned resource_size_t.
> On configurations where the BAR address has its high bit set, the
> value sign-extends when passed to ioremap(), producing a bogus
> 64-bit address and causing device probe to fail:
>
> ioremap: invalid physical address fffffffffe480000
> starfire 0000:08:04.0: cannot Remap 0x80000 @ 0xfe480000, aborting
>
> Change ioaddr to resource_size_t, matching both the return type of
> pci_resource_start() and the type ioremap() expects for its physical
> address argument, rather than unsigned long, which is not guaranteed
> to be wide enough on all configurations. Switch the associated error
> print to %pa accordingly.
>
> Link: https://bugzilla.kernel.org/show_bug.cgi?id=198035
> Signed-off-by: Ivy Lopez <skunkolee@gmail.com>
> ---
> v2: use resource_size_t instead of unsigned long, and switch the
> error print to %pa, per Simon Horman's review.
In general this change looks good to me.
But unfortunately it does not apply against net-next.
Please rebase.
--
pw-bot: changes-requested
...
next prev parent reply other threads:[~2026-09-08 12:41 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-15 19:24 [PATCH] " Ivy Lopez
2026-08-19 8:37 ` Simon Horman
2026-09-07 22:57 ` [PATCH v2] " Ivy Lopez
2026-09-08 12:41 ` Simon Horman [this message]
2026-09-09 0:28 ` [PATCH net-next v3] " Ivy Lopez
2026-09-10 9:43 ` Simon Horman
2026-09-11 0:40 ` patchwork-bot+netdevbpf
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=20260908124119.GW40544@horms.kernel.org \
--to=horms@kernel.org \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=ionut@badula.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=skunkolee@gmail.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®