mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Matthew Wilcox <willy@infradead.org>
To: Florian Fainelli <f.fainelli@gmail.com>
Cc: linux-mips@vger.kernel.org, manuel.lauss@gmail.com,
	Thomas Bogendoerfer <tsbogend@alpha.franken.de>,
	Ilias Apalodimas <ilias.apalodimas@linaro.org>,
	Vlastimil Babka <vbabka@kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Jesper Dangaard Brouer <hawk@kernel.org>,
	open list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] MIPS: Alchemy: Save the Ethernet address before reusing PROM memory
Date: Fri, 16 Oct 2026 20:45:54 +0100	[thread overview]
Message-ID: <atJ-8ttrdqhiRCp2@casper.infradead.org> (raw)
In-Reply-To: <20261016173157.2083454-1-f.fainelli@gmail.com>

On Fri, Oct 16, 2026 at 10:31:55AM -0700, Florian Fainelli wrote:
> Alchemy keeps pointers into the firmware environment and looks up ethaddr
> when initializing the Ethernet devices. By that point, memory allocation
> can have overwritten the environment, causing prom_getenv() to pass an
> invalid pointer to strchr() and panic during boot.
> 
> On the MTX-1, the struct page layout change in 9ddb3c14afba reduces struct
> page from 40 to 32 bytes and exposes this unreserved firmware memory.
> Bisection and boot tests confirmed that the parent boots while the change
> reproduces the panic.
> 
> Parse the Ethernet address during prom_init(), before registering RAM
> with memblock, and keep the six bytes in kernel-owned init data. Return
> the saved address during device initialization, preserving the existing
> YAMON formats and command-line fallback without reserving a fixed
> low-memory region.
> 
> Fixes: 9ddb3c14afba ("mm: fix struct page layout on 32-bit systems")

This is an inappropriate Fixes line.  That may have exposed the problem
(... 5 years ago; how often is this being tested?) but it's merely
restoring the layout to that which existed two years before that.
The correct Fixes line wuld be something related to this driver.

  reply	other threads:[~2026-10-16 19:46 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-16 17:31 Florian Fainelli
2026-10-16 19:45 ` Matthew Wilcox [this message]
2026-10-16 21:16   ` Florian Fainelli

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=atJ-8ttrdqhiRCp2@casper.infradead.org \
    --to=willy@infradead.org \
    --cc=akpm@linux-foundation.org \
    --cc=f.fainelli@gmail.com \
    --cc=hawk@kernel.org \
    --cc=ilias.apalodimas@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@vger.kernel.org \
    --cc=manuel.lauss@gmail.com \
    --cc=tsbogend@alpha.franken.de \
    --cc=vbabka@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

all inboxes | Powered by JetHome®