mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
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 net-next v3] net: starfire: fix ioaddr sign-extension causing ioremap() failure
Date: Thu, 10 Sep 2026 10:43:28 +0100	[thread overview]
Message-ID: <20260910094328.GR40544@horms.kernel.org> (raw)
In-Reply-To: <20260909002829.224639-1-skunkolee@gmail.com>

On Tue, Sep 08, 2026 at 06:28:29PM -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.

Sorry for not noticing this earlier, but probably this should
have a Fixes tag. No need to repost just for this but I think
it should be:

Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")

> 
> Link: https://bugzilla.kernel.org/show_bug.cgi?id=198035
> Signed-off-by: Ivy Lopez <skunkolee@gmail.com>

Reviewed-by: Simon Horman <horms@kernel.org>

> ---
> ---
> v2: use resource_size_t instead of unsigned long, and switch the
>     error print to %pa, per Simon Horman's review.
> v3: rebase against net-next, no content changes, per Simon Horman.

...

  reply	other threads:[~2026-09-10  9:43 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
2026-09-09  0:28       ` [PATCH net-next v3] " Ivy Lopez
2026-09-10  9:43         ` Simon Horman [this message]
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=20260910094328.GR40544@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®