README 881 B

123456789101112131415161718192021222324252627282930313233343536
  1. Guarded Control Stack prototype
  2. ===============================
  3. To build:
  4. First, install Kas if you don't already have it:
  5. $ pip3 install --user kas
  6. Then use Kas to build an image:
  7. $ kas build --update gcs.yml
  8. To run the image inside an FVP:
  9. $ kas shell gcs.yml -c "../../scripts/runfvp --console"
  10. To run the tests automatically, Kas can be used:
  11. $ kas build --update meta-arm-gcs/gcs-test.yml
  12. Verification:
  13. On boot, the kernel should detect that the cores have GCS:
  14. CPU features: detected: Guarded Control Stack (GCS)
  15. Binaries should be tagged with PAC/BTI/GCS:
  16. $ readelf -n /bin/bash | grep AArch
  17. Properties: AArch64 feature: BTI, PAC, GCS
  18. Enabling GCS tunables shouldn't cause crashes:
  19. $ GLIBC_TUNABLES=glibc.cpu.aarch64_gcs=1:glibc.cpu.aarch64_gcs_policy=2 ls /
  20. bin boot dev etc home lib lost+found media mnt proc run sbin sys tmp usr var