diff options
author | gVisor bot <gvisor-bot@google.com> | 2020-07-28 02:30:37 +0000 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2020-07-28 02:30:37 +0000 |
commit | 4eef5ed1474ffddc4b3ffa19a54fcb5301fd6f37 (patch) | |
tree | 3f91b8875c2f1d31e2be02359671c95468a06d6d /pkg/sentry | |
parent | a724f8961639b7b3e155bbcd541fb1bfd7edd083 (diff) | |
parent | 18c246359663ae7e424f94225f11f87cc63eccd9 (diff) |
Merge release-20200622.1-246-g18c246359 (automated)
Diffstat (limited to 'pkg/sentry')
-rw-r--r-- | pkg/sentry/strace/epoll.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/pkg/sentry/strace/epoll.go b/pkg/sentry/strace/epoll.go index a6e48b836..5d51a7792 100644 --- a/pkg/sentry/strace/epoll.go +++ b/pkg/sentry/strace/epoll.go @@ -50,10 +50,10 @@ func epollEvents(t *kernel.Task, eventsAddr usermem.Addr, numEvents, maxBytes ui sb.WriteString("...") break } - if _, ok := addr.AddLength(uint64(linux.SizeOfEpollEvent)); !ok { - fmt.Fprintf(&sb, "{error reading event at %#x: EFAULT}", addr) - continue - } + // Allowing addr to overflow is consistent with Linux, and harmless; if + // this isn't the last iteration of the loop, the next call to CopyIn + // will just fail with EFAULT. + addr, _ = addr.AddLength(uint64(linux.SizeOfEpollEvent)) } sb.WriteString("}") return sb.String() @@ -75,7 +75,7 @@ var epollEventEvents = abi.FlagSet{ {Flag: linux.EPOLLPRI, Name: "EPOLLPRI"}, {Flag: linux.EPOLLOUT, Name: "EPOLLOUT"}, {Flag: linux.EPOLLERR, Name: "EPOLLERR"}, - {Flag: linux.EPOLLHUP, Name: "EPULLHUP"}, + {Flag: linux.EPOLLHUP, Name: "EPOLLHUP"}, {Flag: linux.EPOLLRDNORM, Name: "EPOLLRDNORM"}, {Flag: linux.EPOLLRDBAND, Name: "EPOLLRDBAND"}, {Flag: linux.EPOLLWRNORM, Name: "EPOLLWRNORM"}, |