diff options
author | Kevin Krakauer <krakauer@google.com> | 2020-02-06 17:07:04 -0800 |
---|---|---|
committer | Kevin Krakauer <krakauer@google.com> | 2020-02-06 17:07:04 -0800 |
commit | d98287f5eb40a9c91668b7511824c05d542e0599 (patch) | |
tree | f8430747db6e1c02fe0eb45a7dad0899d06bd072 /pkg/sentry/arch/arch_x86.go | |
parent | bf0ea204e9415a181c63ee10078cca753df14f7e (diff) | |
parent | 16561e461e82f8d846ef1f3ada990270ef39ccc6 (diff) |
Merge branch 'master' into tcp-matchers-submit
Diffstat (limited to 'pkg/sentry/arch/arch_x86.go')
-rw-r--r-- | pkg/sentry/arch/arch_x86.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/pkg/sentry/arch/arch_x86.go b/pkg/sentry/arch/arch_x86.go index a18093155..3db8bd34b 100644 --- a/pkg/sentry/arch/arch_x86.go +++ b/pkg/sentry/arch/arch_x86.go @@ -114,6 +114,10 @@ func newX86FPStateSlice() []byte { size, align := cpuid.HostFeatureSet().ExtendedStateSize() capacity := size // Always use at least 4096 bytes. + // + // For the KVM platform, this state is a fixed 4096 bytes, so make sure + // that the underlying array is at _least_ that size otherwise we will + // corrupt random memory. This is not a pleasant thing to debug. if capacity < 4096 { capacity = 4096 } |