Re: [PATCH 4/5] hibernation, KFENCE: explicitly map/unmap KFENCE pages
From: Mike Rapoport
Date: Fri Sep 25 2026 - 05:35:59 EST
On Thu, Sep 24, 2026 at 08:49:13PM +0200, David Hildenbrand (Arm) wrote:
> 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?
loongarch remaps them into vmalloc address space and sets page->virtual for
page_address() to work.
> (I know, I should read your doc patch)
>
> --
> Cheers,
>
> David
--
Sincerely yours,
Mike.