]> www.infradead.org Git - users/jedix/linux-maple.git/commit
kaslr: rename physmem_end and PHYSMEM_END to direct_map_physmem_end
authorJohn Hubbard <jhubbard@nvidia.com>
Wed, 9 Oct 2024 02:50:24 +0000 (19:50 -0700)
committerAndrew Morton <akpm@linux-foundation.org>
Thu, 7 Nov 2024 04:11:11 +0000 (20:11 -0800)
commitafe789b7367ad43ba8f079981d40851f8bd319ce
tree47b27d08a063efecb2e0ed16a92b427e7537d7ad
parent01a9097aa3ce4c6aef296779c163169ac403260e
kaslr: rename physmem_end and PHYSMEM_END to direct_map_physmem_end

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.

Link: https://lkml.kernel.org/r/20241009025024.89813-1-jhubbard@nvidia.com
Signed-off-by: John Hubbard <jhubbard@nvidia.com>
Reviewed-by: Pankaj Gupta <pankaj.gupta@amd.com>
Acked-by: David Hildenbrand <david@redhat.com>
Acked-by: Will Deacon <will@kernel.org>
Reviewed-by: Mike Rapoport (Microsoft) <rppt@kernel.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Alistair Popple <apopple@nvidia.com>
Cc: Jordan Niethe <jniethe@nvidia.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
arch/arm64/include/asm/memory.h
arch/x86/include/asm/page_64.h
arch/x86/include/asm/pgtable_64_types.h
arch/x86/mm/init_64.c
arch/x86/mm/kaslr.c
include/linux/mm.h
kernel/resource.c
mm/memory_hotplug.c
mm/sparse.c