diff options
author | gVisor bot <gvisor-bot@google.com> | 2021-03-03 18:43:27 +0000 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2021-03-03 18:43:27 +0000 |
commit | aae5455fe381c4cbc956f61c971284ee05c52dfc (patch) | |
tree | 2b1cb0233968680dcd0374f20ee826cf311bda95 /pkg/sentry/pgalloc/pgalloc_unsafe.go | |
parent | e2599d556573b05eb3714c1e791fa29431dc3d3f (diff) | |
parent | a9441aea2780da8c93da1c73da860219f98438de (diff) |
Merge release-20210301.0-5-ga9441aea2 (automated)
Diffstat (limited to 'pkg/sentry/pgalloc/pgalloc_unsafe.go')
-rw-r--r-- | pkg/sentry/pgalloc/pgalloc_unsafe.go | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/pkg/sentry/pgalloc/pgalloc_unsafe.go b/pkg/sentry/pgalloc/pgalloc_unsafe.go index a4b5d581c..71f8f66c1 100644 --- a/pkg/sentry/pgalloc/pgalloc_unsafe.go +++ b/pkg/sentry/pgalloc/pgalloc_unsafe.go @@ -16,8 +16,9 @@ package pgalloc import ( "reflect" - "syscall" "unsafe" + + "golang.org/x/sys/unix" ) func unsafeSlice(addr uintptr, length int) (slice []byte) { @@ -29,8 +30,8 @@ func unsafeSlice(addr uintptr, length int) (slice []byte) { } func mincore(s []byte, buf []byte) error { - if _, _, errno := syscall.RawSyscall( - syscall.SYS_MINCORE, + if _, _, errno := unix.RawSyscall( + unix.SYS_MINCORE, uintptr(unsafe.Pointer(&s[0])), uintptr(len(s)), uintptr(unsafe.Pointer(&buf[0]))); errno != 0 { |