You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
998 B
24 lines
998 B
Termux: Stub out some syscalls
|
|
|
|
These syscalls are either blacklisted in Android's seccomp policy, or simply
|
|
not implemented by the running kernel (android kernels lag behind quite a bit!).
|
|
|
|
Whichever of the two it is, calling any of these results in the process being
|
|
killed with SIGSYS, usually killing the entire process. To prevent this, we
|
|
stub them with an ENOSYS result, pretending they aren't implemented.
|
|
|
|
--- glibc-2.36.orig/sysdeps/unix/sysv/linux/aarch64/sysdep.h
|
|
+++ glibc-2.36/sysdeps/unix/sysv/linux/aarch64/sysdep.h
|
|
@@ -167,7 +167,11 @@
|
|
# undef INTERNAL_SYSCALL_RAW
|
|
# define INTERNAL_SYSCALL_RAW(name, nr, args...) \
|
|
({ long _sys_result; \
|
|
- { \
|
|
+ switch (name) { \
|
|
+ case SYS_ify(set_robust_list): \
|
|
+ case SYS_ify(rseq): \
|
|
+ case SYS_ify(faccessat2): \
|
|
+ _sys_result = -ENOSYS; break; default: \
|
|
LOAD_ARGS_##nr (args) \
|
|
register long _x8 asm ("x8") = (name); \
|
|
asm volatile ("svc 0 // syscall " # name \
|
|
|