forked from CTSRD-CHERI/cheribsd
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
arm64/vmm: Avoid returning valid capabilities from VM_GET_REGISTER
The VM_GET_REGISTER and VM_GET_REGISTER_SET ioctls return guest register values; on arm64 they are used only by bhyve's gdb stub. The ioctls may return valid capabilities, which is a mistake since they belong to a different address space. Modify the ioctl handlers to strip capability tags before returning to userspace. Since the gdb stub still wants the tag values, provide two new ioctls for this purpose: VM_GET_REGISTER_CHERI_CAPABILITY_TAG and VM_GET_REGISTER_CHERI_CAPABILITY_TAG_SET. They are not atomic, but for practical purposes the target vCPU will be stopped anyway, and this lets us side-step compatibility concerns.
- Loading branch information
Showing
4 changed files
with
109 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters