about summary refs log tree commit diff stats
path: root/src/emu
diff options
context:
space:
mode:
authorptitSeb <sebastien.chev@gmail.com>2022-12-30 15:51:57 +0100
committerptitSeb <sebastien.chev@gmail.com>2022-12-30 15:51:57 +0100
commitc821fd938c26348165844653868b986ca37c1c2a (patch)
treee56436c10187f909d7235cd980cf482f8d2ac627 /src/emu
parent977caba4cac60f40edf867f0f353ce78625d83e2 (diff)
downloadbox64-c821fd938c26348165844653868b986ca37c1c2a.tar.gz
box64-c821fd938c26348165844653868b986ca37c1c2a.zip
Disable SECCOMP and added a bunch of wrapped function (partially fixed Heroic launcher)
Diffstat (limited to 'src/emu')
-rwxr-xr-xsrc/emu/x64syscall.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/emu/x64syscall.c b/src/emu/x64syscall.c
index 65e30bbe..9ef54b46 100755
--- a/src/emu/x64syscall.c
+++ b/src/emu/x64syscall.c
@@ -235,7 +235,7 @@ scwrap_t syscallwrap[] = {
     { 302, __NR_prlimit64, 4},
     { 309, __NR_getcpu, 3}, // need wrapping?
     { 315, __NR_sched_getattr, 4},
-    { 317, __NR_seccomp, 3},
+    //{ 317, __NR_seccomp, 3},
     { 318, __NR_getrandom, 3},
     { 319, __NR_memfd_create, 2},
     { 324, __NR_membarrier, 2},
@@ -697,6 +697,9 @@ void EXPORT x64Syscall(x64emu_t *emu)
                 R_RAX = (uint64_t)-errno;
             break;
         #endif
+        case 317:   // sys_seccomp
+            R_RAX = 0;  // ignoring call
+            break;
         case 334: // It is helpeful to run static binary
             R_RAX = -ENOSYS;
             break;
@@ -941,6 +944,8 @@ uintptr_t EXPORT my_syscall(x64emu_t *emu)
             return (uint64_t)(int64_t)my_epoll_pwait(emu, (int)R_ESI, (void*)R_RDX, (int)R_ECX, (int)R_R8d, (void*)R_R9);
             break;
         #endif
+        case 317:   // sys_seccomp
+            return 0;  // ignoring call
         #ifndef __NR_fchmodat4
         case 434:
             return (int)fchmodat((int)R_ESI, (void*)R_RDX, (mode_t)R_RCX, (int)R_R8d);