criu
criu copied to clipboard
Support MADV_GUARD_INSTALL
https://github.com/checkpoint-restore/criu/pull/2625
- https://lwn.net/Articles/1011366/
- https://github.com/torvalds/linux/commit/662df3e5c37666d6ed75c88098699e070a4b35b5
- https://github.com/bminor/glibc/commit/a6fbe36b7f31292981422692236465ab56670ea9
The following patch set extends the PAGEMAP_SCAN ioctl with PAGE_IS_GUARD flag to expose information about guard regions, allowing CRIU to detect and handle guard regions: https://lkml.org/lkml/2025/3/24/168
Let me handle this issue.
Hi @minhbq-99!
Let me handle this issue.
@avagin and I looking into this right now we'll get back to you if any help is needed.
LKML thread: https://lore.kernel.org/criu/zihwmp67m2lpuxbfktmztvjdyap7suzd75dowlw4eamu6bhjf3@6euydiqowc7h/T/#u
Okay, that's fine.
LKML thread: https://lore.kernel.org/criu/zihwmp67m2lpuxbfktmztvjdyap7suzd75dowlw4eamu6bhjf3@6euydiqowc7h/T/#u
Oh, at first, I think that there is some information about this region in /proc/pid/smaps like some other madvise region already. So it looks like if the user is using kernel with madvise(MADV_GUARD_INSTALL) but no information in /proc/pid/pagemap, it is quite hard to detect in CRIU.
For reference, the following patch adds a guard region bit to the pagemap that we can use in CRIU: https://lore.kernel.org/all/[email protected]/T/#u
Thanks @mihalicyn! Please feel free to open a draft pull request!