criu/compel
Tushar Mohapatra 100b3087fc compel/x86: probe kernel task_size at runtime
Change compel_task_size() to probe the actual kernel address space
limit at runtime via mmap() with MAP_FIXED_NOREPLACE flag.

On systems where the CPU supports 5-level paging but the kernel
doesn't have it enabled, we need to detect the actual task size the
kernel is using.

On x86-64, task_size is either (1UL << 47) for 4-level paging or
(1UL << 56) for 5-level paging. The function probes by attempting
to mmap at the 4-level boundary and if it succeeds or the address
is already occupied, the kernel supports 5-level paging.

Fixes: #2877

Signed-off-by: Tushar Mohapatra <tusharmohapatra.gig@gmail.com>
2026-02-16 22:35:00 -08:00
..
arch compel/x86: probe kernel task_size at runtime 2026-02-16 22:35:00 -08:00
include criu/restore: gcs: adds restore implementation for Guarded Control Stack 2025-12-07 19:20:00 +01:00
plugins compel: infect: prepare parasite_service() for addition of CET support 2024-09-11 16:02:11 -07:00
src compel: flush caches after parasite injection 2025-11-02 07:48:23 -08:00
test compel: gcs: add opt-in GCS test support for AArch64 2025-12-07 19:20:00 +01:00
.gitignore compel: fix gitignore and remove autogenerated code 2025-03-21 12:40:31 -07:00
compel-host compel cli: show includes 2017-03-15 00:09:55 +03:00
Makefile compel: add riscv64 support 2025-03-21 12:40:31 -07:00