From: Will Deacon <will@kernel.org>
To: John Hubbard <jhubbard@nvidia.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Thomas Gleixner <tglx@linutronix.de>,
David Hildenbrand <david@redhat.com>,
Alistair Popple <apopple@nvidia.com>,
Jordan Niethe <jniethe@nvidia.com>,
linux-arm-kernel@lists.infradead.org, x86@kernel.org,
linux-mm@kvack.org, LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] kaslr: rename physmem_end and PHYSMEM_END to direct_map_physmem_end
Date: Thu, 24 Oct 2024 14:18:45 +0100 [thread overview]
Message-ID: <20241024131844.GI30704@willie-the-truck> (raw)
In-Reply-To: <20241009025024.89813-1-jhubbard@nvidia.com>
On Tue, Oct 08, 2024 at 07:50:24PM -0700, John Hubbard wrote:
> For clarity. It's increasingly hard to reason about the code, when KASLR
> is moving around the boundaries. In this case where KASLR is randomizing
> the location of the kernel image within physical memory, the maximum
> number of address bits for physical memory has not changed.
>
> What has changed is the ending address of memory that is allowed to be
> directly mapped by the kernel.
>
> Let's name the variable, and the associated macro accordingly.
>
> Also, enhance the comment above the direct_map_physmem_end definition,
> to further clarify how this all works.
>
> Cc: Thomas Gleixner <tglx@linutronix.de>
> Cc: Alistair Popple <apopple@nvidia.com>
> Cc: Jordan Niethe <jniethe@nvidia.com>
> Cc: David Hildenbrand <david@redhat.com>
> Signed-off-by: John Hubbard <jhubbard@nvidia.com>
> ---
>
> David Hildenbrand, I recall you had an unanswered question in this
> vicinity [1] when tglx's recent kaslr fix was being reviewed. Maybe this
> will help with that.
>
>
> [1] https://lore.kernel.org/linux-mm/ee205448-5fdd-495e-9d7c-c8a2b59f9c9e@roeck-us.net/T/#mdf442f077c9023590e144dbed2b04a109793484d
>
> thanks,
> John Hubbard
>
>
> arch/arm64/include/asm/memory.h | 2 +-
> arch/x86/include/asm/page_64.h | 2 +-
> arch/x86/include/asm/pgtable_64_types.h | 2 +-
> arch/x86/mm/init_64.c | 2 +-
> arch/x86/mm/kaslr.c | 14 +++++++++-----
> include/linux/mm.h | 6 +++---
> kernel/resource.c | 4 ++--
> mm/memory_hotplug.c | 2 +-
> mm/sparse.c | 2 +-
> 9 files changed, 20 insertions(+), 16 deletions(-)
For arm64:
Acked-by: Will Deacon <will@kernel.org>
Will
next prev parent reply other threads:[~2024-10-24 13:18 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-09 2:50 John Hubbard
2024-10-09 5:26 ` Gupta, Pankaj
2024-10-14 11:46 ` David Hildenbrand
2024-10-24 13:18 ` Will Deacon [this message]
2024-10-28 15:03 ` Mike Rapoport
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=20241024131844.GI30704@willie-the-truck \
--to=will@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=apopple@nvidia.com \
--cc=david@redhat.com \
--cc=jhubbard@nvidia.com \
--cc=jniethe@nvidia.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--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