mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Dave Hansen <dave.hansen@intel.com>
To: "Michał Cłapiński" <mclapinski@google.com>
Cc: Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
	Dave Hansen <dave.hansen@linux.intel.com>,
	Chris Li <chrisl@kernel.org>,
	x86@kernel.org, "H. Peter Anvin" <hpa@zytor.com>,
	Ard Biesheuvel <ardb@kernel.org>,
	Dan Williams <dan.j.williams@intel.com>,
	Pasha Tatashin <pasha.tatashin@soleen.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 1/1] x86/boot/compressed: Fix avoiding memmap in physical KASLR
Date: Fri, 24 Oct 2025 11:21:25 -0700	[thread overview]
Message-ID: <5c80882c-7d3f-4b8f-9a64-42b9cb2c5ee7@intel.com> (raw)
In-Reply-To: <CAAi7L5fxqiMMGJi2xB42L+A-xVQwx=10TBG_kU15=q=i=6kcbw@mail.gmail.com>

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.

  reply	other threads:[~2025-10-24 18:21 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-22 23:37 Michal Clapinski
2025-10-23  8:24 ` Ard Biesheuvel
2025-10-23 18:30   ` Chris Li
2025-10-23 23:33   ` Michał Cłapiński
2025-10-23 20:29 ` Dave Hansen
2025-10-23 23:23   ` Michał Cłapiński
2025-10-24 18:21     ` Dave Hansen [this message]
2025-10-24 21:27       ` Michał Cłapiński
2025-11-06 14:59 ` Michał Cłapiński
2025-11-06 15:48   ` Dave Hansen

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=5c80882c-7d3f-4b8f-9a64-42b9cb2c5ee7@intel.com \
    --to=dave.hansen@intel.com \
    --cc=ardb@kernel.org \
    --cc=bp@alien8.de \
    --cc=chrisl@kernel.org \
    --cc=dan.j.williams@intel.com \
    --cc=dave.hansen@linux.intel.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mclapinski@google.com \
    --cc=mingo@redhat.com \
    --cc=pasha.tatashin@soleen.com \
    --cc=tglx@linutronix.de \
    --cc=x86@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®