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

From: David Hildenbrand (Arm)

Date: Thu Sep 24 2026 - 15:03:06 EST


On 9/24/26 18:02, Mike Rapoport wrote:
> On Thu, Sep 24, 2026 at 10:19:33AM +0200, David Hildenbrand (Arm) wrote:
>> On 9/23/26 17:49, Mike Rapoport wrote:
>>>
>>> Naming is hard :-D
>>>
>>> I feel that _copy_page() is to vague and adding hibernation there is to
>>> mouthful :(
>>
>> Yeah, I wouldn't mention hibernation.
>>
>>
>>
>>>
>>> And these could be used outside of safe_copy_page() someday.
>>>
>>> How about
>>>
>>> kfence_set_page_present()
>>> kfence_set_page_default()
>>
>>
>> Maybe spell out "direct_map" ?
>>
>> kfence_set_direct_map_present()
>>
>> kfence_set_direct_map_default()
>
> 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?

(I know, I should read your doc patch)

--
Cheers,

David