]> Cypherpunks repositories - gostls13.git/commit
[release-branch.go1.10] runtime: use Android O friendly syscalls on 64-bit machines
authorJason A. Donenfeld <Jason@zx2c4.com>
Thu, 8 Feb 2018 15:59:17 +0000 (16:59 +0100)
committerAndrew Bonventre <andybons@golang.org>
Thu, 29 Mar 2018 06:08:07 +0000 (06:08 +0000)
commit1188eb9c5bc67fa7d8dc97f01905e9e364eeb793
tree6cb792710e6f2d387d9454f9e8ef2067bfe7e4f3
parentee972315998be1520635f765a1ea230ad9833cbc
[release-branch.go1.10] runtime: use Android O friendly syscalls on 64-bit machines

Android O disallows open on 64-bit, so let's use openat with AT_FDCWD to
achieve the same behavior.

Android O disallows epoll_wait on 64-bit, so let's use epoll_pwait with
the last argument as NULL to achieve the same behavior.

See here:
https://android.googlesource.com/platform/bionic/+/master/libc/seccomp/arm64_app_policy.cpp
https://android.googlesource.com/platform/bionic/+/master/libc/seccomp/mips64_app_policy.cpp
https://android.googlesource.com/platform/bionic/+/master/libc/seccomp/x86_64_app_policy.cpp

Fixes #23750

Change-Id: If8d5a663357471e5d2c1f516151344a9d05b188a
Reviewed-on: https://go-review.googlesource.com/92895
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Austin Clements <austin@google.com>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-on: https://go-review.googlesource.com/102792
Run-TryBot: Andrew Bonventre <andybons@golang.org>
src/runtime/sys_linux_amd64.s
src/runtime/sys_linux_mips64x.s