summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/platform
diff options
context:
space:
mode:
authorMichael Pratt <mpratt@google.com>2018-12-10 12:36:27 -0800
committerShentubot <shentubot@google.com>2018-12-10 12:37:16 -0800
commit99d595869332f817de8f570fae184658c513a43c (patch)
tree0e1309f278df51d47a4059ab9c1ef5c3b37f14ca /pkg/sentry/platform
parent25b8424d754bd659a0f976f82f7c8846dc2a194f (diff)
Validate FS_BASE in Task.Clone
arch_prctl already verified that the new FS_BASE was canonical, but Task.Clone did not. Centralize these checks in the arch packages. Failure to validate could cause an error in PTRACE_SET_REGS when we try to switch to the app. PiperOrigin-RevId: 224862398 Change-Id: Iefe63b3f9aa6c4810326b8936e501be3ec407f14
Diffstat (limited to 'pkg/sentry/platform')
-rw-r--r--pkg/sentry/platform/ptrace/subprocess.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/pkg/sentry/platform/ptrace/subprocess.go b/pkg/sentry/platform/ptrace/subprocess.go
index 5e56a1514..a9d083f5a 100644
--- a/pkg/sentry/platform/ptrace/subprocess.go
+++ b/pkg/sentry/platform/ptrace/subprocess.go
@@ -480,10 +480,10 @@ func (s *subprocess) switchToApp(c *context, ac arch.Context) bool {
// Set registers.
if err := t.setRegs(regs); err != nil {
- panic(fmt.Sprintf("ptrace set regs failed: %v", err))
+ panic(fmt.Sprintf("ptrace set regs (%+v) failed: %v", regs, err))
}
if err := t.setFPRegs(fpState, uint64(fpLen), useXsave); err != nil {
- panic(fmt.Sprintf("ptrace set fpregs failed: %v", err))
+ panic(fmt.Sprintf("ptrace set fpregs (%+v) failed: %v", fpState, err))
}
for {