Repository navigation
Test guest CET access across KVM kernels - #2051
Conversation
Signed-off-by: James Sturtevant <jsturtevant@gmail.com>
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues were identified for the CET isolation test compatibility change.
No open issues 🎉
What changed in this PR
Makes the CET isolation test compatible with KVM kernels that permit host access to zero-valued IA32_S_CET while hiding guest CET support.
Changes:
- Accepts either the specific MSR declaration error or a guest abort when enabling shadow stacks through an explicitly allowed MSR.
- Checks that an aborted sandbox is poisoned and retains the requirement that guest CPUID hide shadow stacks.
| File | Description |
|---|---|
src/hyperlight_host/src/sandbox/initialized.rs |
Handles both valid KVM CET outcomes in the sandbox test. |
Review effort: Balanced
|
fyi @ludfjig |
ludfjig
left a comment
There was a problem hiding this comment.
lgtm, I had ai confirm in kernel source. Thanks
Benchmark ResultsMeasured commit: kvm / amd (Linux) (➖ stable)No benchmark improved or regressed. Benchmark Resultsfunction_call_codec
payload_allocation
sandboxes
slot_pool
snapshot_files
virtq_readonly
virtq_readwrite
kvm / intel (Linux) (➖ stable)No benchmark improved or regressed. Benchmark Resultsfunction_call_codec
payload_allocation
sandboxes
slot_pool
snapshot_files
virtq_readonly
virtq_readwrite
mshv3 / amd (Linux) (➖ stable)No benchmark improved or regressed. Benchmark Resultsfunction_call_codec
payload_allocation
sandboxes
slot_pool
snapshot_files
virtq_readonly
virtq_readwrite
mshv3 / intel (Linux) (➖ stable)No benchmark improved or regressed. Benchmark Resultsfunction_call_codec
payload_allocation
sandboxes
slot_pool
snapshot_files
virtq_readonly
virtq_readwrite
hyperv-ws2025 / amd (Windows) (➖ stable)No benchmark improved or regressed. Benchmark Resultsfunction_call_codec
payload_allocation
sandboxes
slot_pool
snapshot_files
virtq_readonly
virtq_readwrite
hyperv-ws2025 / intel (Windows) (➖ stable)No benchmark improved or regressed. Benchmark Resultsfunction_call_codec
payload_allocation
sandboxes
slot_pool
snapshot_files
virtq_readonly
virtq_readwrite
Reported by |
Some KVM kernels permit host access to zero-valued
IA32_S_CETeven when guest CET is hidden. https://github.com/torvalds/linux/blob/v6.18/arch/x86/kvm/x86.c#L537-L544The test accepts either the specific declaration error or a guest abort when enabling shadow stacks through an explicitly allowed MSR. Guest CPUID must hide shadow stacks.
I was getting this on my local machine though it isn't in CI due to a kernel version difference
ci uses kernel 6.8.0-1070-azure. Mine uses 6.18.58.1 WSL2.