New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
internal/syscall/unix: SYS_FCNTL blocked by seccomp on Android #36211
Comments
Looks like the offending syscall number is 55, which is |
@tklauser thx for your reply, but build 32-bit android arm library, how to use SYS_FCNTL64? I found that golang package call SYS_FCNTL in init function. |
@renwotao we'll need to fix this in the Go standard libary, i.e. in |
Working on a patch. |
Change https://golang.org/cl/212299 mentions this issue: |
Change https://golang.org/cl/212537 mentions this issue: |
Use FcntlSyscall from internal/syscall/unix to get fcntl64 on 32-bit Linux systems. Updates #36211 Change-Id: If48a6e09606ca9f7f6e22f3e8dc9a25fb3ccaf65 Reviewed-on: https://go-review.googlesource.com/c/go/+/212537 Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
Change https://golang.org/cl/212598 mentions this issue: |
Use fcntl64Syscall in forkAndExecInChild1 to get fcntl64 on 32-bit Linux systems. Updates #36211 Change-Id: Id0e34359256beace970e72102fdace7a987ff2b0 Reviewed-on: https://go-review.googlesource.com/c/go/+/212598 Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
Change https://golang.org/cl/212278 mentions this issue: |
Use the libc fcntl (via syscall.fcntl) on aix and solaris like it is already done for darwin. For the syscall-based fcntl implementation use FcntlSyscall from internal/syscall/unix in order to get fcntl64 on 32-bit Linux systems. On aix, fcntl with F_DUPFD_CLOEXEC is not supported. Thus, defined F_DUPFD_CLOEXEC = 0 in the syscall package and check its value before calling fcntl(fd, syscall.F_DUPFD_CLOEXEC, 0). On js/wasm, fcntl is not supported thus let its implementation return ENOSYS directly. Updates #36211 Change-Id: I96a2ea79e5c4eed2fefd94d0aefd72c940825682 Reviewed-on: https://go-review.googlesource.com/c/go/+/212278 Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
build android arm dynamic library(.so)
What did you expect to see?
seccomp filter can pass
What did you see instead?
hi,buddy
when I build arm android dynamic library with golang, I test library in Android 10 env, but crash when running library.
The text was updated successfully, but these errors were encountered: