CRaC / criu

Other
28 stars 10 forks source link

Port unprivileged restore to aarch64 #10

Closed AntonKozlov closed 1 year ago

AntonKozlov commented 1 year ago

In https://github.com/CRaC/criu/commit/db457a80298fca7963c1477b7a95ab4d46ce2885#diff-fb13ab02aee7015f7bb504cd1a63741ac942b7ad2a7ec6e3b4a9740fb10bde9dR66 (Restore in unprivileged environments), when we need to create a thread with certain TID, we spawn a limited set of threads until one of them eventually reach the target TID. But we need to ensure that those threads whose TIDs are below the target TID do not interfere with the thread with the target TID. All threads may co-exist for a short amount of time due to scheduling policies, and during that time, they share the stack.

So we need to port changes from x86-64 to have uniform behavior across platforms.

This change is also expected to fix an intermittent crash on restore on aarch64.