summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/platform/ptrace/ptrace_arm64.go
diff options
context:
space:
mode:
authorHaibo Xu <haibo.xu@arm.com>2019-08-09 13:16:46 -0700
committergVisor bot <gvisor-bot@google.com>2019-08-09 13:18:11 -0700
commit1c9da886e72aebc1c44c66715e3ec45f6d5eff5b (patch)
tree70505665f656e21e8c05182045ee5e5ffb4fde35 /pkg/sentry/platform/ptrace/ptrace_arm64.go
parentc8961a6cbde04603398d1db92b8a26147453f3a7 (diff)
Add initial ptrace stub and syscall support for arm64.
Signed-off-by: Haibo Xu <haibo.xu@arm.com> Change-Id: I1dbd23bb240cca71d0cc30fc75ca5be28cb4c37c PiperOrigin-RevId: 262619519
Diffstat (limited to 'pkg/sentry/platform/ptrace/ptrace_arm64.go')
-rw-r--r--pkg/sentry/platform/ptrace/ptrace_arm64.go30
1 files changed, 30 insertions, 0 deletions
diff --git a/pkg/sentry/platform/ptrace/ptrace_arm64.go b/pkg/sentry/platform/ptrace/ptrace_arm64.go
new file mode 100644
index 000000000..4db28c534
--- /dev/null
+++ b/pkg/sentry/platform/ptrace/ptrace_arm64.go
@@ -0,0 +1,30 @@
+// Copyright 2019 The gVisor Authors.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package ptrace
+
+import (
+ "syscall"
+
+ "gvisor.dev/gvisor/pkg/abi/linux"
+)
+
+// fpRegSet returns the GETREGSET/SETREGSET register set type to be used.
+func fpRegSet(_ bool) uintptr {
+ return linux.NT_PRFPREG
+}
+
+func stackPointer(r *syscall.PtraceRegs) uintptr {
+ return uintptr(r.Sp)
+}