[lxc-devel] [lxd/master] seccomp: fix i386 builds
brauner on Github
lxc-bot at linuxcontainers.org
Tue Jul 28 18:05:26 UTC 2020
A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 364 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20200728/65beb335/attachment.bin>
-------------- next part --------------
From 786152037a8034320fb4583597b97287f528c04a Mon Sep 17 00:00:00 2001
From: Christian Brauner <christian.brauner at ubuntu.com>
Date: Tue, 28 Jul 2020 20:04:56 +0200
Subject: [PATCH] seccomp: fix i386 builds
Signed-off-by: Christian Brauner <christian.brauner at ubuntu.com>
---
lxd/seccomp/seccomp.go | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/lxd/seccomp/seccomp.go b/lxd/seccomp/seccomp.go
index f4a430d5f4..9f04a011b3 100644
--- a/lxd/seccomp/seccomp.go
+++ b/lxd/seccomp/seccomp.go
@@ -1417,7 +1417,7 @@ func (s *Server) HandleMountSyscall(c Instance, siov *Iovec) int {
// process_vm_readv() doesn't like crossing page boundaries when
// reading individual syscall args.
- bufSize := uint64(4096)
+ bufSize := uint32(4096)
if bufSize > pageSize {
bufSize = pageSize
}
@@ -1442,22 +1442,22 @@ func (s *Server) HandleMountSyscall(c Instance, siov *Iovec) int {
}
if siov.req.data.args[0] != 0 {
- localIov[0].Len = bufSize
+ localIov[0].Len = uint64(bufSize)
remoteIov[0].Len = int(bufSize)
}
if siov.req.data.args[1] != 0 {
- localIov[1].Len = bufSize
+ localIov[1].Len = uint64(bufSize)
remoteIov[1].Len = int(bufSize)
}
if siov.req.data.args[2] != 0 {
- localIov[2].Len = bufSize
+ localIov[2].Len = uint64(bufSize)
remoteIov[2].Len = int(bufSize)
}
if siov.req.data.args[4] != 0 {
- localIov[3].Len = bufSize
+ localIov[3].Len = uint64(bufSize)
remoteIov[3].Len = int(bufSize)
}
@@ -1761,11 +1761,11 @@ func (s *Server) MountSyscallShift(c Instance) bool {
return false
}
-var pageSize uint64 = 4096
+var pageSize uint32 = 4096
func init() {
tmp := unix.Getpagesize()
if tmp > 0 {
- pageSize = uint64(tmp)
+ pageSize = uint32(tmp)
}
}
More information about the lxc-devel
mailing list