mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Mike Rapoport <rppt@kernel.org>
To: Norman Herms <dockseed@proton.me>
Cc: "linux-mm@kvack.org" <linux-mm@kvack.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: mm/memtest: the reserved-region array is reallocated inside the range under test
Date: Wed, 2 Dec 2026 09:20:22 +0200	[thread overview]
Message-ID: <aw_GtjrB-RI3iZY_@kernel.org> (raw)
In-Reply-To: <vMVJLf0yL6RHmJWxcxQ7lNvjqBtYE1RxWk6wBUnmhLH5gDbJc1d_b0q5AA6Nz6VJcnNkIw8gStVV925IyeYEvNYiiIChUiaYhMRao8V8zps=@proton.me>

On Mon, Nov 23, 2026 at 05:15:28PM +0000, Norman Herms wrote:
> Hi Mike,
> 
> On a board whose DRAM fails one word in every 256 bytes, memtest()
> reserves every failing word on its own, 512 reservations over 1.6 MiB.
> Past the 128 static entries, memblock_double_array() allocates the new
> reserved array from free memory inside the range memtest() is still
> reading back, and the array's own entries then fail the compare:
> another 42 KiB at the top of RAM (0x1bf3c2000-0x1bf3cc800 here, inside
> the tested range 0x60100000-0x1bf3cd040) is reserved as bad, in runs
> of 16 bytes every 24 bytes, the size of struct memblock_region.
> 
> With memtest=4 the next pattern is written over the live array, and
> the board resets during that pattern; we have not separated that from
> a 16 s boot watchdog.
> 
> Coalescing nearby bad words, or reserving only after a range's verify
> pass, would avoid it.

Unfortunately neither of those solve the general case :(

Coalescing only reduces the chance that a reservation will fall onto a bad
region.

Reserving after a pass means that we need to keep the intermediate state
somewhere. If it's static array we may run out of space, if we allocate it
we're back to potentially hitting a bad range.

> Seen on 6.18.54 (arm64, Allwinner A733, 6 GiB); mm/memtest.c is unchanged
> in linux-next.
> 
> Measured on my board by AI agents, analysis with an AI assistant;
> a report, not a Tested-by.
> 
> Norman
> 

-- 
Sincerely yours,
Mike.

      reply	other threads:[~2026-12-02  7:20 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-23 17:15 Norman Herms
2026-12-02  7:20 ` Mike Rapoport [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=aw_GtjrB-RI3iZY_@kernel.org \
    --to=rppt@kernel.org \
    --cc=dockseed@proton.me \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.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®