Re: [PATCH] kaslr: rename physmem_end and PHYSMEM_END to direct_map_physmem_end

From: David Hildenbrand
Date: Mon Oct 14 2024 - 07:49:50 EST


On 09.10.24 04:50, 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@xxxxxxxxxxxxx>
Cc: Alistair Popple <apopple@xxxxxxxxxx>
Cc: Jordan Niethe <jniethe@xxxxxxxxxx>
Cc: David Hildenbrand <david@xxxxxxxxxx>
Signed-off-by: John Hubbard <jhubbard@xxxxxxxxxx>
---

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.

Yes, that makes it clearer for me, thanks

Acked-by: David Hildenbrand <david@xxxxxxxxxx>

--
Cheers,

David / dhildenb