You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The expected result is it should segfault (print got expected sigsegv), but on t2.micro, the program prints eax=306f2 instead. It implies the kernel indeed received the arch_prctl request, and set the hardware register, but the VM (firecracker) somehow ignored the write to MISC_FEATURES_ENABLES, bit-0.
More details can be found in this application note.
At first I thought it might be an AWS kernel (optimization) issue, hence tried both on kernel: 4.15.0-1051-aws and 4.15.0-65-generic, but the results were the same.
More information about the system setup:
AWS ec2 t2.micro
stock ubuntu 18.04
The text was updated successfully, but these errors were encountered:
CPUID faulting allow user space programs simulate CPUID instruction, by trapping
cpuid
instruction to SEGSEGV: https://lore.kernel.org/patchwork/patch/726765/This is done by query
PLATFORM_INFO
(0xce) MSR, bit-31. When bit-31 is set, thecpuid_fault
can be done by write/clearMISC_FEATURES_ENABLES
, bit-0.On an AWS EC2
t2.micro
instance,cpuid_fault
is present:And can be confirmed by
cat /proc/cpuinfo
as well:However, below program doesn't work as expected:
The expected result is it should segfault (print
got expected sigsegv
), but ont2.micro
, the program printseax=306f2
instead. It implies the kernel indeed received thearch_prctl
request, and set the hardware register, but the VM (firecracker) somehow ignored the write toMISC_FEATURES_ENABLES
, bit-0.More details can be found in this application note.
At first I thought it might be an AWS kernel (optimization) issue, hence tried both on kernel:
4.15.0-1051-aws
and4.15.0-65-generic
, but the results were the same.More information about the system setup:
The text was updated successfully, but these errors were encountered: