You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to run some code that uses cap-std on Android 10 (on a kernel that definitely does not support the syscall), and I hit the following crash in openat2, called by open_beneath from open_impl:
signal 31 (SIGSYS), code 1 (SYS_SECCOMP), fault addr --------
Cause: seccomp prevented call to disallowed arm64 system call 437
backtrace:
#00 pc 00000000000703d0 /apex/com.android.runtime/lib64/bionic/libc.so (syscall+32)
#01 pc 0000000002e8e404 ourapp.so (rsix::imp::libc::syscalls::openat2::h04809da1ec63d9ef+44)
#02 pc 0000000002e8aa9c ourapp.so (cap_primitives::rsix::linux::fs::open_impl::open_beneath::h3811b95d26505c84+312)
#03 pc 0000000002e8a800 ourapp.so (cap_primitives::rsix::linux::fs::open_impl::open_impl::h725b24260261d337+40)
...
Looking back up into cap-std, it seems that the detection method for presence of openat2 is inadequate, because instead of simply returning ENOSYS as the linked code assumes, Android forcibly kills the process with a SIGSYS signal.
Thanks for the report! I've now filed #197 which implements a kernel version check, which may fix the problem. I don't have an Android device to test it on though. Would you be able to test this fix?
I'm trying to run some code that uses cap-std on Android 10 (on a kernel that definitely does not support the syscall), and I hit the following crash in
openat2
, called byopen_beneath
fromopen_impl
:Looking back up into cap-std, it seems that the detection method for presence of
openat2
is inadequate, because instead of simply returning ENOSYS as the linked code assumes, Android forcibly kills the process with a SIGSYS signal.cap-std/cap-primitives/src/rsix/linux/fs/open_impl.rs
Line 103 in 6f38d0a
So there needs to be some sort of kernel version check instead I guess?
The text was updated successfully, but these errors were encountered: