criu

ARM64 Guarded Control Stack (GCS)

CRIU supports checkpointing and restoring the Guarded Control Stack (GCS) feature on ARM64 (AArch64) architectures. GCS is a hardware-assisted shadow stack mechanism designed to prevent return-oriented programming (ROP) attacks by maintaining a protected stack of return addresses.

How CRIU Handles GCS

GCS support is integrated into CRIU’s architecture-specific code for AArch64 (arch/aarch64/gcs.c).

1. Checkpointing (Dumping)

During the dump phase, CRIU detects if a task has GCS enabled by checking its CPU features and hardware capabilities (HWCAP_GCS).

2. Restoration

Restoring GCS requires carefully re-establishing the shadow stack before the process resumes normal execution.

Kernel Requirements

GCS support in CRIU requires an ARM64 host and a kernel that supports the Guarded Control Stack ABI, typically including:

See also