summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/sentry')
-rw-r--r--pkg/sentry/arch/arch_amd64_abi_autogen_unsafe.go16
-rw-r--r--pkg/sentry/arch/arch_arm64_abi_autogen_unsafe.go20
-rw-r--r--pkg/sentry/socket/netfilter/netfilter_abi_autogen_unsafe.go8
-rw-r--r--pkg/sentry/syscalls/linux/linux_abi_autogen_unsafe.go8
-rw-r--r--pkg/sentry/syscalls/linux/vfs2/vfs2_abi_autogen_unsafe.go4
5 files changed, 28 insertions, 28 deletions
diff --git a/pkg/sentry/arch/arch_amd64_abi_autogen_unsafe.go b/pkg/sentry/arch/arch_amd64_abi_autogen_unsafe.go
index 42cc106a1..1ac4b7dc3 100644
--- a/pkg/sentry/arch/arch_amd64_abi_autogen_unsafe.go
+++ b/pkg/sentry/arch/arch_amd64_abi_autogen_unsafe.go
@@ -85,7 +85,7 @@ func (s *SignalContext64) MarshalBytes(dst []byte) []byte {
dst = dst[8:]
hostarch.ByteOrder.PutUint64(dst[:8], uint64(s.Trapno))
dst = dst[8:]
- dst = s.Oldmask.MarshalBytes(dst)
+ dst = s.Oldmask.MarshalUnsafe(dst)
hostarch.ByteOrder.PutUint64(dst[:8], uint64(s.Cr2))
dst = dst[8:]
hostarch.ByteOrder.PutUint64(dst[:8], uint64(s.Fpstate))
@@ -147,7 +147,7 @@ func (s *SignalContext64) UnmarshalBytes(src []byte) []byte {
src = src[8:]
s.Trapno = uint64(hostarch.ByteOrder.Uint64(src[:8]))
src = src[8:]
- src = s.Oldmask.UnmarshalBytes(src)
+ src = s.Oldmask.UnmarshalUnsafe(src)
s.Cr2 = uint64(hostarch.ByteOrder.Uint64(src[:8]))
src = src[8:]
s.Fpstate = uint64(hostarch.ByteOrder.Uint64(src[:8]))
@@ -282,9 +282,9 @@ func (u *UContext64) MarshalBytes(dst []byte) []byte {
dst = dst[8:]
hostarch.ByteOrder.PutUint64(dst[:8], uint64(u.Link))
dst = dst[8:]
- dst = u.Stack.MarshalBytes(dst)
- dst = u.MContext.MarshalBytes(dst)
- dst = u.Sigset.MarshalBytes(dst)
+ dst = u.Stack.MarshalUnsafe(dst)
+ dst = u.MContext.MarshalUnsafe(dst)
+ dst = u.Sigset.MarshalUnsafe(dst)
return dst
}
@@ -294,9 +294,9 @@ func (u *UContext64) UnmarshalBytes(src []byte) []byte {
src = src[8:]
u.Link = uint64(hostarch.ByteOrder.Uint64(src[:8]))
src = src[8:]
- src = u.Stack.UnmarshalBytes(src)
- src = u.MContext.UnmarshalBytes(src)
- src = u.Sigset.UnmarshalBytes(src)
+ src = u.Stack.UnmarshalUnsafe(src)
+ src = u.MContext.UnmarshalUnsafe(src)
+ src = u.Sigset.UnmarshalUnsafe(src)
return src
}
diff --git a/pkg/sentry/arch/arch_arm64_abi_autogen_unsafe.go b/pkg/sentry/arch/arch_arm64_abi_autogen_unsafe.go
index 035134fa7..4ae66042e 100644
--- a/pkg/sentry/arch/arch_arm64_abi_autogen_unsafe.go
+++ b/pkg/sentry/arch/arch_arm64_abi_autogen_unsafe.go
@@ -39,7 +39,7 @@ func (f *FpsimdContext) SizeBytes() int {
// MarshalBytes implements marshal.Marshallable.MarshalBytes.
func (f *FpsimdContext) MarshalBytes(dst []byte) []byte {
- dst = f.Head.MarshalBytes(dst)
+ dst = f.Head.MarshalUnsafe(dst)
hostarch.ByteOrder.PutUint32(dst[:4], uint32(f.Fpsr))
dst = dst[4:]
hostarch.ByteOrder.PutUint32(dst[:4], uint32(f.Fpcr))
@@ -53,7 +53,7 @@ func (f *FpsimdContext) MarshalBytes(dst []byte) []byte {
// UnmarshalBytes implements marshal.Marshallable.UnmarshalBytes.
func (f *FpsimdContext) UnmarshalBytes(src []byte) []byte {
- src = f.Head.UnmarshalBytes(src)
+ src = f.Head.UnmarshalUnsafe(src)
f.Fpsr = uint32(hostarch.ByteOrder.Uint32(src[:4]))
src = src[4:]
f.Fpcr = uint32(hostarch.ByteOrder.Uint32(src[:4]))
@@ -200,7 +200,7 @@ func (s *SignalContext64) MarshalBytes(dst []byte) []byte {
dst[0] = byte(s._pad[idx])
dst = dst[1:]
}
- dst = s.Fpsimd64.MarshalBytes(dst)
+ dst = s.Fpsimd64.MarshalUnsafe(dst)
return dst
}
@@ -222,7 +222,7 @@ func (s *SignalContext64) UnmarshalBytes(src []byte) []byte {
s._pad[idx] = src[0]
src = src[1:]
}
- src = s.Fpsimd64.UnmarshalBytes(src)
+ src = s.Fpsimd64.UnmarshalUnsafe(src)
return src
}
@@ -351,8 +351,8 @@ func (u *UContext64) MarshalBytes(dst []byte) []byte {
dst = dst[8:]
hostarch.ByteOrder.PutUint64(dst[:8], uint64(u.Link))
dst = dst[8:]
- dst = u.Stack.MarshalBytes(dst)
- dst = u.Sigset.MarshalBytes(dst)
+ dst = u.Stack.MarshalUnsafe(dst)
+ dst = u.Sigset.MarshalUnsafe(dst)
for idx := 0; idx < 120; idx++ {
dst[0] = byte(u._pad[idx])
dst = dst[1:]
@@ -361,7 +361,7 @@ func (u *UContext64) MarshalBytes(dst []byte) []byte {
dst[0] = byte(u._pad2[idx])
dst = dst[1:]
}
- dst = u.MContext.MarshalBytes(dst)
+ dst = u.MContext.MarshalUnsafe(dst)
return dst
}
@@ -371,8 +371,8 @@ func (u *UContext64) UnmarshalBytes(src []byte) []byte {
src = src[8:]
u.Link = uint64(hostarch.ByteOrder.Uint64(src[:8]))
src = src[8:]
- src = u.Stack.UnmarshalBytes(src)
- src = u.Sigset.UnmarshalBytes(src)
+ src = u.Stack.UnmarshalUnsafe(src)
+ src = u.Sigset.UnmarshalUnsafe(src)
for idx := 0; idx < 120; idx++ {
u._pad[idx] = src[0]
src = src[1:]
@@ -381,7 +381,7 @@ func (u *UContext64) UnmarshalBytes(src []byte) []byte {
u._pad2[idx] = src[0]
src = src[1:]
}
- src = u.MContext.UnmarshalBytes(src)
+ src = u.MContext.UnmarshalUnsafe(src)
return src
}
diff --git a/pkg/sentry/socket/netfilter/netfilter_abi_autogen_unsafe.go b/pkg/sentry/socket/netfilter/netfilter_abi_autogen_unsafe.go
index 65e39de64..62df05937 100644
--- a/pkg/sentry/socket/netfilter/netfilter_abi_autogen_unsafe.go
+++ b/pkg/sentry/socket/netfilter/netfilter_abi_autogen_unsafe.go
@@ -27,15 +27,15 @@ func (n *nfNATTarget) SizeBytes() int {
// MarshalBytes implements marshal.Marshallable.MarshalBytes.
func (n *nfNATTarget) MarshalBytes(dst []byte) []byte {
- dst = n.Target.MarshalBytes(dst)
- dst = n.Range.MarshalBytes(dst)
+ dst = n.Target.MarshalUnsafe(dst)
+ dst = n.Range.MarshalUnsafe(dst)
return dst
}
// UnmarshalBytes implements marshal.Marshallable.UnmarshalBytes.
func (n *nfNATTarget) UnmarshalBytes(src []byte) []byte {
- src = n.Target.UnmarshalBytes(src)
- src = n.Range.UnmarshalBytes(src)
+ src = n.Target.UnmarshalUnsafe(src)
+ src = n.Range.UnmarshalUnsafe(src)
return src
}
diff --git a/pkg/sentry/syscalls/linux/linux_abi_autogen_unsafe.go b/pkg/sentry/syscalls/linux/linux_abi_autogen_unsafe.go
index 2ebafff21..bec14ebfa 100644
--- a/pkg/sentry/syscalls/linux/linux_abi_autogen_unsafe.go
+++ b/pkg/sentry/syscalls/linux/linux_abi_autogen_unsafe.go
@@ -29,7 +29,7 @@ func (d *direntHdr) SizeBytes() int {
// MarshalBytes implements marshal.Marshallable.MarshalBytes.
func (d *direntHdr) MarshalBytes(dst []byte) []byte {
- dst = d.OldHdr.MarshalBytes(dst)
+ dst = d.OldHdr.MarshalUnsafe(dst)
dst[0] = byte(d.Typ)
dst = dst[1:]
return dst
@@ -37,7 +37,7 @@ func (d *direntHdr) MarshalBytes(dst []byte) []byte {
// UnmarshalBytes implements marshal.Marshallable.UnmarshalBytes.
func (d *direntHdr) UnmarshalBytes(src []byte) []byte {
- src = d.OldHdr.UnmarshalBytes(src)
+ src = d.OldHdr.UnmarshalUnsafe(src)
d.Typ = uint8(src[0])
src = src[1:]
return src
@@ -611,7 +611,7 @@ func (m *multipleMessageHeader64) SizeBytes() int {
// MarshalBytes implements marshal.Marshallable.MarshalBytes.
func (m *multipleMessageHeader64) MarshalBytes(dst []byte) []byte {
- dst = m.msgHdr.MarshalBytes(dst)
+ dst = m.msgHdr.MarshalUnsafe(dst)
hostarch.ByteOrder.PutUint32(dst[:4], uint32(m.msgLen))
dst = dst[4:]
// Padding: dst[:sizeof(int32)] ~= int32(0)
@@ -621,7 +621,7 @@ func (m *multipleMessageHeader64) MarshalBytes(dst []byte) []byte {
// UnmarshalBytes implements marshal.Marshallable.UnmarshalBytes.
func (m *multipleMessageHeader64) UnmarshalBytes(src []byte) []byte {
- src = m.msgHdr.UnmarshalBytes(src)
+ src = m.msgHdr.UnmarshalUnsafe(src)
m.msgLen = uint32(hostarch.ByteOrder.Uint32(src[:4]))
src = src[4:]
// Padding: var _ int32 ~= src[:sizeof(int32)]
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 fbbb520b9..387f825d8 100644
--- a/pkg/sentry/syscalls/linux/vfs2/vfs2_abi_autogen_unsafe.go
+++ b/pkg/sentry/syscalls/linux/vfs2/vfs2_abi_autogen_unsafe.go
@@ -251,7 +251,7 @@ func (m *multipleMessageHeader64) SizeBytes() int {
// MarshalBytes implements marshal.Marshallable.MarshalBytes.
func (m *multipleMessageHeader64) MarshalBytes(dst []byte) []byte {
- dst = m.msgHdr.MarshalBytes(dst)
+ dst = m.msgHdr.MarshalUnsafe(dst)
hostarch.ByteOrder.PutUint32(dst[:4], uint32(m.msgLen))
dst = dst[4:]
// Padding: dst[:sizeof(int32)] ~= int32(0)
@@ -261,7 +261,7 @@ func (m *multipleMessageHeader64) MarshalBytes(dst []byte) []byte {
// UnmarshalBytes implements marshal.Marshallable.UnmarshalBytes.
func (m *multipleMessageHeader64) UnmarshalBytes(src []byte) []byte {
- src = m.msgHdr.UnmarshalBytes(src)
+ src = m.msgHdr.UnmarshalUnsafe(src)
m.msgLen = uint32(hostarch.ByteOrder.Uint32(src[:4]))
src = src[4:]
// Padding: var _ int32 ~= src[:sizeof(int32)]