[crac] RFR: Move CPUFeatures verification to the parent process of JVM
Jan Kratochvil
jkratochvil at openjdk.org
Tue Apr 29 06:42:46 UTC 2025
There was originally a mistake:
- restoring JVM did restore the image
- the restored JVM started checking whether CPU Features of the new host >= CPU Features of the checkpoint host
That is difficult as glibc is already configured (IFUNC) in the image for the checkpoint host and calling any such glibc functions in the restored image will crash (as the advanced instructions from misconfigured IFUNC are not available). Some glibc functions had to be reimplemented in a dummy way inside JVM due to this misdesign.
This patch changes it to:
- restoring JVM checks `cpufeatures` user data in the image against current CPU Features
- the restored JVM is started only if the CPU Features are satisfied, restored JVM no longer has to verify anything
The patch is a bit of a kitchen sink, there are various improvements of the CPU Features code.
-------------
Commit messages:
- whitespace fixes
- Fix missing errno on OSX
- Fix missing PATH_MAX on Windows
- List Fedora 42 as a comment
- patch cleanup
- Revert "Fedora 41->42"
- Fedora 41->42
- CPUFeatures.sh comment path fix
- compilation fixes
- Merge branch 'crac-builderror-cpufeaturesparent' into crac-cpufeaturesparent
- ... and 3 more: https://git.openjdk.org/crac/compare/ca1f5f67...e65c3c9b
Changes: https://git.openjdk.org/crac/pull/227/files
Webrev: https://webrevs.openjdk.org/?repo=crac&pr=227&range=00
Stats: 1057 lines in 23 files changed: 861 ins; 100 del; 96 mod
Patch: https://git.openjdk.org/crac/pull/227.diff
Fetch: git fetch https://git.openjdk.org/crac.git pull/227/head:pull/227
PR: https://git.openjdk.org/crac/pull/227
More information about the crac-dev
mailing list