diff options
Diffstat (limited to 'pkg')
-rwxr-xr-x | pkg/abi/linux/linux_abi_autogen_unsafe.go | 6 | ||||
-rwxr-xr-x | pkg/abi/linux/linux_amd64_abi_autogen_unsafe.go | 22 | ||||
-rwxr-xr-x | pkg/abi/linux/linux_arm64_abi_autogen_unsafe.go | 20 |
3 files changed, 27 insertions, 21 deletions
diff --git a/pkg/abi/linux/linux_abi_autogen_unsafe.go b/pkg/abi/linux/linux_abi_autogen_unsafe.go index c0f125617..ad4d72dfc 100755 --- a/pkg/abi/linux/linux_abi_autogen_unsafe.go +++ b/pkg/abi/linux/linux_abi_autogen_unsafe.go @@ -145,7 +145,7 @@ func (s *Statx) UnmarshalUnsafe(src []byte) { // CopyOutN implements marshal.Marshallable.CopyOutN. func (s *Statx) CopyOutN(task marshal.Task, addr usermem.Addr, limit int) (int, error) { - if !s.Atime.Packed() && s.Btime.Packed() && s.Ctime.Packed() && s.Mtime.Packed() { + if !s.Ctime.Packed() && s.Mtime.Packed() && s.Atime.Packed() && s.Btime.Packed() { // Type Statx doesn't have a packed layout in memory, fall back to MarshalBytes. buf := task.CopyScratchBuffer(s.SizeBytes()) s.MarshalBytes(buf) @@ -223,7 +223,9 @@ func (s *Statx) WriteTo(w io.Writer) (int64, error) { // SizeBytes implements marshal.Marshallable.SizeBytes. func (s *Statfs) SizeBytes() int { - return 120 + return 80 + + 4*2 + + 8*4 } // MarshalBytes implements marshal.Marshallable.MarshalBytes. diff --git a/pkg/abi/linux/linux_amd64_abi_autogen_unsafe.go b/pkg/abi/linux/linux_amd64_abi_autogen_unsafe.go index 363719378..a205144f5 100755 --- a/pkg/abi/linux/linux_amd64_abi_autogen_unsafe.go +++ b/pkg/abi/linux/linux_amd64_abi_autogen_unsafe.go @@ -22,7 +22,8 @@ var _ marshal.Marshallable = (*Timespec)(nil) // SizeBytes implements marshal.Marshallable.SizeBytes. func (e *EpollEvent) SizeBytes() int { - return 12 + return 4 + + 4*2 } // MarshalBytes implements marshal.Marshallable.MarshalBytes. @@ -115,10 +116,11 @@ func (e *EpollEvent) WriteTo(w io.Writer) (int64, error) { // SizeBytes implements marshal.Marshallable.SizeBytes. func (s *Stat) SizeBytes() int { - return 96 + + return 72 + (*Timespec)(nil).SizeBytes() + (*Timespec)(nil).SizeBytes() + - (*Timespec)(nil).SizeBytes() + (*Timespec)(nil).SizeBytes() + + 8*3 } // MarshalBytes implements marshal.Marshallable.MarshalBytes. @@ -152,7 +154,7 @@ func (s *Stat) MarshalBytes(dst []byte) { s.CTime.MarshalBytes(dst[:s.CTime.SizeBytes()]) dst = dst[s.CTime.SizeBytes():] // Padding: dst[:sizeof(int64)*3] ~= [3]int64{0} - dst = dst[24:] + dst = dst[8*(3):] } // UnmarshalBytes implements marshal.Marshallable.UnmarshalBytes. @@ -186,12 +188,12 @@ func (s *Stat) UnmarshalBytes(src []byte) { s.CTime.UnmarshalBytes(src[:s.CTime.SizeBytes()]) src = src[s.CTime.SizeBytes():] // Padding: ~ copy([3]int64(s._), src[:sizeof(int64)*3]) - src = src[24:] + src = src[8*(3):] } // Packed implements marshal.Marshallable.Packed. func (s *Stat) Packed() bool { - return s.CTime.Packed() && s.ATime.Packed() && s.MTime.Packed() + return s.MTime.Packed() && s.CTime.Packed() && s.ATime.Packed() } // MarshalUnsafe implements marshal.Marshallable.MarshalUnsafe. @@ -205,7 +207,7 @@ func (s *Stat) MarshalUnsafe(dst []byte) { // UnmarshalUnsafe implements marshal.Marshallable.UnmarshalUnsafe. func (s *Stat) UnmarshalUnsafe(src []byte) { - if s.ATime.Packed() && s.MTime.Packed() && s.CTime.Packed() { + if s.CTime.Packed() && s.ATime.Packed() && s.MTime.Packed() { safecopy.CopyOut(unsafe.Pointer(s), src) } else { s.UnmarshalBytes(src) @@ -214,7 +216,7 @@ func (s *Stat) UnmarshalUnsafe(src []byte) { // CopyOutN implements marshal.Marshallable.CopyOutN. func (s *Stat) CopyOutN(task marshal.Task, addr usermem.Addr, limit int) (int, error) { - if !s.ATime.Packed() && s.MTime.Packed() && s.CTime.Packed() { + if !s.MTime.Packed() && s.CTime.Packed() && s.ATime.Packed() { // Type Stat doesn't have a packed layout in memory, fall back to MarshalBytes. buf := task.CopyScratchBuffer(s.SizeBytes()) s.MarshalBytes(buf) @@ -242,7 +244,7 @@ func (s *Stat) CopyOut(task marshal.Task, addr usermem.Addr) (int, error) { // CopyIn implements marshal.Marshallable.CopyIn. func (s *Stat) CopyIn(task marshal.Task, addr usermem.Addr) (int, error) { - if !s.CTime.Packed() && s.ATime.Packed() && s.MTime.Packed() { + if !s.ATime.Packed() && s.MTime.Packed() && s.CTime.Packed() { // Type Stat doesn't have a packed layout in memory, fall back to UnmarshalBytes. buf := task.CopyScratchBuffer(s.SizeBytes()) length, err := task.CopyInBytes(addr, buf) @@ -268,7 +270,7 @@ func (s *Stat) CopyIn(task marshal.Task, addr usermem.Addr) (int, error) { // WriteTo implements io.WriterTo.WriteTo. func (s *Stat) WriteTo(w io.Writer) (int64, error) { - if !s.ATime.Packed() && s.MTime.Packed() && s.CTime.Packed() { + if !s.CTime.Packed() && s.ATime.Packed() && s.MTime.Packed() { // Type Stat doesn't have a packed layout in memory, fall back to MarshalBytes. buf := make([]byte, s.SizeBytes()) s.MarshalBytes(buf) diff --git a/pkg/abi/linux/linux_arm64_abi_autogen_unsafe.go b/pkg/abi/linux/linux_arm64_abi_autogen_unsafe.go index 7f01af760..210117aeb 100755 --- a/pkg/abi/linux/linux_arm64_abi_autogen_unsafe.go +++ b/pkg/abi/linux/linux_arm64_abi_autogen_unsafe.go @@ -22,7 +22,8 @@ var _ marshal.Marshallable = (*Timespec)(nil) // SizeBytes implements marshal.Marshallable.SizeBytes. func (e *EpollEvent) SizeBytes() int { - return 16 + return 8 + + 4*2 } // MarshalBytes implements marshal.Marshallable.MarshalBytes. @@ -119,10 +120,11 @@ func (e *EpollEvent) WriteTo(w io.Writer) (int64, error) { // SizeBytes implements marshal.Marshallable.SizeBytes. func (s *Stat) SizeBytes() int { - return 80 + + return 72 + (*Timespec)(nil).SizeBytes() + (*Timespec)(nil).SizeBytes() + - (*Timespec)(nil).SizeBytes() + (*Timespec)(nil).SizeBytes() + + 4*2 } // MarshalBytes implements marshal.Marshallable.MarshalBytes. @@ -158,7 +160,7 @@ func (s *Stat) MarshalBytes(dst []byte) { s.CTime.MarshalBytes(dst[:s.CTime.SizeBytes()]) dst = dst[s.CTime.SizeBytes():] // Padding: dst[:sizeof(int32)*2] ~= [2]int32{0} - dst = dst[8:] + dst = dst[4*(2):] } // UnmarshalBytes implements marshal.Marshallable.UnmarshalBytes. @@ -194,7 +196,7 @@ func (s *Stat) UnmarshalBytes(src []byte) { s.CTime.UnmarshalBytes(src[:s.CTime.SizeBytes()]) src = src[s.CTime.SizeBytes():] // Padding: ~ copy([2]int32(s._), src[:sizeof(int32)*2]) - src = src[8:] + src = src[4*(2):] } // Packed implements marshal.Marshallable.Packed. @@ -204,7 +206,7 @@ func (s *Stat) Packed() bool { // MarshalUnsafe implements marshal.Marshallable.MarshalUnsafe. func (s *Stat) MarshalUnsafe(dst []byte) { - if s.ATime.Packed() && s.MTime.Packed() && s.CTime.Packed() { + if s.MTime.Packed() && s.CTime.Packed() && s.ATime.Packed() { safecopy.CopyIn(dst, unsafe.Pointer(s)) } else { s.MarshalBytes(dst) @@ -222,7 +224,7 @@ func (s *Stat) UnmarshalUnsafe(src []byte) { // CopyOutN implements marshal.Marshallable.CopyOutN. func (s *Stat) CopyOutN(task marshal.Task, addr usermem.Addr, limit int) (int, error) { - if !s.ATime.Packed() && s.MTime.Packed() && s.CTime.Packed() { + if !s.MTime.Packed() && s.CTime.Packed() && s.ATime.Packed() { // Type Stat doesn't have a packed layout in memory, fall back to MarshalBytes. buf := task.CopyScratchBuffer(s.SizeBytes()) s.MarshalBytes(buf) @@ -250,7 +252,7 @@ func (s *Stat) CopyOut(task marshal.Task, addr usermem.Addr) (int, error) { // CopyIn implements marshal.Marshallable.CopyIn. func (s *Stat) CopyIn(task marshal.Task, addr usermem.Addr) (int, error) { - if !s.MTime.Packed() && s.CTime.Packed() && s.ATime.Packed() { + if !s.ATime.Packed() && s.MTime.Packed() && s.CTime.Packed() { // Type Stat doesn't have a packed layout in memory, fall back to UnmarshalBytes. buf := task.CopyScratchBuffer(s.SizeBytes()) length, err := task.CopyInBytes(addr, buf) @@ -276,7 +278,7 @@ func (s *Stat) CopyIn(task marshal.Task, addr usermem.Addr) (int, error) { // WriteTo implements io.WriterTo.WriteTo. func (s *Stat) WriteTo(w io.Writer) (int64, error) { - if !s.CTime.Packed() && s.ATime.Packed() && s.MTime.Packed() { + if !s.ATime.Packed() && s.MTime.Packed() && s.CTime.Packed() { // Type Stat doesn't have a packed layout in memory, fall back to MarshalBytes. buf := make([]byte, s.SizeBytes()) s.MarshalBytes(buf) |