summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorgVisor bot <gvisor-bot@google.com>2021-07-21 02:20:16 +0000
committergVisor bot <gvisor-bot@google.com>2021-07-21 02:20:16 +0000
commitbb7fab5ca58aa5369a4bf0806ce95903d103da87 (patch)
tree6bd8819899ceec26cb51dac812ccbaefc9a54431
parentdb333ee70648eeb5627940a7b37304cc1051a0f4 (diff)
parent49d9ef49873dccf2adc414f0c2ea2c41a11b6941 (diff)
Merge release-20210712.0-31-g49d9ef498 (automated)
-rw-r--r--pkg/sentry/platform/kvm/bluepill_impl_amd64.s8
1 files changed, 8 insertions, 0 deletions
diff --git a/pkg/sentry/platform/kvm/bluepill_impl_amd64.s b/pkg/sentry/platform/kvm/bluepill_impl_amd64.s
index 7ad9e4e76..99f254342 100644
--- a/pkg/sentry/platform/kvm/bluepill_impl_amd64.s
+++ b/pkg/sentry/platform/kvm/bluepill_impl_amd64.s
@@ -107,7 +107,15 @@ TEXT ·bluepill(SB),NOSPLIT,$0
begin:
MOVQ vcpu+0(FP), AX
LEAQ VCPU_CPU(AX), BX
+
+ // The gorountine stack will be changed in guest which renders
+ // the frame pointer outdated and misleads perf tools.
+ // Disconnect the frame-chain with the zeroed frame pointer
+ // when it is saved in the frame in bluepillHandler().
+ MOVQ BP, CX
+ MOVQ $0, BP
BYTE CLI;
+ MOVQ CX, BP
check_vcpu:
MOVQ ENTRY_CPU_SELF(GS), CX
CMPQ BX, CX