diff options
author | gVisor bot <gvisor-bot@google.com> | 2020-05-18 17:26:22 +0000 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2020-05-18 17:26:22 +0000 |
commit | d2d0775782a6bde6d3f0614749cbdc262767e911 (patch) | |
tree | a40bccf60371abcc9ea3544a7e40c6724eaef023 /runsc/boot/compat_amd64.go | |
parent | 9e04f5c862c22b110fe1788dd02162afea8ef84c (diff) | |
parent | 32ab382c80306d7dab499e983af2bfaea7770d1d (diff) |
Merge release-20200511.0-253-g32ab382 (automated)
Diffstat (limited to 'runsc/boot/compat_amd64.go')
-rw-r--r-- | runsc/boot/compat_amd64.go | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/runsc/boot/compat_amd64.go b/runsc/boot/compat_amd64.go index 42b0ca8b0..8eb76b2ba 100644 --- a/runsc/boot/compat_amd64.go +++ b/runsc/boot/compat_amd64.go @@ -24,8 +24,12 @@ import ( "gvisor.dev/gvisor/pkg/sentry/strace" ) -// reportLimit is the max number of events that should be reported per tracker. -const reportLimit = 100 +const ( + // reportLimit is the max number of events that should be reported per + // tracker. + reportLimit = 100 + syscallLink = "https://gvisor.dev/c/linux/amd64" +) // newRegs create a empty Registers instance. func newRegs() *rpb.Registers { @@ -36,22 +40,22 @@ func newRegs() *rpb.Registers { } } -func argVal(argIdx int, regs *rpb.Registers) uint32 { +func argVal(argIdx int, regs *rpb.Registers) uint64 { amd64Regs := regs.GetArch().(*rpb.Registers_Amd64).Amd64 switch argIdx { case 0: - return uint32(amd64Regs.Rdi) + return amd64Regs.Rdi case 1: - return uint32(amd64Regs.Rsi) + return amd64Regs.Rsi case 2: - return uint32(amd64Regs.Rdx) + return amd64Regs.Rdx case 3: - return uint32(amd64Regs.R10) + return amd64Regs.R10 case 4: - return uint32(amd64Regs.R8) + return amd64Regs.R8 case 5: - return uint32(amd64Regs.R9) + return amd64Regs.R9 } panic(fmt.Sprintf("invalid syscall argument index %d", argIdx)) } |