go/src/internal
Kir Kolyshkin 8cd550a232 internal/syscall/unix: Eaccess: return ENOSYS on Android
On Android, faccessat2 syscall (which supports flags like AT_EACCESS) is
not allowed, so syscall.Faccessat tries to emulate AT_EACCESS check in
userspace using os.Stat, os.Geteuid etc.

Also, according to [1],

> Android doesn't have setuid programs, and never runs code with euid!=uid.

This means on Android the proper AT_EACCESS check is neither possible
nor really needed.

Let's skip the syscall.Faccessat userspace emulation of AT_EACCESS
check and return ENOSYS, so the callers can use a fallback.

This should speed up exec.LookPath on Android.

[1]: 508b2f6e5c/libc/bionic/faccessat.cpp (50)

Change-Id: If7b529fa314480b70e9ae9cdd8c7ce82cd55d233
Reviewed-on: https://go-review.googlesource.com/c/go/+/611298
Reviewed-by: Ian Lance Taylor <iant@google.com>
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
2024-09-06 13:49:31 +00:00
..
abi unique: use TypeFor instead of TypeOf to get type in Make 2024-08-21 16:03:35 +00:00
asan
bisect internal/bisect: use f.Function instead of f.Func.Name in stack trace 2024-05-03 17:28:43 +00:00
buildcfg cmd/compile/internal/ssagen: provide intrinsicBuilders 2024-08-27 14:27:25 +00:00
bytealg internal/bytealg: optimize Equal for arm64 target 2024-08-06 15:36:27 +00:00
byteorder internal/byteorder: new package 2024-05-10 20:31:29 +00:00
cfg
chacha8rand internal/chacha8rand: use internal/byteorder 2024-05-13 21:47:29 +00:00
concurrent internal/concurrent: make HashTrieMap iteration more idiomatic 2024-05-22 16:01:55 +00:00
coverage internal/coverage: add internal/stringslite to hard-coded coverpkg ID list 2024-07-30 14:19:02 +00:00
cpu internal/cpu, runtime: make linux/loong64 HWCAP data available 2024-08-29 09:15:06 +00:00
dag go,internal,io,mime: use slices and maps to clean tests 2024-07-25 00:22:14 +00:00
diff
filepathlite path/filepath, internal/filepathlite: move parts of filepath to filepathlite 2024-04-26 23:07:50 +00:00
fmtsort all: change from sort functions to slices functions where feasible 2024-05-23 01:00:11 +00:00
fuzz internal/fuzz: fix names of noCopy methods 2024-05-08 19:28:14 +00:00
goarch cmd: consolidate "known" os/arch tables into separate package 2024-07-29 15:38:20 +00:00
godebug go,internal,io,mime: use slices and maps to clean tests 2024-07-25 00:22:14 +00:00
godebugs net: enable multipath TCP by default for listeners 2024-09-03 15:27:29 +00:00
goexperiment all: create swissmap experiment and fork files 2024-08-02 15:34:37 +00:00
goos cmd: consolidate "known" os/arch tables into separate package 2024-07-29 15:38:20 +00:00
goroot
gover
goversion internal/goversion: update Version to 1.24 2024-07-22 17:52:34 +00:00
itoa
lazyregexp
lazytemplate
msan
nettrace
obscuretestdata
oserror
pkgbits cmd/compile/internal/noder: write V2 bitstream aliastypeparams=1 2024-08-28 21:03:29 +00:00
platform cmd/dist, internal/platform: mark windows/arm (32-bit ARM) broken 2024-08-14 20:56:33 +00:00
poll internal/poll: check return value instead of errno for copy_file_range(2) 2024-09-03 15:44:56 +00:00
profile go,internal,io,mime: use slices and maps to clean tests 2024-07-25 00:22:14 +00:00
profilerecord runtime: increase profiling stack depth to 128 2024-05-21 14:38:45 +00:00
race
reflectlite internal/reflectlite: remove redundent ifaceIndir 2024-05-07 17:01:54 +00:00
runtime internal/runtime/sys: fix typo in comment 2024-08-26 15:51:49 +00:00
saferio
singleflight
stringslite all: omit unnecessary 0 in slice expression 2024-09-03 20:55:15 +00:00
syscall internal/syscall/unix: Eaccess: return ENOSYS on Android 2024-09-06 13:49:31 +00:00
sysinfo internal/sysinfo: rename osCpuInfoName to osCPUInfoName 2024-05-07 18:42:42 +00:00
syslist cmd: consolidate "known" os/arch tables into separate package 2024-07-29 15:38:20 +00:00
testenv math,os,os/*: use testenv.Executable 2024-09-03 20:11:30 +00:00
testlog all: document legacy //go:linkname for final round of modules 2024-05-29 17:58:53 +00:00
testpty
trace src: fix typos 2024-08-20 21:01:59 +00:00
txtar
types go/types, types2: use max(fileVersion, go1.21) if fileVersion present 2024-08-27 22:37:44 +00:00
unsafeheader
weak internal/weak: shade pointer in weak-to-strong conversion 2024-09-04 18:13:24 +00:00
xcoff go,internal,io,mime: use slices and maps to clean tests 2024-07-25 00:22:14 +00:00
zstd internal/zstd: optimize window reset using make for buffer allocation 2024-04-02 13:49:23 +00:00