[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5c80882c-7d3f-4b8f-9a64-42b9cb2c5ee7@intel.com>
Date: Fri, 24 Oct 2025 11:21:25 -0700
From: Dave Hansen <dave.hansen@...el.com>
To: Michał Cłapiński <mclapinski@...gle.com>
Cc: Thomas Gleixner <tglx@...utronix.de>, Ingo Molnar <mingo@...hat.com>,
Borislav Petkov <bp@...en8.de>, Dave Hansen <dave.hansen@...ux.intel.com>,
Chris Li <chrisl@...nel.org>, x86@...nel.org, "H. Peter Anvin"
<hpa@...or.com>, Ard Biesheuvel <ardb@...nel.org>,
Dan Williams <dan.j.williams@...el.com>,
Pasha Tatashin <pasha.tatashin@...een.com>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 1/1] x86/boot/compressed: Fix avoiding memmap in
physical KASLR
On 10/23/25 16:23, Michał Cłapiński wrote:
...
> If called 5 times, on the 4th time `i` will indeed be also equal to 4
> but the last `if` never executes since `str` is null. On the 5th time,
> we exit the function via the first `if` and memmap_too_large never
> gets set.
Ahh, thanks for the explanation. The implication of the first `if` is
what I was missing.
How about we just move the `if` you suggested. Let's put it right next
to the i++ so that they're *obviously* connected and the moment `i` gets
too big, the very next thing that happens is setting `memmap_too_large`
and jumping out of the function.
Powered by blists - more mailing lists