summaryrefslogtreecommitdiffhomepage
path: root/pkg
diff options
context:
space:
mode:
Diffstat (limited to 'pkg')
-rw-r--r--pkg/abi/linux/linux.go1
-rw-r--r--pkg/sentry/syscalls/linux/sys_sysinfo.go1
2 files changed, 2 insertions, 0 deletions
diff --git a/pkg/abi/linux/linux.go b/pkg/abi/linux/linux.go
index a946849c5..de2af80dc 100644
--- a/pkg/abi/linux/linux.go
+++ b/pkg/abi/linux/linux.go
@@ -31,6 +31,7 @@ type Sysinfo struct {
TotalSwap uint64
FreeSwap uint64
Procs uint16
+ _ [6]byte // Pad Procs to 64bits.
TotalHigh uint64
FreeHigh uint64
Unit uint32
diff --git a/pkg/sentry/syscalls/linux/sys_sysinfo.go b/pkg/sentry/syscalls/linux/sys_sysinfo.go
index bd0ffcd5c..6560bac57 100644
--- a/pkg/sentry/syscalls/linux/sys_sysinfo.go
+++ b/pkg/sentry/syscalls/linux/sys_sysinfo.go
@@ -36,6 +36,7 @@ func Sysinfo(t *kernel.Task, args arch.SyscallArguments) (uintptr, *kernel.Sysca
Uptime: t.Kernel().MonotonicClock().Now().Seconds(),
TotalRAM: totalSize,
FreeRAM: totalSize - totalUsage,
+ Unit: 1,
}
_, err := t.CopyOut(addr, si)
return 0, nil, err