coconut-svsm / svsm

COCONUT-SVSM
MIT License
123 stars 43 forks source link

address: introduce more alignment check methods + add a missing alignment check #270

Closed 00xc closed 9 months ago

00xc commented 9 months ago

Introduce VirtAddr::aligned_{ref,mut} helpers to help transform a VirtAddr into a &T / &mut T while checking that the address is non-NULL and properly aligned to T's requirements.

Also, add alignment check I missed in #226.