Re: [PATCH 3/5] hibernate: handle potential errors in hibernate_{map,unmap}_page()

From: Mike Rapoport

Date: Wed Sep 23 2026 - 11:56:27 EST


On Wed, Sep 23, 2026 at 12:13:39PM +0200, David Hildenbrand (Arm) wrote:
> On 9/17/26 08:07, Mike Rapoport (Microsoft) wrote:
> > When safe_copy_page() had to map/unmap pages only because of
> > debug_pagealloc() there could be no errors in the kernel page table
> > updates.
> >
> > However, with the increasing desire to remove pages from the direct map
> > this assumption becomes a real stretch.
>
> What's our general direction in that regard?
>
> I'd assume we'd not want to modify the directmap from hibernation code and
> simply fail instead if we encounter that scenario.

First I want hibernation to only touch the memory that we know is safe to
remap, for now it's only kfence (the next patch), so no arbitrary direct
map changes there.

And if remapping fails, my take is that we should abort the hibernation.

> --
> Cheers,
>
> David

--
Sincerely yours,
Mike.