Re: [PATCH 4/5] hibernation, KFENCE: explicitly map/unmap KFENCE pages

From: David Hildenbrand (Arm)

Date: Fri Sep 25 2026 - 07:04:04 EST


On 9/25/26 11:33, Mike Rapoport wrote:
> On Thu, Sep 24, 2026 at 08:49:13PM +0200, David Hildenbrand (Arm) wrote:
>> On 9/24/26 18:02, Mike Rapoport wrote:
>>>
>>> They are not necessarily in direct map :)
>>> loongarch does not have direct map, but still supports kfence
>>
>> Ugh :D
>>
>> But where are the pages mapped/unmapped then?
>
> loongarch remaps them into vmalloc address space and sets page->virtual for
> page_address() to work.

Okay, so it's really not about the direct map in the traditional sense.

kfence_map_page_if_protected()
kfence_unmap_page_if_protected()

Maybe something like that? Anyhow, pick one and let's move forward :)

--
Cheers,

David