summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/syscalls/linux/vfs2
diff options
context:
space:
mode:
authorgVisor bot <gvisor-bot@google.com>2021-04-17 01:00:38 +0000
committergVisor bot <gvisor-bot@google.com>2021-04-17 01:00:38 +0000
commitce460ce2f19e4b8c63f846d6258a0948a0766578 (patch)
treee029fa98ad0b419efa5ac5827746e6dc522f463f /pkg/sentry/syscalls/linux/vfs2
parented4ffd6b8cc12ae502d8077843d53a630f5cf519 (diff)
parent0c3e8daf503e011f0ef3e2a1c6d8b6ffd946acab (diff)
Merge release-20210408.0-46-g0c3e8daf5 (automated)
Diffstat (limited to 'pkg/sentry/syscalls/linux/vfs2')
-rw-r--r--pkg/sentry/syscalls/linux/vfs2/vfs2_abi_autogen_unsafe.go12
1 files changed, 6 insertions, 6 deletions
diff --git a/pkg/sentry/syscalls/linux/vfs2/vfs2_abi_autogen_unsafe.go b/pkg/sentry/syscalls/linux/vfs2/vfs2_abi_autogen_unsafe.go
index 97fc5d2a8..0525fce4c 100644
--- a/pkg/sentry/syscalls/linux/vfs2/vfs2_abi_autogen_unsafe.go
+++ b/pkg/sentry/syscalls/linux/vfs2/vfs2_abi_autogen_unsafe.go
@@ -52,12 +52,12 @@ func (s *sigSetWithSize) Packed() bool {
// MarshalUnsafe implements marshal.Marshallable.MarshalUnsafe.
func (s *sigSetWithSize) MarshalUnsafe(dst []byte) {
- gohacks.Memmove(unsafe.Pointer(&dst[0]), unsafe.Pointer(s), uintptr(len(dst)))
+ gohacks.Memmove(unsafe.Pointer(&dst[0]), unsafe.Pointer(s), uintptr(s.SizeBytes()))
}
// UnmarshalUnsafe implements marshal.Marshallable.UnmarshalUnsafe.
func (s *sigSetWithSize) UnmarshalUnsafe(src []byte) {
- gohacks.Memmove(unsafe.Pointer(s), unsafe.Pointer(&src[0]), uintptr(len(src)))
+ gohacks.Memmove(unsafe.Pointer(s), unsafe.Pointer(&src[0]), uintptr(s.SizeBytes()))
}
// CopyOutN implements marshal.Marshallable.CopyOutN.
@@ -173,12 +173,12 @@ func (m *MessageHeader64) Packed() bool {
// MarshalUnsafe implements marshal.Marshallable.MarshalUnsafe.
func (m *MessageHeader64) MarshalUnsafe(dst []byte) {
- gohacks.Memmove(unsafe.Pointer(&dst[0]), unsafe.Pointer(m), uintptr(len(dst)))
+ gohacks.Memmove(unsafe.Pointer(&dst[0]), unsafe.Pointer(m), uintptr(m.SizeBytes()))
}
// UnmarshalUnsafe implements marshal.Marshallable.UnmarshalUnsafe.
func (m *MessageHeader64) UnmarshalUnsafe(src []byte) {
- gohacks.Memmove(unsafe.Pointer(m), unsafe.Pointer(&src[0]), uintptr(len(src)))
+ gohacks.Memmove(unsafe.Pointer(m), unsafe.Pointer(&src[0]), uintptr(m.SizeBytes()))
}
// CopyOutN implements marshal.Marshallable.CopyOutN.
@@ -272,7 +272,7 @@ func (m *multipleMessageHeader64) Packed() bool {
// MarshalUnsafe implements marshal.Marshallable.MarshalUnsafe.
func (m *multipleMessageHeader64) MarshalUnsafe(dst []byte) {
if m.msgHdr.Packed() {
- gohacks.Memmove(unsafe.Pointer(&dst[0]), unsafe.Pointer(m), uintptr(len(dst)))
+ gohacks.Memmove(unsafe.Pointer(&dst[0]), unsafe.Pointer(m), uintptr(m.SizeBytes()))
} else {
// Type multipleMessageHeader64 doesn't have a packed layout in memory, fallback to MarshalBytes.
m.MarshalBytes(dst)
@@ -282,7 +282,7 @@ func (m *multipleMessageHeader64) MarshalUnsafe(dst []byte) {
// UnmarshalUnsafe implements marshal.Marshallable.UnmarshalUnsafe.
func (m *multipleMessageHeader64) UnmarshalUnsafe(src []byte) {
if m.msgHdr.Packed() {
- gohacks.Memmove(unsafe.Pointer(m), unsafe.Pointer(&src[0]), uintptr(len(src)))
+ gohacks.Memmove(unsafe.Pointer(m), unsafe.Pointer(&src[0]), uintptr(m.SizeBytes()))
} else {
// Type multipleMessageHeader64 doesn't have a packed layout in memory, fallback to UnmarshalBytes.
m.UnmarshalBytes(src)