[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20241024131844.GI30704@willie-the-truck>
Date: Thu, 24 Oct 2024 14:18:45 +0100
From: Will Deacon <will@...nel.org>
To: John Hubbard <jhubbard@...dia.com>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
Thomas Gleixner <tglx@...utronix.de>,
David Hildenbrand <david@...hat.com>,
Alistair Popple <apopple@...dia.com>,
Jordan Niethe <jniethe@...dia.com>,
linux-arm-kernel@...ts.infradead.org, x86@...nel.org,
linux-mm@...ck.org, LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] kaslr: rename physmem_end and PHYSMEM_END to
direct_map_physmem_end
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@...utronix.de>
> Cc: Alistair Popple <apopple@...dia.com>
> Cc: Jordan Niethe <jniethe@...dia.com>
> Cc: David Hildenbrand <david@...hat.com>
> Signed-off-by: John Hubbard <jhubbard@...dia.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@...nel.org>
Will
Powered by blists - more mailing lists