Thread (7 messages) flat view 7 messages, 2 authors, 2016-08-25
DORMANTno replies REVIEWED: 3 (3M)

Revision v6 of 7 in this series; 1 review trailer.

Revisions (7)
  1. v4 [diff vs current]
  2. v5 [diff vs current]
  3. v5 [diff vs current]
  4. v5 [diff vs current]
  5. v5 [diff vs current]
  6. v6 [diff vs current]
  7. v6 current

[PATCH v6 3/3] arm64: hibernate: Support DEBUG_PAGEALLOC

From: catalin.marinas@arm.com (Catalin Marinas)
Date: 2016-08-25 15:54:20

On Wed, Aug 24, 2016 at 06:27:30PM +0100, James Morse wrote:
DEBUG_PAGEALLOC removes the valid bit of page table entries to prevent
any access to unallocated memory. Hibernate uses this as a hint that those
pages don't need to be saved/restored. This patch adds the
kernel_page_present() function it uses.

hibernate.c copies the resume kernel's linear map for use during restore.
Add _copy_pte() to fill-in the holes made by DEBUG_PAGEALLOC in the resume
kernel, so we can restore data the original kernel had at these addresses.

Finally, DEBUG_PAGEALLOC means the linear-map alias of KERNEL_START to
KERNEL_END may have holes in it, so we can't lazily clean this whole
area to the PoC. Only clean the new mmuoff region, and the kernel/kvm
idmaps.

This reverts commit da24eb1f3f9e2c7b75c5f8c40d8e48e2c4789596.

Reported-by: Will Deacon <redacted>
Signed-off-by: James Morse <james.morse@arm.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help