about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorTheofilos Augoustis <theofilos.augoustis@gmail.com>2025-11-27 12:42:50 +0000
committerTheofilos Augoustis <theofilos.augoustis@gmail.com>2025-11-27 12:50:34 +0000
commit50df08ea3956cba98180dc4c4ec12273d428caf5 (patch)
tree6e7303a46e2af30d4e50b14d5ab49efb2f3b9a45
parenta90577fea7c76d53090b165a3f9e03e4603cc5a5 (diff)
downloadfocaccia-50df08ea3956cba98180dc4c4ec12273d428caf5.tar.gz
focaccia-50df08ea3956cba98180dc4c4ec12273d428caf5.zip
Add support for *at variants of common system calls and pselect6
-rw-r--r--src/focaccia/qemu/x86.py19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/focaccia/qemu/x86.py b/src/focaccia/qemu/x86.py
index 6f5bc99..a77a52c 100644
--- a/src/focaccia/qemu/x86.py
+++ b/src/focaccia/qemu/x86.py
@@ -24,6 +24,7 @@ emulated_system_calls = {
     20: SyscallInfo('writev'),
     21: SyscallInfo('access'),
     22: SyscallInfo('pipe', patchup_address_registers=['rdi']),
+    23: SyscallInfo('select', patchup_address_registers=['rsi', 'rdx', 'r10', 'r8']),
     24: SyscallInfo('sched_yield'),
     32: SyscallInfo('dup'),
     33: SyscallInfo('dup2'),
@@ -100,6 +101,21 @@ emulated_system_calls = {
     219: SyscallInfo('restart_syscall'),
     232: SyscallInfo('epoll_wait', patchup_address_registers=['rsi']),
     233: SyscallInfo('epoll_ctl', patchup_address_registers=['r10']),
+    257: SyscallInfo('openat'),
+    258: SyscallInfo('mkdirat'),
+    259: SyscallInfo('mknodat'),
+    260: SyscallInfo('fchownat'),
+    261: SyscallInfo('futimesat', patchup_address_registers=['rdxi']),
+    262: SyscallInfo('newfstatat', patchup_address_registers=['rsi']),
+    263: SyscallInfo('unlinkat'),
+    264: SyscallInfo('renameat'),
+    265: SyscallInfo('linkat'),
+    266: SyscallInfo('symlinkat'),
+    267: SyscallInfo('readlinkat', patchup_address_registers=['rdx']),
+    268: SyscallInfo('fchmodat'),
+    269: SyscallInfo('faccessat'),
+    270: SyscallInfo('pselect6', patchup_address_registers=['rsi', 'rdx', 'r10', 'r8', 'r9']),
+    271: SyscallInfo('ppoll', patchup_address_registers=['rdi']),
     281: SyscallInfo('epoll_pwait', patchup_address_registers=['rsi', 'r8']),
     284: SyscallInfo('eventfd'),
     288: SyscallInfo('accept4', patchup_address_registers=['rsi', 'rdx']),
@@ -109,6 +125,9 @@ emulated_system_calls = {
     293: SyscallInfo('pipe2', patchup_address_registers=['rdi']),
     297: SyscallInfo('rt_tgsigqueueinfo', patchup_address_registers=['r10']),
     302: SyscallInfo('prlimit64', patchup_address_registers=['r10']),
+    303: SyscallInfo('name_to_handle_at', patchup_address_registers=['rdx', 'r10']),
+    304: SyscallInfo('open_by_handle_at', patchup_address_registers=['rsi']),
+    316: SyscallInfo('renameat2'),
     318: SyscallInfo('getrandom', patchup_address_registers=['rdi'])
 }