Compare commits

...
277 Commits
Author SHA1 Message Date
Ole André Vadla Ravnås e0ada4a9ff [WIP] Toy around with a potential Softwall feature 2026-02-12 23:13:19 +01:00
Ole André Vadla Ravnås 690d7005fa syscall-tracer: Capture more structured args
Log non-primitive in/out syscall arguments for a broader set of calls.

This extends the eBPF tracer to attach common structured arguments
(strings, paths, timespec/stat buffers, and socket addresses) on enter
and exit, including multi-argument cases like two-path operations and
mount(2) (source/target/fstype).

Userspace decoding is now guided by syscall signature arg types (e.g.
only attempt sockaddr parsing for "struct sockaddr *"), reducing
per-syscall special-casing.
2026-02-12 20:44:54 +01:00
Ole André Vadla Ravnås b68585027b syscall-tracer: Expose ABI and track file mappings
Also clamp arguments based on signatures.
2026-02-12 15:54:04 +01:00
Ole André Vadla Ravnås eb457fddba meson: Add libbpf to the toplevel deps and reqs 2026-02-12 14:18:06 +01:00
Ole André Vadla Ravnås e9c1ead852 linux: Omit trailing newline from eBPF kernel log 2026-02-09 22:21:24 +01:00
Ole André Vadla Ravnås e2826c9d38 subprojects: Bump outdated 2026-02-07 21:19:39 +01:00
Ole André Vadla Ravnås 66c517b76a linux: Fix syscall-trace signatures response 2026-02-07 21:15:07 +01:00
Ole André Vadla Ravnås 3b05c631f9 linux: Migrate to libbpf
So we can start using BTF relocations, for true CO-RE.
2026-02-07 21:12:48 +01:00
Ole André Vadla Ravnås 3ae919fb97 api: Fix .gir filtering
Apparently AgentMessageSink either ends up in Frida or FridaBase,
depending on the build environment. Hmm. Rabbit hole for another day.
2026-02-07 13:34:16 +01:00
Ole André Vadla Ravnås bbe4872c73 Revert "api: Fix a .gir filtering regression"
Makes no sense that this would change namespace.

This reverts commit 01665c9e1a.
2026-02-06 23:35:27 +01:00
Ole André Vadla Ravnås f114e92502 linux: Add SyscallTracer and ActivitySampler
Only SyscallTracer is exposed for now. It is exposed as a Service.
2026-02-06 14:00:48 +01:00
Ole André Vadla Ravnås de03a755b1 linux: Add API for retrieving syscall signatures 2026-02-06 14:00:41 +01:00
Ole André Vadla Ravnås b62d5f9f83 linux: Add Bpf.PercpuArrayMap.foreach_value() 2026-01-29 16:46:05 +01:00
Ole André Vadla Ravnås 67d9423e90 icons: Use uint16 for width and height
Both as it makes more sense than int64, and so these don't end up as
BigInt values in frida-node.
2026-01-29 12:13:00 +01:00
Ole André Vadla Ravnås 06a28acc76 macos: Omit width and height for PNG icons 2026-01-29 12:12:52 +01:00
Ole André Vadla Ravnås 144ec84483 api: Omit the new Bpf.RingbufReader enum names 2026-01-28 23:29:31 +01:00
Ole André Vadla Ravnås 623531a385 linux: Improve the Bpf.RingbufReader.drain() API
- Let the caller know whether it got fully drained.
- Rename DrainResult to RecordAction.
2026-01-28 22:20:46 +01:00
Ole André Vadla Ravnås f365831c05 droidy: Support consuming remote services 2026-01-27 15:24:09 +01:00
Ole André Vadla Ravnås e5efd8ba89 local-host-session: Support implementing services 2026-01-27 15:24:09 +01:00
Ole André Vadla Ravnås 01665c9e1a api: Fix a .gir filtering regression
Due to AgentMessageSink now being in the Frida namespace.
2026-01-27 15:23:34 +01:00
Ole André Vadla Ravnås 944c7acaec api: Omit the internal DrainResult enum 2026-01-27 14:42:42 +01:00
Ole André Vadla Ravnås 9a3ee39e78 linux: Add Bpf.RingbufReader drain stop support 2026-01-27 13:59:02 +01:00
Ole André Vadla Ravnås 97cf8dc68d linux: Add Bpf.HashMap.remove() 2026-01-27 13:58:57 +01:00
Ole André Vadla Ravnås 09cab2e08c linux: Fix some stylistic inconsistencies 2026-01-27 13:58:50 +01:00
Ole André Vadla RavnåsandHåvard Sørbø e4372b42f3 linux-syscalls: Emit .h with preprocessor defines
Instead of enum values. In this way we can check for syscall
availability at the preprocessor level.

Co-authored-by: Håvard Sørbø <[email protected]>
2026-01-26 19:30:25 +01:00
Ole André Vadla RavnåsandHåvard Sørbø 52b93ce299 linux: Add Bpf.HashMap
Co-authored-by: Håvard Sørbø <[email protected]>
2026-01-26 19:30:19 +01:00
Ole André Vadla Ravnås 58d3bd1251 linux-syscalls: Support --abi=armbe 2026-01-26 17:49:45 +01:00
Ole André Vadla Ravnås c4c101972e linux-syscalls: Refactor generate-bindings.py
To remove an unused function and fix a stylistic inconsistency.
2026-01-26 17:49:41 +01:00
Ole André Vadla Ravnås 8463e7514f linux: Improve the Bpf.RingbufReader API 2026-01-26 17:49:34 +01:00
Ole André Vadla Ravnås dd06ba6c54 linux: Improve the Bpf.StackTraceMap API 2026-01-26 17:49:29 +01:00
Ole André Vadla Ravnås 542c7a4014 linux: Add Bpf.PercpuArrayMap 2026-01-26 17:49:24 +01:00
Ole André Vadla Ravnås ea16ec8ea7 linux: Improve eBPF relocation error message 2026-01-26 17:49:20 +01:00
Ole André Vadla Ravnås d7a866af47 linux: Re-organize helper artifacts 2026-01-26 01:49:43 +01:00
Ole André Vadla Ravnås 3686e0e5c3 base: Improve the linux-syscalls autogen
- Move capabilities logic into the generator.
- Support C header output.
- Support remaining ABIs.
2026-01-26 01:48:32 +01:00
Ole André Vadla Ravnås 9d91e52490 base: Add auto-generated LinuxSyscall enum 2026-01-25 21:50:26 +01:00
Ole André Vadla Ravnås f055550e38 linux: Add eBPF and perf_event_open() helpers 2026-01-25 01:03:32 +01:00
Ole André Vadla Ravnås 8c62357b94 subprojects: Prepare for release 2026-01-23 22:31:22 +01:00
Ole André Vadla Ravnås af43551888 subprojects: Bump outdated 2026-01-23 22:30:22 +01:00
Francesco Tamagni f332bddbfc fruity: Fix PortableCoreDevice flush infinite loop (#1207)
By reviving the call to `handle_events_completed` during FLUSHING state,
so that `pending_usb_ops` can get emptied eventually.
2026-01-23 22:29:05 +01:00
NSEcho e1bb883ba0 compiler: Rename conflictful Go symbols (#1205) 2026-01-23 12:40:11 +01:00
Ole André Vadla Ravnås a341cd1292 compiler: Load backend through memfd with fallback
So we retain the benefits of avoiding temporary files when possible.
2026-01-22 15:18:48 +01:00
Ole André Vadla Ravnås 70881a4e40 linux: Fix system session when memfd is restricted
Observed to happen in the Termux environment on Android.
2026-01-22 14:31:19 +01:00
Ole André Vadla Ravnås e0cae3fded subprojects: Prepare for release 2026-01-20 23:12:46 +01:00
Ole André Vadla Ravnås ff28ff33d9 subprojects: Bump outdated 2026-01-20 23:09:17 +01:00
Ole André Vadla Ravnås d072d48dfa subprojects: Bump outdated 2026-01-20 20:26:34 +01:00
Ole André Vadla Ravnås d8557b2c86 submodules: Bump releng 2026-01-20 20:26:34 +01:00
Ole André Vadla Ravnås de8a63b1f3 subprojects: Bump outdated 2026-01-20 18:54:21 +01:00
Ole André Vadla Ravnås 0f53d1b2ee submodules: Bump releng 2026-01-20 18:54:20 +01:00
Ole André Vadla Ravnås a638218794 compiler: Fix loading of backend on Android
The memfd path would typically fail because we were trying to open the
same underlying file with more restrictive permissions.

Avoid this and simplify things by using a temporary file even on systems
where memfd is supported.
2026-01-20 18:48:41 +01:00
Ole André Vadla Ravnås 5ea6e8507a file-descriptor: Add pwrite_all() 2026-01-20 18:45:16 +01:00
Ole André Vadla Ravnås 0ef2a0859b file-descriptor: Fix a stylistic inconsistency 2026-01-20 18:45:06 +01:00
Ole André Vadla Ravnås 01af5b3041 android: Place zymbiote payload on a better range
Picking a range not used by Zygote. The forked app/service might use it,
but by then we will have reverted it.
2026-01-20 13:02:54 +01:00
Ole André Vadla RavnåsandHåvard Sørbø 3df3834f17 android: Fix zymbiote payload on BTI systems
The zymbiote payload must be built with BTI enabled on arm64, otherwise
indirect branches into it will fault.

Co-authored-by: Håvard Sørbø <[email protected]>
2026-01-20 01:12:56 +01:00
Ole André Vadla RavnåsandHåvard Sørbø 31d11965e0 linux: Fix alignment in the helper linker script
Ensure .payload is 4 KiB–aligned to match ADRP page semantics on arm64.

Co-authored-by: Håvard Sørbø <[email protected]>
2026-01-20 01:10:06 +01:00
Ole André Vadla Ravnås 2e705e3f44 subprojects: Prepare for release 2026-01-17 08:43:29 +01:00
Ole André Vadla Ravnås 13c3e00be3 subprojects: Bump outdated 2026-01-17 00:24:19 +01:00
Ole André Vadla Ravnås 90164ccf7a subprojects: Bump outdated 2026-01-16 15:31:46 +01:00
Ole André Vadla Ravnås 3f9159e80a libc-shim: Revive FreeBSD support 2026-01-16 12:58:13 +00:00
Ole André Vadla Ravnås d4ca46a213 subprojects: Bump outdated 2026-01-16 13:44:36 +01:00
Ole André Vadla Ravnås 126ab29dce submodules: Bump releng 2026-01-16 13:44:36 +01:00
Ole André Vadla Ravnås 5104b0d08e libc-shim: Fix portability regressions
- Make stdio handling compatible with musl by treating FILE as
  opaque and fixing stdin/stdout/stderr definitions.
- Improve Linux compatibility.
- Add Darwin dirent shim.
- Fix MSVC support.
2026-01-16 13:34:11 +01:00
Ole André Vadla Ravnås 55c8bcb8ec fruity: Fix USB startup/shutdown race
Fix a race where stopping shortly after startup could leave the USB
worker blocked inside libusb_handle_events_completed().

Restructure the USB event loop to observe state transitions before
entering blocking libusb calls, ensuring FLUSHING and STOPPING are
handled deterministically.

Make initial USB enumeration during startup robust by gating completion
on a startup barrier and tracking in-flight arrivals, deduplicated by
device ID. This accounts for libusb HOTPLUG_ENUMERATE semantics where
arrival callbacks may be duplicated or delayed.

Together these changes ensure startup only completes once all initially
present devices are known, and shutdown cannot deadlock the USB thread.
2026-01-16 10:47:21 +01:00
Ole André Vadla Ravnås 4fbfae9b92 subprojects: Bump outdated 2026-01-15 18:07:56 +01:00
Ole André Vadla Ravnås 4d1e9f1113 submodules: Bump releng 2026-01-15 18:07:56 +01:00
Ole André Vadla RavnåsandHåvard Sørbø 3e778a99c0 android: Move to light-weight Zygote hooking
Instead of injecting an internal agent into the Zygote/USAP processes
and using child gating, rethink this completely:

1. Write a tiny payload into a code region through /proc/$pid/mem.
2. Patch the ArtMethod of android.os.Process.setArgV0Native() so it
   jumps to the payload.
3. The payload acts as a proxy, chaining to the original setArgV0Native.
4. It also makes a UNIX socket connection back to frida-core, giving it
   a chance to instrument it.

Co-authored-by: Håvard Sørbø <[email protected]>
2026-01-15 18:06:05 +01:00
Ole André Vadla Ravnås 2d2a944d8e file-descriptor: Add pread{,_all}() and pwrite() 2026-01-15 18:06:00 +01:00
Ole André Vadla Ravnås 0ba8b05fef linux: Fix the WaitResult constructor
Early returns from a struct constructor results in the Vala compiler
generating invalid C code. We'll just avoid this pattern for now.
2026-01-15 18:05:56 +01:00
Ole André Vadla Ravnås 783626e8fb android: Ignore noisy frida-helper.dex warnings
Coming from the dynamic linker on older Android OSes.
2026-01-15 12:53:39 +01:00
Ole André Vadla Ravnås 7399cc1092 android: Improve frida-helper.dex Android compat
- Support Android OS versions as far back as 4.4.
- Improve get_frontmost_application() to support a wider range of
  versions, not just Android >= 10.
2026-01-15 12:53:34 +01:00
Ole André Vadla Ravnås cefa0d0567 libc-shim: Improve stylistic consistency 2026-01-15 12:02:13 +01:00
Ole André Vadla Ravnås 0824ee85d9 libc-shim: Fix Android SELinux getline() UB
Fix a long-standing heap corruption/UB on Android caused by the SELinux
userspace library running a constructor that calls getline() and then
free().

Only free() went through our libc shim, while getline() allocated using
libc's heap, so the pointer was freed by the wrong allocator.

Add a minimal stdio shim (including getline()/getdelim()) and related
FILE*/__sF handling so allocations stay on the shim heap and are cleaned
up correctly.
2026-01-15 01:24:32 +01:00
Ole André Vadla Ravnås bea37618d1 android: Fix app spawn() on older Android versions 2026-01-13 22:45:36 +01:00
Ole André Vadla Ravnås cae7be99f8 meson: Fix Android dirty build from backend output 2026-01-11 14:21:56 +01:00
Ole André Vadla Ravnås 4406c8d146 android: Unlink frida-helper.dex on early error 2026-01-11 14:21:56 +01:00
Ole André Vadla Ravnås c89190e4f6 android: Explicitly set frida-helper.dex file mode 2026-01-11 14:21:56 +01:00
Ole André Vadla Ravnås dd68e84217 android: Improve frida-helper.dex spawn logic
- Include stderr and logcat output when unable to spawn.
- Process stdout and stderr. There shouldn't be any output on either,
  so if there is we definitely want to see it. This also makes it easier
  to add temporary logging to the helper.
2026-01-11 14:21:56 +01:00
Ole André Vadla Ravnås dc56b2eb16 subprojects: Bump outdated 2026-01-11 00:48:04 +01:00
Ole André Vadla Ravnås 1b908e69f3 android: Migrate to frida-helper.dex
Previously this helper was only used on non-rooted systems.
We now use it universally, which lets us stop injecting code
into system_server and drop the dependency on frida-java-bridge.

The only functionality lost is launch-timeout suppression.
2026-01-11 00:14:55 +01:00
Ole André Vadla Ravnås fae32353e1 linux: Fix ptrace signal waiter forwarding
Signal wait helpers could incorrectly forward ptrace-internal stops
(e.g. event SIGTRAPs) or syscall-stops back into the tracee while
waiting for a specific signal. This can perturb execution and break
spawn/attach flows.

Use WaitResult.should_deliver_to_tracee to gate signal reinjection.
Waiters now always satisfy the requested stop first, and only pass
through unmatched stops when they represent a real deliverable
signal.
2026-01-08 14:08:01 +01:00
Ole André Vadla Ravnås babe40274f linux: Fix ptrace syscall tracing desync
Syscall tracing could become desynchronized when the tracee stopped for
non-syscall reasons (e.g. PTRACE_EVENT_EXEC or real signals). These
SIGTRAP stops were incorrectly treated as syscall entry/exit points,
leading to bogus syscall IDs and eventual timeouts.

Fix this by decoding the raw waitpid() status into a structured
WaitResult, distinguishing syscall-stops, ptrace event stops, and real
signal stops. The syscall entry/exit phase is now advanced only on true
syscall-stops, and ptrace-internal traps are no longer reinjected into
the tracee.
2026-01-08 13:42:14 +01:00
Ole André Vadla Ravnås d19036305d subprojects: Bump outdated 2026-01-06 22:40:20 +01:00
Ole André Vadla Ravnås 1572fb6594 submodules: Bump releng 2026-01-06 22:40:19 +01:00
wyxhjr 747a9cd172 Add preliminary support for RISC-V (#1201) 2026-01-06 20:06:58 +01:00
Francesco Tamagni 8ff3a58612 fruity: Throw CLOSED on tcp write in closed state
In this way the stream stops being polled and an infinite loop is
avoided.
2026-01-06 20:03:50 +01:00
Ole André Vadla Ravnås bcd4a3d586 subprojects: Prepare for release 2025-12-15 21:28:35 +01:00
Ole André Vadla Ravnås 9937b40032 subprojects: Bump outdated 2025-12-15 21:16:49 +01:00
Ole André Vadla Ravnås 81299af1ef darwin: Use DO_NOT_REAP_CHILD when spawning helper
When the system is booted without -arm64e_preview_abi, the helper
binary is killed very early during startup. Enabling
DO_NOT_REAP_CHILD allows GLib to use posix_spawn(), insulating the
host process from signal-related side effects during helper launch.

This means the child process is no longer reaped automatically.
Since this code may run inside a host process that installs its own
signal handlers, GLib's child-watch support cannot be used. Instead,
the helper is reaped explicitly using non-blocking polling.
2025-12-15 17:54:19 +01:00
Ole André Vadla Ravnås f76a3315e7 submodules: Bump releng 2025-12-15 15:06:33 +01:00
Ole André Vadla Ravnås f5c01842c9 meson: Avoid repeating the GLib requirement 2025-12-15 15:05:40 +01:00
Ole André Vadla Ravnås 40879413c0 meson: Remove the unused frida_profile variable 2025-12-15 12:43:25 +01:00
Ole André Vadla Ravnås ab4a7f43f6 meson: Update version logic to support snapshot tags 2025-12-15 12:31:16 +01:00
Ole André Vadla Ravnås 8ed4a69e03 meson: Restore support for GLib being a subproject
Which was broken when gio-unix-2.0 became part of the public API on
non-Windows systems.
2025-12-15 12:09:12 +01:00
Ole André Vadla Ravnås d93557625d ci: Move xcframework .modulemap inside a subdir
To avoid clashes when an app links with multiple static frameworks, each
with their own modulemap.
2025-12-11 15:12:50 +01:00
Ole André Vadla Ravnås 7ecebf23b1 ci: Remove snapshot-tag.yml
Actually triggering ci.yml seems like a rabbit-hole. Leaving for later.
2025-12-08 23:48:06 +01:00
Ole André Vadla Ravnås e2b4b120d7 ci: Add modulemap to xcframework for FridaCore
Add a Clang module.modulemap to each header slice in the generated
FridaCore.xcframework so SwiftPM can load the FridaCore C module.
2025-12-08 23:44:34 +01:00
Ole André Vadla Ravnås e1cb645805 ci: Fix some stylistic inconsistencies 2025-12-08 23:43:35 +01:00
Ole André Vadla Ravnås a0ea09d4d6 ci: Improve snapshot-tag.yml so it triggers ci.yml 2025-12-08 22:46:53 +01:00
Ole André Vadla Ravnås 0f32cc8f4e darwin: Emit 128px app icons on macOS
Instead of two small sizes, we'll emit just one larger one.
2025-12-08 22:29:15 +01:00
Ole André Vadla Ravnås 46a566655f submodules: Bump releng 2025-12-08 22:21:08 +01:00
Ole André Vadla Ravnås 690597f908 ci: Add workflow for automated snapshot tagging 2025-12-08 22:21:08 +01:00
Ole André Vadla Ravnås 0c49c7ee62 ci: Publish releases with .xcframework 2025-12-08 22:21:08 +01:00
Ole André Vadla Ravnås ce40c30a20 ci: Build and upload .xcframework artifact 2025-12-08 22:21:08 +01:00
Ole André Vadla Ravnås 3bb44c222a ci: Add ios-arm64-simulator to the mobile matrix 2025-12-08 22:21:07 +01:00
Ole André Vadla Ravnås 5ec73cab32 ci: Temporarily disable mobile tests
As the backend infrastructure needs some love.
2025-12-08 18:05:39 +01:00
Ole André Vadla Ravnås 257f198659 ci: Fix the emulator job 2025-12-08 18:05:39 +01:00
Ole André Vadla Ravnås 5fca68ebe0 ci: Fix the macOS/x86_64 job
As --host was omitted, we ended up building for macOS/arm64.
2025-12-08 18:05:39 +01:00
Ole André Vadla Ravnås 9eab4f8975 linux: Add missing Gum #include
Which only worked in the past due to luck, i.e. some unrelated code
including it.
2025-11-12 13:18:00 +00:00
Ole André Vadla Ravnås afd8c8789f subprojects: Prepare for release 2025-11-05 18:59:04 +01:00
Ole André Vadla Ravnås cfd5a730e4 subprojects: Bump outdated 2025-11-05 18:57:16 +01:00
Ole André Vadla Ravnås 3f411908e7 subprojects: Prepare for release 2025-11-04 10:30:52 +01:00
Ole André Vadla Ravnås 4e44f4d243 subprojects: Bump outdated 2025-11-04 10:29:26 +01:00
Leo Conforti 9573f1aa22 compiler: Add platform and externals options
Introduce a platform property and externals API to CompilerOptions, and
plumb them through to the Go backend. The backend maps the platform to an
esbuild platform and passes externals to esbuild for exclusion from the
bundle.
2025-11-04 09:52:09 +01:00
Ole André Vadla RavnåsandHåvard Sørbø 79a08e4767 simmy: Wire up spawn() argv and env options
Though `argv` was already wired up for the program case, we didn't wire
it up for the app case.

Co-authored-by: Håvard Sørbø <[email protected]>
2025-11-03 19:30:56 +01:00
Ole André Vadla Ravnås 57dfe9d5ad subprojects: Prepare for release 2025-11-01 00:38:11 +01:00
Ole André Vadla Ravnås 347662b45b subprojects: Bump outdated 2025-11-01 00:36:24 +01:00
Ole André Vadla Ravnås cc95375136 darwin: Revive app listing/launching on iOS >= 16
When running on rootful systems. This brings dccb612 back to life.
It was broken in 8108d4d, which fixed two Interceptor singleton leaks.
Turns out the one in springboard.m was intentional, as it was done as
part of init-once logic, with no teardown intended. And since nothing
else uses Interceptor in this case, the instrumentation we just
applied gets reverted right away.

Kudo to @alexhude for reporting.
2025-11-01 00:23:17 +01:00
Ole André Vadla Ravnås 329c4075d0 subprojects: Prepare for release 2025-10-31 20:24:06 +01:00
Ole André Vadla Ravnås c4198498d5 subprojects: Bump outdated 2025-10-31 20:21:36 +01:00
Ole André Vadla Ravnås 20ef7bb318 simmy: Degrade functionality when SIP is enabled
As get_frontmost_application() and icons rely on being able to inject
our internal agent into SpringBoard.

Down the road we might be able to reimplement this functionality as a
helper program that we spawn inside the Simulator runtime. The uncertain
part is whether we'll be able to give that program the appropriate
entitlements.
2025-10-31 20:09:20 +01:00
Ole André Vadla RavnåsandHåvard Sørbø 367f8cf22b simmy: Handle app enumeration with selected IDs
Co-authored-by: Håvard Sørbø <[email protected]>
2025-10-30 14:58:35 +01:00
Ole André Vadla Ravnås 9f04675b87 subprojects: Prepare for release 2025-10-29 16:47:53 +01:00
Ole André Vadla Ravnås cd8bda0513 subprojects: Bump outdated 2025-10-29 16:45:40 +01:00
Ole André Vadla RavnåsandHåvard Sørbø e09e09fb85 simmy: Wire up application icons
Co-authored-by: Håvard Sørbø <[email protected]>
2025-10-29 15:08:50 +01:00
Ole André Vadla RavnåsandHåvard Sørbø c24a5da82c simmy: Implement get_frontmost_application()
Co-authored-by: Håvard Sørbø <[email protected]>
2025-10-29 15:01:15 +01:00
Ole André Vadla RavnåsandHåvard Sørbø 05ec6563d1 internal-agent: Support non-local HostSession
So we can use it in the Simmy backend, too.

Co-authored-by: Håvard Sørbø <[email protected]>
2025-10-28 14:12:01 +01:00
Ole André Vadla RavnåsandHåvard Sørbø 9dc9d30fa4 simmy: Fix the reported hardware.product
In query_system_parameters().

So it's e.g. `iPhone18,2` instead of `iPhone 17 Pro Max`.

Co-authored-by: Håvard Sørbø <[email protected]>
2025-10-28 13:15:38 +01:00
Ole André Vadla Ravnås 0b57936285 subprojects: Prepare for release 2025-10-24 15:25:15 +02:00
Ole André Vadla Ravnås 41be857a91 subprojects: Bump outdated 2025-10-24 15:23:37 +02:00
Ole André Vadla Ravnås afa847b898 submodules: Bump releng 2025-10-24 15:23:37 +02:00
Ole André Vadla Ravnås 3e43478de0 android: Bump frida-java-bridge in system-server 2025-10-24 15:22:18 +02:00
Ole André Vadla Ravnås a847a012c9 freebsd: Wire up PTY support 2025-10-12 08:11:13 +02:00
Ole André Vadla Ravnås c34fad1ff0 freebsd: Port remaining bits to the new stdio API 2025-10-12 07:50:00 +02:00
Ole André Vadla Ravnås ceef1d696b darwin: Fix a stylistic inconsistency 2025-10-12 07:47:09 +02:00
Ole André Vadla Ravnås d0cfe69dba subprojects: Prepare for release 2025-10-11 19:22:49 +02:00
Ole André Vadla Ravnås a35aff1865 api: Exclude HostSessionHub from .gir
As it's an internal interface.
2025-10-11 11:46:28 +02:00
Ole André Vadla Ravnås be8a59607a android: Bump frida-java-bridge in system-server 2025-10-11 11:07:51 +02:00
Ole André Vadla Ravnås 726740f96a simmy: Move to CoreSimulator.framework 2025-10-10 12:34:41 +02:00
Ole André Vadla Ravnås 9e11d57a76 Add new Simmy backend
For interacting with Apple's simulators on macOS.
2025-10-10 12:34:41 +02:00
Ole André Vadla Ravnås d8c3c9bfb5 darwin: Support early instrumentation of dyld_sim 2025-10-10 12:34:41 +02:00
Ole André Vadla Ravnås 2720968791 base: Add StdioPipes and FileDescriptor helpers
Factored out of the Darwin and Linux backends.
2025-10-10 12:34:41 +02:00
Ole André Vadla Ravnås b8998e52cd host-session: Support cross-backend communication 2025-10-10 12:34:41 +02:00
Ole André Vadla Ravnås c23f046968 value: Add VariantReader.list_members() 2025-10-10 12:34:41 +02:00
Francesco Tamagni 2d521bbeb7 fruity: Unpair on InvalidHostID
So the error doesn't become persistent, and the
device can be paired again.
2025-10-07 11:37:57 +02:00
Ole André Vadla Ravnås cdae790ba9 darwin: Port to the latest Gum.Darwin API 2025-10-01 10:52:33 +02:00
Ole André Vadla Ravnås 90d2d93799 subprojects: Bump outdated 2025-10-01 10:49:57 +02:00
Ole André Vadla Ravnås 61ad9a0f9f subprojects: Prepare for release 2025-09-19 17:16:18 +02:00
Ole André Vadla Ravnås 48af36f4d1 subprojects: Bump outdated 2025-09-19 17:14:21 +02:00
Ole André Vadla Ravnås 053b34c5fd ncm: Speed up TX packing with fixed-slot NDP
Switch to a fixed-slot NDP layout to eliminate the slow O(k²) "shrink
until it fits" algorithm. The new packer runs in O(k) time and stops
adding datagrams when the NTB max size would be exceeded.

This greatly reduces CPU time spent building NTBs, dropping total layout
time from ~1.1s to negligible levels for a 256 MiB transfer on a modern
desktop.
2025-09-19 17:01:32 +02:00
Ole André Vadla Ravnås 010d5ee500 ncm: Improve TX scheduling to keep USB pipe full
Rework host->device transfer logic to remove the single `writing` gate
as a throughput bottleneck. Manage OUT transfers with a rolling window
and refill as soon as any transfer completes instead of waiting for all
in-flight transfers to finish.

Reduce idle gaps between URBs and keep the USB bulk pipe continuously
fed, improving HS throughput from ~29 MB/s to ~34 MB/s in testing.
Maintain bounded memory usage via transfer and byte window limits.
2025-09-19 17:01:32 +02:00
Ole André Vadla Ravnås 2fa39e28ed fruity: Optimize datagram handling
Deliver datagrams in batches when we can, to make cross-thread delivery
more deterministic.
2025-09-19 16:58:32 +02:00
Ole André Vadla Ravnås 250dc83016 subprojects: Prepare for release 2025-09-18 07:39:38 +02:00
Ole André Vadla Ravnås eec4fc0883 subprojects: Bump outdated 2025-09-17 22:10:20 +02:00
Ole André Vadla Ravnås 4535e3dfd4 submodules: Bump releng 2025-09-17 22:10:20 +02:00
Ole André Vadla Ravnås 01203eab3b meson: Remove lwIP TCP options
The defaults are now tuned to our use-case, so we can avoid duplicating
those in two different places.
2025-09-17 13:56:33 +02:00
Ole André Vadla Ravnås a43311da90 subprojects: Prepare for release 2025-09-15 22:57:00 +02:00
Ole André Vadla Ravnås 204e0ed565 barebone: Move non-Windows-only bits behind #if
To fix warning regressions on Windows.
2025-09-15 22:09:32 +02:00
Ole André Vadla Ravnås 8fe7c13c27 meson: Ensure lzfse ends up in .pc
To fix linking in static consumers when the Barebone backend is enabled.
2025-09-15 22:08:45 +02:00
vinaykumar🍁 123ea7c004 fruity: Fall back to usbmux when tunnel times out
And other such network-/transport-errors.
2025-09-15 21:39:33 +02:00
Ole André Vadla Ravnås 3968ac635b subprojects: Bump outdated 2025-09-11 10:31:54 +02:00
Håvard Sørbø bc8c7cde1b fruity: Handle CoreDevice pairing events
Our request_pairing_data() was previously assuming request/response
semantics, which is incorrect.
2025-09-11 10:19:22 +02:00
Håvard Sørbø 7c3b4e900c fruity: Match pairing request/response using FIFO
Instead of using the sequence number.
2025-09-11 10:19:22 +02:00
Francesco Tamagni bf7558197c fruity: Handle edge cases on teardown 2025-09-11 09:01:11 +02:00
Ole André Vadla RavnåsandHåvard Sørbø e95fea688b barebone: Add basic support for XNU injection
Tested on iOS 14.0 running in QEMU. For now this depends on my
micro-fork of QEMUAppleSilicon, which adds the hostlink device
that we depend on for communicating with the agent.

Co-authored-by: Håvard Sørbø <[email protected]>
2025-09-08 12:42:07 +02:00
Ole André Vadla Ravnås 8cbbe21192 barebone: Expose underscore-prefixed CModule syms 2025-09-08 12:42:06 +02:00
Ole André Vadla Ravnås a49f5e4b26 meson: Require json-glib >= 1.8
Needed for Json.Reader.get_current_node().
2025-09-08 12:42:06 +02:00
Ole André Vadla Ravnås 87b3c76fa2 subprojects: Prepare for release 2025-08-20 12:07:16 +02:00
Ole André Vadla Ravnås 9c3cfeda62 subprojects: Bump outdated 2025-08-20 12:06:02 +02:00
Ole André Vadla Ravnås 4e3b670677 subprojects: Prepare for release 2025-08-12 10:15:42 +02:00
Ole André Vadla Ravnås 393637ced2 subprojects: Bump outdated 2025-08-12 09:48:31 +02:00
Ole André Vadla Ravnås 7457b7d355 subprojects: Prepare for release 2025-08-02 09:42:45 +02:00
Ole André Vadla Ravnås 1d80fc635e subprojects: Bump outdated 2025-08-02 08:53:27 +02:00
Abc Xyz 02a6884000 freebsd: Add support for x86 (32-bit) (#1188) 2025-08-02 08:52:39 +02:00
Cheng Yang 820b9f0284 platform: Add support for visionOS 2025-08-02 08:41:15 +02:00
Ole André Vadla Ravnås 5364736d8c subprojects: Bump outdated 2025-08-01 20:21:02 +02:00
Ole André Vadla Ravnås 9134ee1562 submodules: Bump releng 2025-08-01 20:21:01 +02:00
Ole André Vadla Ravnås 85e99cfbd1 gadget: Fix compilation on tvOS and watchOS 2025-08-01 18:17:40 +02:00
Ole André Vadla Ravnås bd1cbc2813 gadget: Fix compilation on non-arm64 Darwin 2025-08-01 18:17:22 +02:00
Ole André Vadla Ravnås a9b4bc7abd subprojects: Bump outdated 2025-08-01 15:48:35 +02:00
Ole André Vadla Ravnås f00ed7357f submodules: Bump releng 2025-08-01 15:48:34 +02:00
Ole André Vadla Ravnås e117570aca android: Bump frida-java-bridge in system-server
To pick up the improved ART offset lookup fix by @AeonLucid.

See frida/frida-java-bridge#366 for details.
2025-08-01 15:29:01 +02:00
Ole André Vadla Ravnås d7bdd776c3 gadget: Fix compilation on non-Darwin 2025-08-01 10:09:13 +02:00
03d861ca80 fruity: Support iOS 26 through dual-mapping
Where we implement the breakpoint protocol expected by Gum's latest
Darwin backend on systems with debugger mappings.

Co-authored-by: Alex Soler <[email protected]>
Co-authored-by: Håvard Sørbø <[email protected]>
Co-authored-by: Ole André Vadla Ravnås <[email protected]>
2025-07-31 20:50:07 +02:00
Francesco Tamagni c047e64c00 fruity: Support injection on palera1n 2025-07-31 19:43:37 +02:00
Ole André Vadla Ravnås 5192ac381f buffer: Fix BufferReader.read_pointer()
No offset should be passed to it.
2025-07-31 19:42:40 +02:00
Ole André Vadla Ravnås 9450f3fa31 barebone: Handle MMU being disabled
We should refine this further, so we re-query the page size later.
2025-07-29 00:29:41 +02:00
Ole André Vadla Ravnås b7157aa45c barebone: Add support for the uint type
In the NativeFunction and NativeCallback APIs.
2025-07-29 00:29:35 +02:00
Ole André Vadla Ravnås d9dfde5748 subprojects: Prepare for release 2025-07-24 11:16:39 +02:00
Ole André Vadla Ravnås 6fdb9b3834 subprojects: Bump outdated 2025-07-24 11:15:07 +02:00
Ole André Vadla Ravnås 92aae264f0 cloak: Plug leak in ThreadCountCloaker.dispose()
Where we were failing to chain up to GObject.dispose().
2025-07-24 11:13:12 +02:00
AeonLucid 5b850e49b2 cloak: Support Art::GetOsThreadStat on Android
The issue is similar to #500, where Zygote is waiting for the process to
become single-threaded before continuing, otherwise it crashes.

For a while this has been changed to use art::GetOsThreadStat, so the
old fix no longer works.
2025-07-24 11:13:12 +02:00
Ole André Vadla Ravnås a6e60f4de6 barebone: Bump @types/frida-gum to 19.0.1 2025-07-24 10:47:16 +02:00
Ole André Vadla Ravnås aac44b8748 compiler: Bump @types/frida-gum to 19.0.1 2025-07-24 10:45:34 +02:00
Ole André Vadla Ravnås f052966d2b android: Bump frida-java-bridge in system-server
To pick up the improved ART offset lookup fix by @AeonLucid.

See frida/frida-java-bridge#362 for details.
2025-07-24 10:37:37 +02:00
Ole André Vadla Ravnås af5c6744ab subprojects: Prepare for release 2025-07-21 15:06:16 +02:00
Ole André Vadla Ravnås 11c3c4cbc0 subprojects: Bump outdated 2025-07-21 15:04:37 +02:00
Ole André Vadla Ravnås ddf42a869a android: Bump frida-java-bridge in system-server
Pick up ART offset lookup fix by @AeonLucid.

See frida/frida-java-bridge#361 for details.
2025-07-21 14:51:52 +02:00
Ole André Vadla Ravnås de4ea7e25a subprojects: Prepare for release 2025-07-18 10:32:18 +02:00
Ole André Vadla Ravnås 9032c83b1e subprojects: Bump outdated 2025-07-18 10:28:26 +02:00
Ole André Vadla Ravnås 6ea09653c4 submodules: Bump releng 2025-07-18 10:28:25 +02:00
Ole André Vadla Ravnås 681c6f0011 android: Bump frida-java-bridge in system-server
Update frida-java-bridge to include fix for incorrect ART
class spec offset detection. This prevents crashes caused by
libart.so being updated independently of the SDK version,
which previously led to offset mismatches.

The fix uses runtime detection via known classes instead of
SDK heuristics, improving reliability across Android updates.
2025-07-18 10:25:19 +02:00
Ole André Vadla Ravnås 5175be48be buffer: Expose BufferReader.offset 2025-07-16 08:28:10 +02:00
Ole André Vadla Ravnås 96ec48e5db barebone: Clear PXN on tables in protect_pages() 2025-07-12 11:02:04 +02:00
Ole André Vadla Ravnås 950e75556c barebone: Improve portability of uint64 constants 2025-07-12 11:01:57 +02:00
Ole André Vadla Ravnås 774b81fe15 buffer: Add helper for constructing large Bytes
This works around a Vala limitation where array lengths are represented
using 32-bit signed integers, which restricts the size of arrays that
can be passed to GLib.Bytes.
2025-07-08 19:57:54 +02:00
Ole André Vadla Ravnås c9d2899f9a buffer: Add Buffer.write_bytes() 2025-07-08 14:22:16 +02:00
Ole André Vadla Ravnås 82a02e112a buffer: Add Buffer.read_bytes() 2025-07-08 14:22:11 +02:00
Ole André Vadla Ravnås 001873a0e9 buffer: Add Buffer.write_int64() 2025-07-08 14:22:05 +02:00
Ole André Vadla Ravnås a56f94305c buffer: Add Buffer.write_uint16() 2025-07-08 14:21:59 +02:00
Ole André Vadla Ravnås 4f6614fe9c buffer: Add Buffer.write_int16() 2025-07-08 14:21:54 +02:00
Ole André Vadla Ravnås f62261b807 buffer: Add Buffer.write_uint8() 2025-07-08 14:21:48 +02:00
Ole André Vadla Ravnås e83804fd3e buffer: Add Buffer.write_int8() 2025-07-08 14:21:41 +02:00
Ole André Vadla Ravnås 3c5c49031c buffer: Fix a stylistic inconsistency 2025-07-08 14:21:37 +02:00
Ole André Vadla Ravnås b2debc767a meson: Add devkit_symbol_scope option
Introduce the combo option `devkit_symbol_scope` with the values
`prefixed` (default) and `original`.  It mirrors the
`--dep-symbol-scope` flag in mkdevkit.py and lets projects control
how the generated devkits treat third-party symbols at configure
time.

* `prefixed`  – add the “_frida_” prefix to avoid clashes with the
  consumer’s own copies of the same libraries (current behaviour)
* `original`  – keep upstream symbol names untouched

The default remains `prefixed`, so existing builds are unchanged.
2025-07-06 19:23:59 +02:00
Ole André Vadla Ravnås 8681999deb submodules: Bump releng 2025-07-06 19:23:09 +02:00
Håvard Sørbø 25efd44d81 barebone: Support R_AARCH64_PREL32 relocations 2025-07-06 13:28:56 +02:00
Ole André Vadla Ravnås b04f69ead9 buffer: Add Buffer.write_int32() 2025-07-06 13:28:38 +02:00
Ole André Vadla Ravnås 63c66f4630 barebone: Add target-function allocator
This introduces a new configuration file (JSON) pointed to by the
FRIDA_BAREBONE_CONFIG environment variable. The file can now describe
three allocator modes:

  * "physical"         – allocate from a fixed physical base
  * "target-functions" – call alloc/free functions on the target
  * "none"             – no allocator configured

Example (target-functions):

    {
      "allocator": {
        "mode": "target-functions",
        "alloc_function": "0xfffffff007a3c278",
        "free_function":  "0xfffffff007a3c338"
      }
    }

BREAKING: The following environment variables are removed. Use the
equivalent JSON instead.

  * FRIDA_BAREBONE_ADDRESS   → "connection.host" / "connection.port"
  * FRIDA_BAREBONE_HEAP_BASE → "allocator.mode": "physical"

Both connection and allocator sections are optional; defaults are
unchanged.
2025-07-06 13:11:55 +02:00
Ole André Vadla Ravnås fec7b84263 barebone: Drop landing_zone from Machine.invoke()
No need for it as we can simply use PC.
2025-07-06 13:11:44 +02:00
Ole André Vadla Ravnås 5bcf41ef07 gadget: Remove redundant Json.Serializable methods
These methods are no longer needed, as json-glib-1.0.vapi now correctly
marks them as non-abstract.
2025-07-06 13:11:11 +02:00
Ole André Vadla Ravnås a7b95c4d89 gadget: Fix config casts
They should not be dynamic casts, since we know the type.
2025-07-06 13:05:16 +02:00
Ole André Vadla Ravnås faf4b24f2b barebone: Implement CModule
Only supporting construction from an ELF blob, for now.
2025-07-03 20:57:27 +02:00
Ole André Vadla Ravnås dbadfb617c rust-module: Split out ELF and console logic 2025-07-03 20:57:27 +02:00
Ole André Vadla RavnåsandHåvard Sørbø a22a3ea7d1 barebone: Implement Memory.protect()
Only supported on arm64 for now.

Co-authored-by: Håvard Sørbø <[email protected]>
2025-07-03 20:57:27 +02:00
Ole André Vadla RavnåsandHåvard Sørbø a5a934c05f barebone: Add support for void and size_t types
In the NativeFunction and NativeCallback APIs.

Co-authored-by: Håvard Sørbø <[email protected]>
2025-07-03 20:57:27 +02:00
Ole André Vadla RavnåsandHåvard Sørbø e7fe9d7c16 barebone: Add Arm64Machine.execute()
Useful for experimentation.

Co-authored-by: Håvard Sørbø <[email protected]>
2025-07-03 20:57:27 +02:00
Ole André Vadla RavnåsandHåvard Sørbø 42869f7fb1 rust-module: Explicitly make ELF executable
Needed on SPRR targets, where allocations are `rw-` by default.

We should improve this so we only apply it to executable segments.

Co-authored-by: Håvard Sørbø <[email protected]>
2025-07-03 20:57:27 +02:00
Ole André Vadla RavnåsandHåvard Sørbø ef2638f57d barebone: Add support for SPRR
Co-authored-by: Håvard Sørbø <[email protected]>
2025-07-03 20:57:27 +02:00
Ole André Vadla RavnåsandHåvard Sørbø 619865e19a barebone: Avoid inserting into PXN tables on arm64
As we won't be able to make such allocations executable.

Co-authored-by: Håvard Sørbø <[email protected]>
2025-07-03 20:57:27 +02:00
Ole André Vadla RavnåsandHåvard Sørbø 660782101c gdb: Fix read_register() for CPSR
The response may not be pointer-sized.

Co-authored-by: Håvard Sørbø <[email protected]>
2025-07-03 19:27:02 +02:00
683dcf59cd fruity: Spray Gadget's r-x pages before uploading
To turn them into debugger mappings. This is only needed on newer
hardware generations, and only on iOS >= 26, but for now we do it
on all of them.

Co-authored-by: Francesco Tamagni <[email protected]>
Co-authored-by: Håvard Sørbø <[email protected]>
Co-authored-by: Murphy <[email protected]>
2025-07-03 19:08:32 +02:00
7ed356fe63 gdb: Add spray_pages()
For efficiently tainting a range of pages before first-time use.

Useful on e.g. iOS targets where debugger mappings are enforced.

Co-authored-by: Francesco Tamagni <[email protected]>
Co-authored-by: Håvard Sørbø <[email protected]>
Co-authored-by: Murphy <[email protected]>
2025-07-03 19:02:39 +02:00
Ole André Vadla Ravnås 27e2d4b96e control-service: Fix build w/o the local backend 2025-07-03 18:59:48 +02:00
Ole André Vadla Ravnås d05515c6f1 subprojects: Prepare for release 2025-07-03 16:10:12 +02:00
Ole André Vadla Ravnås 97742e01f5 subprojects: Bump outdated 2025-07-03 16:09:14 +02:00
Francesco Tamagni f354fcafe4 fruity: Get away with killing prewarmed target
Killing a prewarmed process at spawn time results in a "connection
closed" error. This change catches it so it's possible to go on and
spawn a fresh instance.
2025-07-03 14:59:16 +02:00
Ole André Vadla Ravnås dca42cfa11 subprojects: Prepare for release 2025-07-03 12:56:59 +02:00
Ole André Vadla Ravnås aecfdb92a3 subprojects: Bump outdated 2025-07-03 12:55:43 +02:00
Ole André Vadla Ravnås 4f5badfeff rust-module: Ensure C ABI entrypoints survive GC
Newer Rust toolchains use --gc-sections, stripping unused sections.
Refactor make_linker_script() to scan the Rust source for symbols
intended to be visible, and emit KEEP(*(.text.<symbol>)) directives
so those entrypoints are retained.
2025-07-03 02:19:21 +02:00
Ole André Vadla Ravnås b2e64a69c1 subprojects: Prepare for release 2025-07-02 12:59:06 +02:00
Ole André Vadla Ravnås 147b1c1e73 subprojects: Bump outdated 2025-07-02 12:56:11 +02:00
Francesco Tamagni e9d4e56b9c gadget: Avoid Interceptor during config detection
By iterating modules on Darwin using Gum.Darwin.ModuleResolver instead
of relying on the module registry which attempts to use Interceptor
before the configuration had a chance to specify the `code_signing`
policy.
2025-07-02 12:54:35 +02:00
Francesco Tamagni 1e4f398fb2 fruity: Inject on enforced debugger mapping
Add support for injecting the gadget on iOS targets where debugger
mappings are enforced and we can't flip the memory protection back to
executable from inside the target process.

In that case, the Gadget configuration will have `code_signing` set to
`required` for now, until Interceptor is ready for enforced debugger
mappings too.
2025-07-02 12:54:35 +02:00
Ole André Vadla Ravnås 4dcce299d0 subprojects: Prepare for release 2025-07-02 00:09:13 +02:00
Ole André Vadla Ravnås 474199c1e7 subprojects: Bump outdated 2025-07-02 00:08:31 +02:00
Ole André Vadla Ravnås 6ff8d931e0 package-manager: Fix broken #if on Windows 2025-07-02 00:07:44 +02:00
Ole André Vadla Ravnås 4b25d3b987 subprojects: Prepare for release 2025-07-01 23:40:01 +02:00
Ole André Vadla Ravnås 0f98678051 subprojects: Bump outdated 2025-07-01 23:38:55 +02:00
Henrik Grimler 52948f6c4f meson: Clarify Vala build system gotcha (#1182)
The Vala README only mentions autotools instructions, and when Vala is
compiled that way the -frida suffix is not added to the version string,
and the frida-core check for Vala fails.

Therefore, clarify that Vala needs to be built from source with Meson.
2025-07-01 21:33:05 +02:00
Ole André Vadla Ravnås ae7a3725d3 meson: Add missing libc Vala defines
Needed by the latest PackageManager.
2025-07-01 21:15:39 +02:00
Ole André Vadla Ravnås 62234b16ae package-manager: Refactor the installation logic 2025-07-01 21:07:35 +02:00
Ole André Vadla Ravnås 1000cba56b package-manager: Fix the has_install_script logic
Should also take `preinstall` and `postinstall` into account.
2025-07-01 21:07:35 +02:00
Ole André Vadla Ravnås 40004affdb package-manager: Improve optional package handling 2025-07-01 21:07:35 +02:00
Ole André Vadla Ravnås a836182ac9 package-manager: Add install() option for role
To achieve the equivalent of npm install's --save-* switches.
2025-07-01 21:07:35 +02:00
Ole André Vadla Ravnås 600d2bf948 package-manager: Add install() option for omits
To achieve the equivalent of npm install's --omit=x switch.
2025-07-01 21:07:35 +02:00
Ole André Vadla Ravnås 466705f0da package-manager: Handle file mode when extracting
On non-Windows systems.
2025-07-01 21:07:35 +02:00
Ole André Vadla RavnåsandHåvard Sørbø 18ad19554a package-manager: Improve resolution and hoisting
To mimic npm's behavior more closely.

Co-authored-by: Håvard Sørbø <[email protected]>
2025-07-01 21:07:35 +02:00
Ole André Vadla Ravnås 58c8062f93 subprojects: Prepare for release 2025-06-27 15:59:50 +02:00
Kyle Bouchard a6be95d8ae agent: Disable Exceptor for the emulated realm
Exceptor needs to hook signal() and sigaction(), but they are in libc,
leading to gum_mprotect() aborting because it cannot change libc's
'r--' mapping.

I tested it on AVDs with Android 14 and 15 and it prevents the crash
observed in the upstream version when using frida-server or
frida-inject.
2025-06-27 15:58:12 +02:00
Ole André Vadla Ravnås db258f0d35 subprojects: Bump outdated 2025-06-27 15:50:28 +02:00
Francesco Tamagni bea95d0045 buffer: Fix max_length in read_fixed_string
So it is constrained both within the requested size and the buffer's
size.
2025-06-26 12:25:01 +02:00
Ole André Vadla Ravnås 57d2a83548 subprojects: Prepare for release 2025-06-23 18:44:25 +02:00
Ole André Vadla Ravnås 4474490f9b subprojects: Bump outdated 2025-06-23 18:41:09 +02:00
Ole André Vadla Ravnås a9ba854aa7 package-manager: Fix the dev logic 2025-06-22 10:22:42 +02:00
Ole André Vadla Ravnås 47c265b3df package-manager: Only bump if explicitly requested 2025-06-20 21:37:31 +02:00
Ole André Vadla Ravnås 36200d4c17 subprojects: Prepare for release 2025-06-20 15:45:32 +02:00
Ole André Vadla Ravnås bd1f855f4a subprojects: Bump outdated 2025-06-20 15:44:10 +02:00
Ole André Vadla RavnåsandHåvard Sørbø d752b63d3f package-manager: Improve manifest handling
To get us closer to npm's behavior.

Co-authored-by: Håvard Sørbø <[email protected]>
2025-06-20 15:43:29 +02:00
Ole André Vadla Ravnås a66e35d457 package-manager: Improve progress reporting 2025-06-20 11:46:30 +02:00
Ole André Vadla Ravnås 931270de32 package-manager: Refactor a little bit 2025-06-20 11:45:50 +02:00
Ole André Vadla Ravnås 90d54afbf4 promise: Add Future.then() and Future.get_result() 2025-06-20 10:58:00 +02:00
Ole André Vadla Ravnås 0a75b51e7b package-manager: Fix dependency install deadlock
A deadlock could occur when a package's sub-dependency was also a
dependency of another package higher up in the installation stack.
The sub-dependency would wait for the higher-level package to be
physically installed, but that package would not complete its own
installation until its sub-dependencies were resolved, creating a
circular wait.

Refactor the installation logic to first perform the physical
installation of a package. Once the package is on disk, a promise
tracking its physical presence is resolved. Only then does the process
recurse to install the package's own dependencies. This ensures that
any other part of the installation process waiting for this specific
package can proceed, breaking the cycle.
2025-06-20 10:17:38 +02:00
Ole André Vadla Ravnås 20d5d121b7 subprojects: Prepare for release 2025-06-20 01:13:54 +02:00
Ole André Vadla Ravnås dc71534220 subprojects: Bump outdated 2025-06-20 01:12:26 +02:00
Ole André Vadla Ravnås 35afee9b4a package-manager: Handle tarballs with root entries
Like if there's a directory entry for "package/", or somehow any files
at the root level.
2025-06-20 01:11:39 +02:00
Ole André Vadla Ravnås 7b130e6eba package-manager: Fix handling of scoped specs 2025-06-20 01:11:39 +02:00
Ole André Vadla Ravnås d28c46c332 package-manager: Fix a stylistic inconsistency 2025-06-20 01:11:39 +02:00
Ole André Vadla Ravnås ab103a73ca package-manager: Simplify substring logic 2025-06-20 01:11:39 +02:00
243 changed files with 36168 additions and 6547 deletions

No files matched your search

+145 -6
View File
@@ -2,11 +2,15 @@ name: CI
on:
push:
branches:
- main
pull_request:
branches:
- main
workflow_dispatch:
inputs:
tag:
description: "Tag to build/test"
required: false
type: string
env:
FRIDA_CORE_OPTIONS: '--with-devkits=core --enable-tests'
@@ -71,6 +75,7 @@ jobs:
if: ${{ !startsWith(matrix.id, 'windows-') && matrix.id != 'linux-x86' }}
run: |
./configure \
--host=${{ matrix.id }} \
--enable-compiler-backend \
${{ env.FRIDA_CORE_OPTIONS }}
make
@@ -205,7 +210,7 @@ jobs:
/sbin/entropy
cat /etc/motd
export PS1='\u@frida:\w\$ '
/root/frida-tests
/root/tests/frida-tests
status=\$?
echo "exit status: \$status"
if [ \$status -eq 0 ]; then
@@ -281,7 +286,8 @@ jobs:
COPY initscript /tmp/initramfs/init
RUN chmod +x /tmp/initramfs/init
COPY build/tests /tmp/initramfs/root/
COPY build/tests /tmp/initramfs/root/tests/
COPY build/lib/agent/frida-agent.so /tmp/initramfs/root/lib/agent/
RUN find . | cpio -o --format=newc -R root:root > /root/initramfs.img
COPY launch.sh /root/launch.sh
@@ -297,6 +303,7 @@ jobs:
matrix:
id:
- ios-arm64
- ios-arm64-simulator
- android-x86
- android-x86_64
- android-arm
@@ -341,6 +348,7 @@ jobs:
name: core-devkit-${{ matrix.id }}
path: build/src/devkit/
- name: Package tests
if: false
run: |
mkdir -p /tmp/pkg
cd build
@@ -360,7 +368,7 @@ jobs:
esac
tar -C /tmp/pkg -czf /tmp/runner.tar.gz .
- name: Test on Corellium iOS device
if: matrix.id == 'ios-arm64'
if: false
continue-on-error: true
uses: frida/corellium-action@v4
with:
@@ -376,7 +384,7 @@ jobs:
tar xf $ASSET_PATH
./frida-tests
- name: Test on Corellium Android device
if: matrix.id == 'android-arm64'
if: false
continue-on-error: true
uses: frida/corellium-action@v4
with:
@@ -480,3 +488,134 @@ jobs:
else
echo "No unexpected changes detected."
fi
xcframework:
name: Build FridaCore.xcframework
runs-on: macos-latest
needs:
- native
- mobile
steps:
- name: Check out repo
uses: actions/checkout@v4
- name: Download macOS/x86_64 devkit
uses: actions/download-artifact@v4
with:
name: core-devkit-macos-x86_64
path: devkits/macos-x86_64
- name: Download macOS/arm64 devkit
uses: actions/download-artifact@v4
with:
name: core-devkit-macos-arm64
path: devkits/macos-arm64
- name: Download iOS/arm64 devkit
uses: actions/download-artifact@v4
with:
name: core-devkit-ios-arm64
path: devkits/ios-arm64
- name: Download iOS/arm64-simulator devkit
uses: actions/download-artifact@v4
with:
name: core-devkit-ios-arm64-simulator
path: devkits/ios-arm64-simulator
- name: Create FridaCore.xcframework
shell: bash
run: |
set -euo pipefail
mkdir -p devkits/macos-universal
lipo -create \
devkits/macos-x86_64/libfrida-core.a \
devkits/macos-arm64/libfrida-core.a \
-output devkits/macos-universal/libfrida-core.a
platforms=(
"macos-universal"
"ios-arm64"
"ios-arm64-simulator"
)
for platform in "${platforms[@]}"; do
mkdir -p "xcframework_headers/${platform}/FridaCore"
done
cp devkits/macos-x86_64/frida-core.h \
xcframework_headers/macos-universal/frida-core-x86_64.h
cp devkits/macos-arm64/frida-core.h \
xcframework_headers/macos-universal/frida-core-arm64.h
cat > xcframework_headers/macos-universal/frida-core.h <<'EOF'
#if defined (__x86_64__)
# include "frida-core-x86_64.h"
#elif defined (__arm64__)
# include "frida-core-arm64.h"
#else
# error "Unsupported macOS architecture for FridaCore"
#endif
EOF
cp devkits/ios-arm64/frida-core.h \
xcframework_headers/ios-arm64/frida-core.h
cp devkits/ios-arm64-simulator/frida-core.h \
xcframework_headers/ios-arm64-simulator/frida-core.h
for platform in "${platforms[@]}"; do
cat > "xcframework_headers/${platform}/FridaCore/module.modulemap" <<'EOF'
module FridaCore [extern_c] {
header "../frida-core.h"
export *
}
EOF
done
xcodebuild -create-xcframework \
-library devkits/macos-universal/libfrida-core.a \
-headers xcframework_headers/macos-universal \
-library devkits/ios-arm64/libfrida-core.a \
-headers xcframework_headers/ios-arm64 \
-library devkits/ios-arm64-simulator/libfrida-core.a \
-headers xcframework_headers/ios-arm64-simulator \
-output FridaCore.xcframework
- name: Upload FridaCore.xcframework
uses: actions/upload-artifact@v4
with:
name: FridaCore.xcframework
path: FridaCore.xcframework
publish-xcframework:
if: github.ref_type == 'tag'
runs-on: macos-latest
needs:
- xcframework
steps:
- name: Download FridaCore.xcframework artifact
uses: actions/download-artifact@v4
with:
name: FridaCore.xcframework
path: dist
- name: Rewrap into FridaCore.xcframework directory
shell: bash
run: |
set -euo pipefail
cd dist
mkdir -p FridaCore.xcframework
shopt -s dotglob
for f in *; do
if [[ "$f" != "FridaCore.xcframework" ]]; then
mv "$f" FridaCore.xcframework/
fi
done
- name: Zip FridaCore.xcframework
run: |
cd dist
zip -r FridaCore.xcframework.zip FridaCore.xcframework
- name: Create GitHub release
uses: softprops/action-gh-release@v2
with:
files: |
dist/FridaCore.xcframework.zip
prerelease: ${{ contains(github.ref_name, 'snapshot') }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+3 -1
View File
@@ -1,5 +1,8 @@
/build/
/deps/
/src/android-helper/build/
/src/barebone/agent/target/
/src/barebone/agent/xpacks/
/src/barebone/helpers/memory-scanner/target/
/src/barebone/helpers/target/
/src/barebone/node_modules/
@@ -9,7 +12,6 @@
/src/darwin/agent/osanalytics/osanalytics.js
/src/darwin/agent/reportcrash/node_modules/
/src/darwin/agent/reportcrash/reportcrash.js
/src/droidy/helper/build/
/src/fruity/helpers/build/
/src/linux/agent/system-server/node_modules/
/src/linux/agent/system-server/system-server.js
+5 -5
View File
@@ -24,7 +24,9 @@ _frida_agent_environment_init (void)
been_here = TRUE;
#endif
gum_init_embedded ();
#ifdef _MSC_VER
frida_libc_shim_init ();
#endif
gio_init ();
g_thread_set_garbage_handler (_frida_agent_on_pending_thread_garbage, NULL);
@@ -54,13 +56,11 @@ _frida_agent_environment_deinit (void)
glib_shutdown ();
gio_deinit ();
gum_deinit_embedded ();
frida_run_atexit_handlers ();
# ifdef HAVE_DARWIN
/* Do what frida_deinit_memory() does on the other platforms. */
gum_internal_heap_unref ();
# if defined (_MSC_VER) || defined (HAVE_DARWIN)
frida_libc_shim_deinit ();
# endif
#endif
}
+5 -5
View File
@@ -1400,12 +1400,12 @@ namespace Frida.Agent {
if (nb_api.unload_library == null)
parameters.append ("|eternal|sticky");
/*
* Disable ExitMonitor to work around a bug in Android's libndk_translation.so on Android 11.
* We need to avoid modifying libc.so ranges that the translator potentially depends on, to
* avoid blowing up when Interceptor's CPU cache flush results in the translated code being
* discarded, which seems like an edge-case the translator doesn't handle.
* Disable Exceptor and ExitMonitor to work around a bug in Android's libndk_translation.so
* on Android 11. We need to avoid modifying libc.so ranges that the translator potentially
* depends on, to avoid blowing up when Interceptor's CPU cache flush results in the translated
* code being discarded, which seems like an edge-case the translator doesn't handle.
*/
parameters.append ("|exit-monitor:off");
parameters.append ("|exceptor:off|exit-monitor:off");
emulated_bridge_state = new BridgeState (parameters.str);
+2 -2
View File
@@ -50,9 +50,9 @@ raw_agent = shared_library('frida-agent-raw', agent_sources,
dependencies: [gio_dep, gee_dep, gum_dep, gumjs_dep, base_dep, pipe_dep, tls_provider_dep, payload_dep],
)
operations = ['--move', 'constructor', 'frida_init_memory', 'first']
operations = ['--move', 'constructor', 'frida_libc_shim_init', 'first']
if host_os_family != 'darwin'
operations += ['--move', 'destructor', 'frida_deinit_memory', 'first']
operations += ['--move', 'destructor', 'frida_libc_shim_deinit', 'first']
endif
modulated_agent = custom_target('frida-agent-modulated',
input: raw_agent,
+12
View File
@@ -0,0 +1,12 @@
#include "frida-base.h"
GBytes *
frida_make_bytes_with_owner (GType t_type,
GBoxedCopyFunc t_dup_func,
GDestroyNotify t_destroy_func,
void * data,
gsize size,
gpointer owner)
{
return g_bytes_new_with_free_func (data, size, t_destroy_func, owner);
}
+95 -33
View File
@@ -356,10 +356,20 @@ namespace Frida {
return *((int8 *) get_pointer (offset, sizeof (int8)));
}
public unowned Buffer write_int8 (size_t offset, int8 val) {
*((int8 *) get_pointer (offset, sizeof (int8))) = val;
return this;
}
public uint8 read_uint8 (size_t offset) {
return *get_pointer (offset, sizeof (uint8));
}
public unowned Buffer write_uint8 (size_t offset, uint8 val) {
*((uint8 *) get_pointer (offset, sizeof (uint8))) = val;
return this;
}
public int16 read_int16 (size_t offset) {
int16 val = *((int16 *) get_pointer (offset, sizeof (int16)));
return (byte_order == BIG_ENDIAN)
@@ -367,6 +377,14 @@ namespace Frida {
: int16.from_little_endian (val);
}
public unowned Buffer write_int16 (size_t offset, int16 val) {
int16 target_val = (byte_order == BIG_ENDIAN)
? val.to_big_endian ()
: val.to_little_endian ();
*((int16 *) get_pointer (offset, sizeof (int16))) = target_val;
return this;
}
public uint16 read_uint16 (size_t offset) {
uint16 val = *((uint16 *) get_pointer (offset, sizeof (uint16)));
return (byte_order == BIG_ENDIAN)
@@ -374,6 +392,14 @@ namespace Frida {
: uint16.from_little_endian (val);
}
public unowned Buffer write_uint16 (size_t offset, uint16 val) {
uint16 target_val = (byte_order == BIG_ENDIAN)
? val.to_big_endian ()
: val.to_little_endian ();
*((uint16 *) get_pointer (offset, sizeof (uint16))) = target_val;
return this;
}
public int32 read_int32 (size_t offset) {
int32 val = *((int32 *) get_pointer (offset, sizeof (int32)));
return (byte_order == BIG_ENDIAN)
@@ -381,6 +407,14 @@ namespace Frida {
: int32.from_little_endian (val);
}
public unowned Buffer write_int32 (size_t offset, int32 val) {
int32 target_val = (byte_order == BIG_ENDIAN)
? val.to_big_endian ()
: val.to_little_endian ();
*((int32 *) get_pointer (offset, sizeof (int32))) = target_val;
return this;
}
public uint32 read_uint32 (size_t offset) {
uint32 val = *((uint32 *) get_pointer (offset, sizeof (uint32)));
return (byte_order == BIG_ENDIAN)
@@ -403,6 +437,14 @@ namespace Frida {
: int64.from_little_endian (val);
}
public unowned Buffer write_int64 (size_t offset, int64 val) {
int64 target_val = (byte_order == BIG_ENDIAN)
? val.to_big_endian ()
: val.to_little_endian ();
*((int64 *) get_pointer (offset, sizeof (int64))) = target_val;
return this;
}
public uint64 read_uint64 (size_t offset) {
uint64 val = *((uint64 *) get_pointer (offset, sizeof (uint64)));
return (byte_order == BIG_ENDIAN)
@@ -446,7 +488,7 @@ namespace Frida {
public string read_fixed_string (size_t offset, size_t size) throws Error {
string * start = (string *) get_pointer (offset, size);
size_t max_length = size - offset;
size_t max_length = size_t.min (size, this.size - offset);
string * end = memchr (start, 0, max_length);
size_t n;
if (end != null)
@@ -465,6 +507,18 @@ namespace Frida {
return this;
}
public Bytes read_bytes (size_t offset, size_t size) {
var data = new uint8[size + 1];
Memory.copy (data, get_pointer (offset, size), size);
return new Bytes.take ((owned) data);
}
public unowned Buffer write_bytes (size_t offset, Bytes bytes) {
size_t size = bytes.get_size ();
Memory.copy (get_pointer (offset, size), bytes.get_data (), size);
return this;
}
private uint8 * get_pointer (size_t offset, size_t n) {
size_t minimum_size = offset + n;
assert (size >= minimum_size);
@@ -474,121 +528,127 @@ namespace Frida {
}
public sealed class BufferReader {
public size_t offset {
get {
return _offset;
}
}
public size_t available {
get {
return buffer.bytes.get_size () - offset;
return buffer.bytes.get_size () - _offset;
}
}
private Buffer buffer;
private size_t offset = 0;
private size_t _offset = 0;
public BufferReader (Buffer buf) {
buffer = buf;
}
public uint64 read_pointer (size_t offset) throws Error {
public uint64 read_pointer () throws Error {
var pointer_size = buffer.pointer_size;
check_available (pointer_size);
var ptr = buffer.read_pointer (offset);
offset += pointer_size;
var ptr = buffer.read_pointer (_offset);
_offset += pointer_size;
return ptr;
}
public int8 read_int8 () throws Error {
check_available (sizeof (int8));
var val = buffer.read_int8 (offset);
offset += sizeof (int8);
var val = buffer.read_int8 (_offset);
_offset += sizeof (int8);
return val;
}
public uint8 read_uint8 () throws Error {
check_available (sizeof (uint8));
var val = buffer.read_uint8 (offset);
offset += sizeof (uint8);
var val = buffer.read_uint8 (_offset);
_offset += sizeof (uint8);
return val;
}
public int16 read_int16 () throws Error {
check_available (sizeof (int16));
var val = buffer.read_int16 (offset);
offset += sizeof (int16);
var val = buffer.read_int16 (_offset);
_offset += sizeof (int16);
return val;
}
public uint16 read_uint16 () throws Error {
check_available (sizeof (uint16));
var val = buffer.read_uint16 (offset);
offset += sizeof (uint16);
var val = buffer.read_uint16 (_offset);
_offset += sizeof (uint16);
return val;
}
public int32 read_int32 () throws Error {
check_available (sizeof (int32));
var val = buffer.read_int32 (offset);
offset += sizeof (int32);
var val = buffer.read_int32 (_offset);
_offset += sizeof (int32);
return val;
}
public uint32 read_uint32 () throws Error {
check_available (sizeof (uint32));
var val = buffer.read_uint32 (offset);
offset += sizeof (uint32);
var val = buffer.read_uint32 (_offset);
_offset += sizeof (uint32);
return val;
}
public int64 read_int64 () throws Error {
check_available (sizeof (int64));
var val = buffer.read_int64 (offset);
offset += sizeof (int64);
var val = buffer.read_int64 (_offset);
_offset += sizeof (int64);
return val;
}
public uint64 read_uint64 () throws Error {
check_available (sizeof (uint64));
var val = buffer.read_uint64 (offset);
offset += sizeof (uint64);
var val = buffer.read_uint64 (_offset);
_offset += sizeof (uint64);
return val;
}
public float read_float () throws Error {
check_available (sizeof (float));
var val = buffer.read_float (offset);
offset += sizeof (float);
var val = buffer.read_float (_offset);
_offset += sizeof (float);
return val;
}
public double read_double () throws Error {
check_available (sizeof (double));
var val = buffer.read_double (offset);
offset += sizeof (double);
var val = buffer.read_double (_offset);
_offset += sizeof (double);
return val;
}
public string read_string () throws Error {
check_available (1);
var val = buffer.read_string (offset);
offset += val.length + 1;
var val = buffer.read_string (_offset);
_offset += val.length + 1;
return val;
}
public string read_fixed_string (size_t size) throws Error {
check_available (size);
var val = buffer.read_fixed_string (offset, size);
offset += size;
var val = buffer.read_fixed_string (_offset, size);
_offset += size;
return val;
}
public Bytes read_bytes (size_t size) throws Error {
check_available (size);
var val = buffer.bytes[offset:offset + size];
offset += size;
var val = buffer.bytes[_offset:_offset + size];
_offset += size;
return val;
}
public unowned BufferReader skip (size_t n) throws Error {
check_available (n);
offset += n;
_offset += n;
return this;
}
@@ -597,4 +657,6 @@ namespace Frida {
throw new Error.PROTOCOL ("Malformed buffer: truncated");
}
}
public extern Bytes make_bytes_with_owner<T> (void * data, size_t size, owned T? owner = null);
}
+27
View File
@@ -0,0 +1,27 @@
#ifndef __FRIDA_ATOMICS_H__
#define __FRIDA_ATOMICS_H__
#ifdef _MSC_VER
/* TODO: Add once needed. */
#else
static inline guint64 frida_atomics_load_u64_acquire (volatile guint64 * p)
{
return __atomic_load_n (p, __ATOMIC_ACQUIRE);
}
static inline void frida_atomics_store_u64_release (volatile guint64 * p, guint64 v)
{
__atomic_store_n (p, v, __ATOMIC_RELEASE);
}
static inline guint32 frida_atomics_load_u32_acquire (volatile guint32 * p)
{
return __atomic_load_n (p, __ATOMIC_ACQUIRE);
}
#endif
#endif
+6
View File
@@ -0,0 +1,6 @@
[CCode (cheader_filename = "frida-atomics.h")]
namespace Frida.Atomics {
public static uint64 load_u64_acquire (void * p);
public static void store_u64_release (void * p, uint64 v);
public static uint32 load_u32_acquire (void * p);
}
+20
View File
@@ -0,0 +1,20 @@
#ifndef __FRIDA_LINUX_BPF_H__
#define __FRIDA_LINUX_BPF_H__
#include <glib.h>
G_BEGIN_DECLS
#define FRIDA_BPF_RINGBUF_HEADER_SIZE 8
typedef guint32 FridaBpfRingbufFlags;
enum _FridaBpfRingbufFlags
{
FRIDA_BPF_RINGBUF_BUSY = (1U << 31),
FRIDA_BPF_RINGBUF_DISCARD = (1U << 30),
};
G_END_DECLS
#endif
+54
View File
@@ -0,0 +1,54 @@
#ifndef __FRIDA_LINUX_PERF_EVENT_H__
#define __FRIDA_LINUX_PERF_EVENT_H__
#include <glib.h>
G_BEGIN_DECLS
#define FRIDA_PERF_EVENT_COUNT_SW_CPU_CLOCK 0
typedef struct _FridaPerfEventAttr FridaPerfEventAttr;
typedef guint32 FridaPerfEventType;
struct _FridaPerfEventAttr
{
FridaPerfEventType event_type;
guint32 size;
guint64 config;
union
{
guint64 sample_period;
guint64 sample_freq;
};
guint64 sample_type;
guint64 read_format;
guint64 flags;
guint32 wakeup_events;
guint32 bp_type;
union
{
guint64 bp_addr;
guint64 config1;
};
union
{
guint64 bp_len;
guint64 config2;
};
};
enum _FridaPerfEventType
{
FRIDA_PERF_EVENT_TYPE_HARDWARE,
FRIDA_PERF_EVENT_TYPE_SOFTWARE,
};
G_END_DECLS
#endif
+58
View File
@@ -0,0 +1,58 @@
namespace Frida {
[CCode (cheader_filename = "dlfcn.h", cname = "dlopen")]
public void * dlopen (string filename, int flags);
[CCode (cheader_filename = "dlfcn.h", cname = "dlclose")]
public int dlclose (void * handle);
[CCode (cheader_filename = "dlfcn.h", cname = "dlsym")]
public void * dlsym (void * handle, string symbol);
[CCode (cheader_filename = "dlfcn.h", cname = "dlerror")]
public unowned string dlerror ();
[CCode (cheader_filename = "sys/mman.h", cname = "MAP_ANONYMOUS")]
public const int MAP_ANONYMOUS;
[CCode (cheader_filename = "frida-linux-bpf.h", cprefix = "FRIDA_BPF_RINGBUF_", has_type_id = false)]
[Flags]
public enum BpfRingbufFlags {
BUSY,
DISCARD,
}
[CCode (cheader_filename = "frida-linux-bpf.h")]
public const uint32 BPF_RINGBUF_HEADER_SIZE;
[CCode (cheader_filename = "frida-linux-perf-event.h")]
public const int PERF_EVENT_TYPE_SOFTWARE;
[CCode (cheader_filename = "frida-linux-perf-event.h")]
public const int PERF_EVENT_COUNT_SW_CPU_CLOCK;
[CCode (cheader_filename = "frida-linux-perf-event.h", has_type_id = false)]
public struct PerfEventAttr {
public PerfEventType event_type;
public uint32 size;
public uint64 config;
public uint64 sample_period;
public uint64 sample_type;
public uint64 read_format;
public uint64 flags;
public uint32 wakeup_events;
public uint32 bp_type;
public uint64 config1;
public uint64 config2;
}
[CCode (cheader_filename = "frida-linux-perf-event.h", has_type_id = false)]
public enum PerfEventType {
HARDWARE,
SOFTWARE,
}
}
-63
View File
@@ -1,63 +0,0 @@
#ifndef __FRIDA_LINUX_SYSCALL_H__
#define __FRIDA_LINUX_SYSCALL_H__
#include <linux/unistd.h>
#include <sys/syscall.h>
#undef SYS_process_vm_readv
#undef SYS_process_vm_writev
#undef SYS_memfd_create
#undef SYS_pidfd_open
#undef SYS_pidfd_getfd
#if defined (HAVE_I386) && GLIB_SIZEOF_VOID_P == 4
# define SYS_process_vm_readv 347
# define SYS_process_vm_writev 348
# define SYS_memfd_create 356
# define SYS_pidfd_open 434
# define SYS_pidfd_getfd 438
#elif defined (HAVE_I386) && GLIB_SIZEOF_VOID_P == 8
# define SYS_process_vm_readv 310
# define SYS_process_vm_writev 311
# define SYS_memfd_create 319
# define SYS_pidfd_open 434
# define SYS_pidfd_getfd 438
#elif defined (HAVE_ARM)
# define SYS_process_vm_readv (__NR_SYSCALL_BASE + 376)
# define SYS_process_vm_writev (__NR_SYSCALL_BASE + 377)
# define SYS_memfd_create (__NR_SYSCALL_BASE + 385)
# define SYS_pidfd_open (__NR_SYSCALL_BASE + 434)
# define SYS_pidfd_getfd (__NR_SYSCALL_BASE + 438)
#elif defined (HAVE_ARM64)
# define SYS_process_vm_readv 270
# define SYS_process_vm_writev 271
# define SYS_memfd_create 279
# define SYS_pidfd_open 434
# define SYS_pidfd_getfd 438
#elif defined (HAVE_MIPS)
# if _MIPS_SIM == _MIPS_SIM_ABI32
# define SYS_process_vm_readv (__NR_Linux + 345)
# define SYS_process_vm_writev (__NR_Linux + 346)
# define SYS_memfd_create (__NR_Linux + 354)
# define SYS_pidfd_open (__NR_Linux + 434)
# define SYS_pidfd_getfd (__NR_Linux + 438)
# elif _MIPS_SIM == _MIPS_SIM_ABI64
# define SYS_process_vm_readv (__NR_Linux + 304)
# define SYS_process_vm_writev (__NR_Linux + 305)
# define SYS_memfd_create (__NR_Linux + 314)
# define SYS_pidfd_open (__NR_Linux + 434)
# define SYS_pidfd_getfd (__NR_Linux + 438)
# elif _MIPS_SIM == _MIPS_SIM_NABI32
# define SYS_process_vm_readv (__NR_Linux + 309)
# define SYS_process_vm_writev (__NR_Linux + 310)
# define SYS_memfd_create (__NR_Linux + 318)
# define SYS_pidfd_open (__NR_Linux + 434)
# define SYS_pidfd_getfd (__NR_Linux + 438)
# else
# error Unexpected MIPS ABI
# endif
#else
# error FIXME
#endif
#endif
+25
View File
@@ -0,0 +1,25 @@
KERNEL_TREE ?= $(HOME)/src/linux
archs := \
x86 \
x86_64 \
arm \
arm64 \
mips \
mips64 \
s390x \
$(NULL)
all: $(foreach arch,$(archs),$(arch).vala)
clean:
$(RM) $(foreach arch,$(archs),$(arch).vala $(arch)-glue.c)
%.vala %-glue.c:
./generate-bindings.py \
--abi=$* \
--kernel-tree=$(KERNEL_TREE) \
--out-vala=$*.vala \
--out-c=$*-glue.c
.PHONY: all clean
+451
View File
@@ -0,0 +1,451 @@
/* AUTO-GENERATED FILE. DO NOT EDIT. */
#include "frida-base.h"
static const FridaLinuxSyscallSignature frida_syscall_signatures[] =
{
{ 0, "restart_syscall", 0, {} },
{ 1, "exit", 1, { { "int", "error_code" } } },
{ 2, "fork", 0, {} },
{ 3, "read", 3, { { "unsigned int", "fd" }, { "char *", "buf" }, { "size_t", "count" } } },
{ 4, "write", 3, { { "unsigned int", "fd" }, { "const char *", "buf" }, { "size_t", "count" } } },
{ 5, "open", 3, { { "const char *", "filename" }, { "int", "flags" }, { "umode_t", "mode" } } },
{ 6, "close", 1, { { "unsigned int", "fd" } } },
{ 8, "creat", 2, { { "const char *", "pathname" }, { "umode_t", "mode" } } },
{ 9, "link", 2, { { "const char *", "oldname" }, { "const char *", "newname" } } },
{ 10, "unlink", 1, { { "const char *", "pathname" } } },
{ 11, "execve", 3, { { "const char *", "filename" }, { "const char *const *", "argv" }, { "const char *const *", "envp" } } },
{ 12, "chdir", 1, { { "const char *", "filename" } } },
{ 13, "time", 1, { { "old_time32_t *", "tloc" } } },
{ 14, "mknod", 3, { { "const char *", "filename" }, { "umode_t", "mode" }, { "unsigned", "dev" } } },
{ 15, "chmod", 2, { { "const char *", "filename" }, { "umode_t", "mode" } } },
{ 16, "lchown", 3, { { "const char *", "filename" }, { "uid_t", "user" }, { "gid_t", "group" } } },
{ 19, "lseek", 3, { { "unsigned int", "fd" }, { "off_t", "offset" }, { "unsigned int", "whence" } } },
{ 20, "getpid", 0, {} },
{ 21, "mount", 5, { { "char *", "dev_name" }, { "char *", "dir_name" }, { "char *", "type" }, { "unsigned long", "flags" }, { "void *", "data" } } },
{ 22, "umount", 2, { { "char *", "name" }, { "int", "flags" } } },
{ 23, "setuid", 1, { { "uid_t", "uid" } } },
{ 24, "getuid", 0, {} },
{ 25, "stime", 1, { { "old_time32_t *", "tptr" } } },
{ 26, "ptrace", 4, { { "long", "request" }, { "long", "pid" }, { "unsigned long", "addr" }, { "unsigned long", "data" } } },
{ 27, "alarm", 1, { { "unsigned int", "seconds" } } },
{ 29, "pause", 0, {} },
{ 30, "utime", 2, { { "const char *", "filename" }, { "struct old_utimbuf32 *", "t" } } },
{ 33, "access", 2, { { "const char *", "filename" }, { "int", "mode" } } },
{ 34, "nice", 1, { { "int", "increment" } } },
{ 36, "sync", 0, {} },
{ 37, "kill", 2, { { "pid_t", "pid" }, { "int", "sig" } } },
{ 38, "rename", 2, { { "const char *", "oldname" }, { "const char *", "newname" } } },
{ 39, "mkdir", 2, { { "const char *", "pathname" }, { "umode_t", "mode" } } },
{ 40, "rmdir", 1, { { "const char *", "pathname" } } },
{ 41, "dup", 1, { { "unsigned int", "fildes" } } },
{ 42, "pipe", 1, { { "int *", "fildes" } } },
{ 43, "times", 1, { { "struct tms *", "tbuf" } } },
{ 45, "brk", 1, { { "unsigned long", "brk" } } },
{ 46, "setgid", 1, { { "gid_t", "gid" } } },
{ 47, "getgid", 0, {} },
{ 49, "geteuid", 0, {} },
{ 50, "getegid", 0, {} },
{ 51, "acct", 1, { { "const char *", "name" } } },
{ 52, "umount2", 2, { { "char *", "name" }, { "int", "flags" } } },
{ 54, "ioctl", 3, { { "unsigned int", "fd" }, { "unsigned int", "cmd" }, { "unsigned long", "arg" } } },
{ 55, "fcntl", 3, { { "unsigned int", "fd" }, { "unsigned int", "cmd" }, { "unsigned long", "arg" } } },
{ 57, "setpgid", 2, { { "pid_t", "pid" }, { "pid_t", "pgid" } } },
{ 60, "umask", 1, { { "int", "mask" } } },
{ 61, "chroot", 1, { { "const char *", "filename" } } },
{ 62, "ustat", 2, { { "unsigned", "dev" }, { "struct ustat *", "ubuf" } } },
{ 63, "dup2", 2, { { "unsigned int", "oldfd" }, { "unsigned int", "newfd" } } },
{ 64, "getppid", 0, {} },
{ 65, "getpgrp", 0, {} },
{ 66, "setsid", 0, {} },
{ 67, "sigaction", 3, { { "int", "sig" }, { "const struct old_sigaction *", "act" }, { "struct old_sigaction *", "oact" } } },
{ 70, "setreuid", 2, { { "uid_t", "ruid" }, { "uid_t", "euid" } } },
{ 71, "setregid", 2, { { "gid_t", "rgid" }, { "gid_t", "egid" } } },
{ 72, "sigsuspend", 3, { { "int", "unused1" }, { "int", "unused2" }, { "old_sigset_t", "mask" } } },
{ 73, "sigpending", 1, { { "old_sigset_t *", "uset" } } },
{ 74, "sethostname", 2, { { "char *", "name" }, { "int", "len" } } },
{ 75, "setrlimit", 2, { { "unsigned int", "resource" }, { "struct rlimit *", "rlim" } } },
{ 76, "getrlimit", 2, { { "unsigned int", "resource" }, { "struct rlimit *", "rlim" } } },
{ 77, "getrusage", 2, { { "int", "who" }, { "struct rusage *", "ru" } } },
{ 78, "gettimeofday", 2, { { "struct __kernel_old_timeval *", "tv" }, { "struct timezone *", "tz" } } },
{ 79, "settimeofday", 2, { { "struct __kernel_old_timeval *", "tv" }, { "struct timezone *", "tz" } } },
{ 80, "getgroups", 2, { { "int", "gidsetsize" }, { "gid_t *", "grouplist" } } },
{ 81, "setgroups", 2, { { "int", "gidsetsize" }, { "gid_t *", "grouplist" } } },
{ 82, "select", 5, { { "int", "n" }, { "fd_set *", "inp" }, { "fd_set *", "outp" }, { "fd_set *", "exp" }, { "struct __kernel_old_timeval *", "tvp" } } },
{ 83, "symlink", 2, { { "const char *", "oldname" }, { "const char *", "newname" } } },
{ 85, "readlink", 3, { { "const char *", "path" }, { "char *", "buf" }, { "int", "bufsiz" } } },
{ 86, "uselib", 1, { { "const char *", "library" } } },
{ 87, "swapon", 2, { { "const char *", "specialfile" }, { "int", "swap_flags" } } },
{ 88, "reboot", 4, { { "int", "magic1" }, { "int", "magic2" }, { "unsigned int", "cmd" }, { "void *", "arg" } } },
{ 89, "readdir", 3, { { "unsigned", "int" }, { "struct old_linux_dirent *", "arg1" }, { "unsigned", "int" } } },
{ 90, "mmap", 1, { { "struct mmap_arg_struct *", "arg" } } },
{ 91, "munmap", 2, { { "unsigned long", "addr" }, { "size_t", "len" } } },
{ 92, "truncate", 2, { { "const char *", "path" }, { "long", "length" } } },
{ 93, "ftruncate", 2, { { "unsigned int", "fd" }, { "off_t", "length" } } },
{ 94, "fchmod", 2, { { "unsigned int", "fd" }, { "umode_t", "mode" } } },
{ 95, "fchown", 3, { { "unsigned int", "fd" }, { "uid_t", "user" }, { "gid_t", "group" } } },
{ 96, "getpriority", 2, { { "int", "which" }, { "int", "who" } } },
{ 97, "setpriority", 3, { { "int", "which" }, { "int", "who" }, { "int", "niceval" } } },
{ 99, "statfs", 2, { { "const char *", "pathname" }, { "struct statfs *", "buf" } } },
{ 100, "fstatfs", 2, { { "unsigned int", "fd" }, { "struct statfs *", "buf" } } },
{ 102, "socketcall", 2, { { "int", "call" }, { "unsigned long *", "args" } } },
{ 103, "syslog", 3, { { "int", "type" }, { "char *", "buf" }, { "int", "len" } } },
{ 104, "setitimer", 3, { { "int", "which" }, { "struct __kernel_old_itimerval *", "value" }, { "struct __kernel_old_itimerval *", "ovalue" } } },
{ 105, "getitimer", 2, { { "int", "which" }, { "struct __kernel_old_itimerval *", "value" } } },
{ 106, "stat", 2, { { "const char *", "filename" }, { "struct stat *", "statbuf" } } },
{ 107, "lstat", 2, { { "const char *", "filename" }, { "struct stat *", "statbuf" } } },
{ 108, "fstat", 2, { { "unsigned int", "fd" }, { "struct stat *", "statbuf" } } },
{ 111, "vhangup", 0, {} },
{ 114, "wait4", 4, { { "pid_t", "upid" }, { "int *", "stat_addr" }, { "int", "options" }, { "struct rusage *", "ru" } } },
{ 115, "swapoff", 1, { { "const char *", "specialfile" } } },
{ 116, "sysinfo", 1, { { "struct sysinfo *", "info" } } },
{ 117, "ipc", 6, { { "unsigned int", "call" }, { "int", "first" }, { "unsigned long", "second" }, { "unsigned long", "third" }, { "void *", "ptr" }, { "long", "fifth" } } },
{ 118, "fsync", 1, { { "unsigned int", "fd" } } },
{ 120, "clone", 5, { { "unsigned long", "clone_flags" }, { "unsigned long", "newsp" }, { "int *", "parent_tidptr" }, { "int *", "child_tidptr" }, { "unsigned long", "tls" } } },
{ 121, "setdomainname", 2, { { "char *", "name" }, { "int", "len" } } },
{ 122, "uname", 1, { { "struct new_utsname *", "name" } } },
{ 124, "adjtimex", 1, { { "struct old_timex32 *", "txc_p" } } },
{ 125, "mprotect", 3, { { "unsigned long", "start" }, { "size_t", "len" }, { "unsigned long", "prot" } } },
{ 126, "sigprocmask", 3, { { "int", "how" }, { "old_sigset_t *", "nset" }, { "old_sigset_t *", "oset" } } },
{ 128, "init_module", 3, { { "void *", "umod" }, { "unsigned long", "len" }, { "const char *", "uargs" } } },
{ 129, "delete_module", 2, { { "const char *", "name_user" }, { "unsigned int", "flags" } } },
{ 131, "quotactl", 4, { { "unsigned int", "cmd" }, { "const char *", "special" }, { "qid_t", "id" }, { "void *", "addr" } } },
{ 132, "getpgid", 1, { { "pid_t", "pid" } } },
{ 133, "fchdir", 1, { { "unsigned int", "fd" } } },
{ 134, "bdflush", 0, {} },
{ 135, "sysfs", 3, { { "int", "option" }, { "unsigned long", "arg1" }, { "unsigned long", "arg2" } } },
{ 136, "personality", 1, { { "unsigned int", "personality" } } },
{ 138, "setfsuid", 1, { { "uid_t", "uid" } } },
{ 139, "setfsgid", 1, { { "gid_t", "gid" } } },
{ 140, "_llseek", 5, { { "unsigned int", "fd" }, { "unsigned long", "offset_high" }, { "unsigned long", "offset_low" }, { "loff_t *", "result" }, { "unsigned int", "whence" } } },
{ 141, "getdents", 3, { { "unsigned int", "fd" }, { "struct linux_dirent *", "dirent" }, { "unsigned int", "count" } } },
{ 142, "_newselect", 5, { { "int", "n" }, { "fd_set *", "inp" }, { "fd_set *", "outp" }, { "fd_set *", "exp" }, { "struct __kernel_old_timeval *", "tvp" } } },
{ 143, "flock", 2, { { "unsigned int", "fd" }, { "unsigned int", "cmd" } } },
{ 144, "msync", 3, { { "unsigned long", "start" }, { "size_t", "len" }, { "int", "flags" } } },
{ 145, "readv", 3, { { "unsigned long", "fd" }, { "const struct iovec *", "vec" }, { "unsigned long", "vlen" } } },
{ 146, "writev", 3, { { "unsigned long", "fd" }, { "const struct iovec *", "vec" }, { "unsigned long", "vlen" } } },
{ 147, "getsid", 1, { { "pid_t", "pid" } } },
{ 148, "fdatasync", 1, { { "unsigned int", "fd" } } },
{ 149, "_sysctl", 0, {} },
{ 150, "mlock", 2, { { "unsigned long", "start" }, { "size_t", "len" } } },
{ 151, "munlock", 2, { { "unsigned long", "start" }, { "size_t", "len" } } },
{ 152, "mlockall", 1, { { "int", "flags" } } },
{ 153, "munlockall", 0, {} },
{ 154, "sched_setparam", 2, { { "pid_t", "pid" }, { "struct sched_param *", "param" } } },
{ 155, "sched_getparam", 2, { { "pid_t", "pid" }, { "struct sched_param *", "param" } } },
{ 156, "sched_setscheduler", 3, { { "pid_t", "pid" }, { "int", "policy" }, { "struct sched_param *", "param" } } },
{ 157, "sched_getscheduler", 1, { { "pid_t", "pid" } } },
{ 158, "sched_yield", 0, {} },
{ 159, "sched_get_priority_max", 1, { { "int", "policy" } } },
{ 160, "sched_get_priority_min", 1, { { "int", "policy" } } },
{ 161, "sched_rr_get_interval", 2, { { "pid_t", "pid" }, { "struct __kernel_timespec *", "interval" } } },
{ 162, "nanosleep", 2, { { "struct old_timespec32 *", "rqtp" }, { "struct old_timespec32 *", "rmtp" } } },
{ 163, "mremap", 5, { { "unsigned long", "addr" }, { "unsigned long", "old_len" }, { "unsigned long", "new_len" }, { "unsigned long", "flags" }, { "unsigned long", "new_addr" } } },
{ 164, "setresuid", 3, { { "uid_t", "ruid" }, { "uid_t", "euid" }, { "uid_t", "suid" } } },
{ 165, "getresuid", 3, { { "uid_t *", "ruidp" }, { "uid_t *", "euidp" }, { "uid_t *", "suidp" } } },
{ 168, "poll", 3, { { "struct pollfd *", "ufds" }, { "unsigned int", "nfds" }, { "int", "timeout_msecs" } } },
{ 170, "setresgid", 3, { { "gid_t", "rgid" }, { "gid_t", "egid" }, { "gid_t", "sgid" } } },
{ 171, "getresgid", 3, { { "gid_t *", "rgidp" }, { "gid_t *", "egidp" }, { "gid_t *", "sgidp" } } },
{ 172, "prctl", 5, { { "int", "option" }, { "unsigned long", "arg2" }, { "unsigned long", "arg3" }, { "unsigned long", "arg4" }, { "unsigned long", "arg5" } } },
{ 174, "rt_sigaction", 4, { { "int", "sig" }, { "const struct sigaction *", "act" }, { "struct sigaction *", "oact" }, { "size_t", "sigsetsize" } } },
{ 175, "rt_sigprocmask", 4, { { "int", "how" }, { "sigset_t *", "nset" }, { "sigset_t *", "oset" }, { "size_t", "sigsetsize" } } },
{ 176, "rt_sigpending", 2, { { "sigset_t *", "uset" }, { "size_t", "sigsetsize" } } },
{ 177, "rt_sigtimedwait", 4, { { "const sigset_t *", "uthese" }, { "siginfo_t *", "uinfo" }, { "const struct __kernel_timespec *", "uts" }, { "size_t", "sigsetsize" } } },
{ 178, "rt_sigqueueinfo", 3, { { "pid_t", "pid" }, { "int", "sig" }, { "siginfo_t *", "uinfo" } } },
{ 179, "rt_sigsuspend", 2, { { "sigset_t *", "unewset" }, { "size_t", "sigsetsize" } } },
{ 180, "pread64", 4, { { "unsigned int", "fd" }, { "char *", "buf" }, { "size_t", "count" }, { "loff_t", "pos" } } },
{ 181, "pwrite64", 4, { { "unsigned int", "fd" }, { "const char *", "buf" }, { "size_t", "count" }, { "loff_t", "pos" } } },
{ 182, "chown", 3, { { "const char *", "filename" }, { "uid_t", "user" }, { "gid_t", "group" } } },
{ 183, "getcwd", 2, { { "char *", "buf" }, { "unsigned long", "size" } } },
{ 184, "capget", 2, { { "cap_user_header_t", "header" }, { "cap_user_data_t", "dataptr" } } },
{ 185, "capset", 2, { { "cap_user_header_t", "header" }, { "const cap_user_data_t", "data" } } },
{ 186, "sigaltstack", 2, { { "const stack_t *", "uss" }, { "stack_t *", "uoss" } } },
{ 187, "sendfile", 4, { { "int", "out_fd" }, { "int", "in_fd" }, { "off_t *", "offset" }, { "size_t", "count" } } },
{ 190, "vfork", 0, {} },
{ 191, "ugetrlimit", 2, { { "unsigned int", "resource" }, { "struct rlimit *", "rlim" } } },
{ 193, "truncate64", 2, { { "const char *", "path" }, { "loff_t", "length" } } },
{ 194, "ftruncate64", 2, { { "unsigned int", "fd" }, { "loff_t", "length" } } },
{ 195, "stat64", 2, { { "const char *", "filename" }, { "struct stat64 *", "statbuf" } } },
{ 196, "lstat64", 2, { { "const char *", "filename" }, { "struct stat64 *", "statbuf" } } },
{ 197, "fstat64", 2, { { "unsigned long", "fd" }, { "struct stat64 *", "statbuf" } } },
{ 198, "lchown32", 3, { { "const char *", "filename" }, { "uid_t", "user" }, { "gid_t", "group" } } },
{ 199, "getuid32", 0, {} },
{ 200, "getgid32", 0, {} },
{ 201, "geteuid32", 0, {} },
{ 202, "getegid32", 0, {} },
{ 203, "setreuid32", 2, { { "uid_t", "ruid" }, { "uid_t", "euid" } } },
{ 204, "setregid32", 2, { { "gid_t", "rgid" }, { "gid_t", "egid" } } },
{ 205, "getgroups32", 2, { { "int", "gidsetsize" }, { "gid_t *", "grouplist" } } },
{ 206, "setgroups32", 2, { { "int", "gidsetsize" }, { "gid_t *", "grouplist" } } },
{ 207, "fchown32", 3, { { "unsigned int", "fd" }, { "uid_t", "user" }, { "gid_t", "group" } } },
{ 208, "setresuid32", 3, { { "uid_t", "ruid" }, { "uid_t", "euid" }, { "uid_t", "suid" } } },
{ 209, "getresuid32", 3, { { "uid_t *", "ruid" }, { "uid_t *", "euid" }, { "uid_t *", "suid" } } },
{ 210, "setresgid32", 3, { { "gid_t", "rgid" }, { "gid_t", "egid" }, { "gid_t", "sgid" } } },
{ 211, "getresgid32", 3, { { "gid_t *", "rgid" }, { "gid_t *", "egid" }, { "gid_t *", "sgid" } } },
{ 212, "chown32", 3, { { "const char *", "filename" }, { "uid_t", "user" }, { "gid_t", "group" } } },
{ 213, "setuid32", 1, { { "uid_t", "uid" } } },
{ 214, "setgid32", 1, { { "gid_t", "gid" } } },
{ 215, "setfsuid32", 1, { { "uid_t", "uid" } } },
{ 216, "setfsgid32", 1, { { "gid_t", "gid" } } },
{ 217, "getdents64", 3, { { "unsigned int", "fd" }, { "struct linux_dirent64 *", "dirent" }, { "unsigned int", "count" } } },
{ 218, "pivot_root", 2, { { "const char *", "new_root" }, { "const char *", "put_old" } } },
{ 219, "mincore", 3, { { "unsigned long", "start" }, { "size_t", "len" }, { "unsigned char *", "vec" } } },
{ 220, "madvise", 3, { { "unsigned long", "start" }, { "size_t", "len_in" }, { "int", "behavior" } } },
{ 221, "fcntl64", 3, { { "unsigned int", "fd" }, { "unsigned int", "cmd" }, { "unsigned long", "arg" } } },
{ 224, "gettid", 0, {} },
{ 225, "readahead", 3, { { "int", "fd" }, { "loff_t", "offset" }, { "size_t", "count" } } },
{ 226, "setxattr", 5, { { "const char *", "pathname" }, { "const char *", "name" }, { "const void *", "value" }, { "size_t", "size" }, { "int", "flags" } } },
{ 227, "lsetxattr", 5, { { "const char *", "pathname" }, { "const char *", "name" }, { "const void *", "value" }, { "size_t", "size" }, { "int", "flags" } } },
{ 228, "fsetxattr", 5, { { "int", "fd" }, { "const char *", "name" }, { "const void *", "value" }, { "size_t", "size" }, { "int", "flags" } } },
{ 229, "getxattr", 4, { { "const char *", "pathname" }, { "const char *", "name" }, { "void *", "value" }, { "size_t", "size" } } },
{ 230, "lgetxattr", 4, { { "const char *", "pathname" }, { "const char *", "name" }, { "void *", "value" }, { "size_t", "size" } } },
{ 231, "fgetxattr", 4, { { "int", "fd" }, { "const char *", "name" }, { "void *", "value" }, { "size_t", "size" } } },
{ 232, "listxattr", 3, { { "const char *", "pathname" }, { "char *", "list" }, { "size_t", "size" } } },
{ 233, "llistxattr", 3, { { "const char *", "pathname" }, { "char *", "list" }, { "size_t", "size" } } },
{ 234, "flistxattr", 3, { { "int", "fd" }, { "char *", "list" }, { "size_t", "size" } } },
{ 235, "removexattr", 2, { { "const char *", "pathname" }, { "const char *", "name" } } },
{ 236, "lremovexattr", 2, { { "const char *", "pathname" }, { "const char *", "name" } } },
{ 237, "fremovexattr", 2, { { "int", "fd" }, { "const char *", "name" } } },
{ 238, "tkill", 2, { { "pid_t", "pid" }, { "int", "sig" } } },
{ 239, "sendfile64", 4, { { "int", "out_fd" }, { "int", "in_fd" }, { "loff_t *", "offset" }, { "size_t", "count" } } },
{ 240, "futex", 6, { { "u32 *", "uaddr" }, { "int", "op" }, { "u32", "val" }, { "const struct __kernel_timespec *", "utime" }, { "u32 *", "uaddr2" }, { "u32", "val3" } } },
{ 241, "sched_setaffinity", 3, { { "pid_t", "pid" }, { "unsigned int", "len" }, { "unsigned long *", "user_mask_ptr" } } },
{ 242, "sched_getaffinity", 3, { { "pid_t", "pid" }, { "unsigned int", "len" }, { "unsigned long *", "user_mask_ptr" } } },
{ 243, "io_setup", 2, { { "unsigned", "nr_events" }, { "aio_context_t *", "ctxp" } } },
{ 244, "io_destroy", 1, { { "aio_context_t", "ctx" } } },
{ 245, "io_getevents", 5, { { "__u32", "ctx_id" }, { "__s32", "min_nr" }, { "__s32", "nr" }, { "struct io_event *", "events" }, { "struct old_timespec32 *", "timeout" } } },
{ 246, "io_submit", 3, { { "aio_context_t", "ctx_id" }, { "long", "nr" }, { "struct iocb * *", "iocbpp" } } },
{ 247, "io_cancel", 3, { { "aio_context_t", "ctx_id" }, { "struct iocb *", "iocb" }, { "struct io_event *", "result" } } },
{ 248, "exit_group", 1, { { "int", "error_code" } } },
{ 249, "lookup_dcookie", 0, {} },
{ 250, "epoll_create", 1, { { "int", "size" } } },
{ 251, "epoll_ctl", 4, { { "int", "epfd" }, { "int", "op" }, { "int", "fd" }, { "struct epoll_event *", "event" } } },
{ 252, "epoll_wait", 4, { { "int", "epfd" }, { "struct epoll_event *", "events" }, { "int", "maxevents" }, { "int", "timeout" } } },
{ 253, "remap_file_pages", 5, { { "unsigned long", "start" }, { "unsigned long", "size" }, { "unsigned long", "prot" }, { "unsigned long", "pgoff" }, { "unsigned long", "flags" } } },
{ 256, "set_tid_address", 1, { { "int *", "tidptr" } } },
{ 257, "timer_create", 3, { { "const clockid_t", "which_clock" }, { "struct sigevent *", "timer_event_spec" }, { "timer_t *", "created_timer_id" } } },
{ 258, "timer_settime", 4, { { "timer_t", "timer_id" }, { "int", "flags" }, { "const struct __kernel_itimerspec *", "new_setting" }, { "struct __kernel_itimerspec *", "old_setting" } } },
{ 259, "timer_gettime", 2, { { "timer_t", "timer_id" }, { "struct __kernel_itimerspec *", "setting" } } },
{ 260, "timer_getoverrun", 1, { { "timer_t", "timer_id" } } },
{ 261, "timer_delete", 1, { { "timer_t", "timer_id" } } },
{ 262, "clock_settime", 2, { { "const clockid_t", "which_clock" }, { "const struct __kernel_timespec *", "tp" } } },
{ 263, "clock_gettime", 2, { { "const clockid_t", "which_clock" }, { "struct __kernel_timespec *", "tp" } } },
{ 264, "clock_getres", 2, { { "const clockid_t", "which_clock" }, { "struct __kernel_timespec *", "tp" } } },
{ 265, "clock_nanosleep", 4, { { "const clockid_t", "which_clock" }, { "int", "flags" }, { "const struct __kernel_timespec *", "rqtp" }, { "struct __kernel_timespec *", "rmtp" } } },
{ 266, "statfs64", 3, { { "const char *", "pathname" }, { "size_t", "sz" }, { "struct statfs64 *", "buf" } } },
{ 267, "fstatfs64", 3, { { "unsigned int", "fd" }, { "size_t", "sz" }, { "struct statfs64 *", "buf" } } },
{ 268, "tgkill", 3, { { "pid_t", "tgid" }, { "pid_t", "pid" }, { "int", "sig" } } },
{ 269, "utimes", 2, { { "const char *", "filename" }, { "struct old_timeval32 *", "t" } } },
{ 271, "pciconfig_iobase", 3, { { "long", "which" }, { "unsigned long", "bus" }, { "unsigned long", "devfn" } } },
{ 272, "pciconfig_read", 5, { { "unsigned long", "bus" }, { "unsigned long", "dfn" }, { "unsigned long", "off" }, { "unsigned long", "len" }, { "void *", "buf" } } },
{ 273, "pciconfig_write", 5, { { "unsigned long", "bus" }, { "unsigned long", "dfn" }, { "unsigned long", "off" }, { "unsigned long", "len" }, { "void *", "buf" } } },
{ 274, "mq_open", 4, { { "const char *", "u_name" }, { "int", "oflag" }, { "umode_t", "mode" }, { "struct mq_attr *", "u_attr" } } },
{ 275, "mq_unlink", 1, { { "const char *", "u_name" } } },
{ 276, "mq_timedsend", 5, { { "mqd_t", "mqdes" }, { "const char *", "u_msg_ptr" }, { "size_t", "msg_len" }, { "unsigned int", "msg_prio" }, { "const struct __kernel_timespec *", "u_abs_timeout" } } },
{ 277, "mq_timedreceive", 5, { { "mqd_t", "mqdes" }, { "char *", "u_msg_ptr" }, { "size_t", "msg_len" }, { "unsigned int *", "u_msg_prio" }, { "const struct __kernel_timespec *", "u_abs_timeout" } } },
{ 278, "mq_notify", 2, { { "mqd_t", "mqdes" }, { "const struct sigevent *", "u_notification" } } },
{ 279, "mq_getsetattr", 3, { { "mqd_t", "mqdes" }, { "const struct mq_attr *", "u_mqstat" }, { "struct mq_attr *", "u_omqstat" } } },
{ 280, "waitid", 5, { { "int", "which" }, { "pid_t", "upid" }, { "struct siginfo *", "infop" }, { "int", "options" }, { "struct rusage *", "ru" } } },
{ 281, "socket", 3, { { "int", "family" }, { "int", "type" }, { "int", "protocol" } } },
{ 282, "bind", 3, { { "int", "fd" }, { "struct sockaddr *", "umyaddr" }, { "int", "addrlen" } } },
{ 283, "connect", 3, { { "int", "fd" }, { "struct sockaddr *", "uservaddr" }, { "int", "addrlen" } } },
{ 284, "listen", 2, { { "int", "fd" }, { "int", "backlog" } } },
{ 285, "accept", 3, { { "int", "fd" }, { "struct sockaddr *", "upeer_sockaddr" }, { "int *", "upeer_addrlen" } } },
{ 286, "getsockname", 3, { { "int", "fd" }, { "struct sockaddr *", "usockaddr" }, { "int *", "usockaddr_len" } } },
{ 287, "getpeername", 3, { { "int", "fd" }, { "struct sockaddr *", "usockaddr" }, { "int *", "usockaddr_len" } } },
{ 288, "socketpair", 4, { { "int", "family" }, { "int", "type" }, { "int", "protocol" }, { "int *", "usockvec" } } },
{ 289, "send", 4, { { "int", "fd" }, { "void *", "buff" }, { "size_t", "len" }, { "unsigned int", "flags" } } },
{ 290, "sendto", 6, { { "int", "fd" }, { "void *", "buff" }, { "size_t", "len" }, { "unsigned int", "flags" }, { "struct sockaddr *", "addr" }, { "int", "addr_len" } } },
{ 291, "recv", 4, { { "int", "fd" }, { "void *", "ubuf" }, { "size_t", "size" }, { "unsigned int", "flags" } } },
{ 292, "recvfrom", 6, { { "int", "fd" }, { "void *", "ubuf" }, { "size_t", "size" }, { "unsigned int", "flags" }, { "struct sockaddr *", "addr" }, { "int *", "addr_len" } } },
{ 293, "shutdown", 2, { { "int", "fd" }, { "int", "how" } } },
{ 294, "setsockopt", 5, { { "int", "fd" }, { "int", "level" }, { "int", "optname" }, { "char *", "optval" }, { "int", "optlen" } } },
{ 295, "getsockopt", 5, { { "int", "fd" }, { "int", "level" }, { "int", "optname" }, { "char *", "optval" }, { "int *", "optlen" } } },
{ 296, "sendmsg", 3, { { "int", "fd" }, { "struct user_msghdr *", "msg" }, { "unsigned int", "flags" } } },
{ 297, "recvmsg", 3, { { "int", "fd" }, { "struct user_msghdr *", "msg" }, { "unsigned int", "flags" } } },
{ 298, "semop", 3, { { "int", "semid" }, { "struct sembuf *", "tsops" }, { "unsigned", "nsops" } } },
{ 299, "semget", 3, { { "key_t", "key" }, { "int", "nsems" }, { "int", "semflg" } } },
{ 300, "semctl", 4, { { "int", "semid" }, { "int", "semnum" }, { "int", "cmd" }, { "unsigned long", "arg" } } },
{ 301, "msgsnd", 4, { { "int", "msqid" }, { "struct msgbuf *", "msgp" }, { "size_t", "msgsz" }, { "int", "msgflg" } } },
{ 302, "msgrcv", 5, { { "int", "msqid" }, { "struct msgbuf *", "msgp" }, { "size_t", "msgsz" }, { "long", "msgtyp" }, { "int", "msgflg" } } },
{ 303, "msgget", 2, { { "key_t", "key" }, { "int", "msgflg" } } },
{ 304, "msgctl", 3, { { "int", "msqid" }, { "int", "cmd" }, { "struct msqid_ds *", "buf" } } },
{ 305, "shmat", 3, { { "int", "shmid" }, { "char *", "shmaddr" }, { "int", "shmflg" } } },
{ 306, "shmdt", 1, { { "char *", "shmaddr" } } },
{ 307, "shmget", 3, { { "key_t", "key" }, { "size_t", "size" }, { "int", "shmflg" } } },
{ 308, "shmctl", 3, { { "int", "shmid" }, { "int", "cmd" }, { "struct shmid_ds *", "buf" } } },
{ 309, "add_key", 5, { { "const char *", "_type" }, { "const char *", "_description" }, { "const void *", "_payload" }, { "size_t", "plen" }, { "key_serial_t", "ringid" } } },
{ 310, "request_key", 4, { { "const char *", "_type" }, { "const char *", "_description" }, { "const char *", "_callout_info" }, { "key_serial_t", "destringid" } } },
{ 311, "keyctl", 5, { { "int", "option" }, { "unsigned long", "arg2" }, { "unsigned long", "arg3" }, { "unsigned long", "arg4" }, { "unsigned long", "arg5" } } },
{ 312, "semtimedop", 4, { { "int", "semid" }, { "struct sembuf *", "tsops" }, { "unsigned int", "nsops" }, { "const struct __kernel_timespec *", "timeout" } } },
{ 314, "ioprio_set", 3, { { "int", "which" }, { "int", "who" }, { "int", "ioprio" } } },
{ 315, "ioprio_get", 2, { { "int", "which" }, { "int", "who" } } },
{ 316, "inotify_init", 0, {} },
{ 317, "inotify_add_watch", 3, { { "int", "fd" }, { "const char *", "pathname" }, { "u32", "mask" } } },
{ 318, "inotify_rm_watch", 2, { { "int", "fd" }, { "__s32", "wd" } } },
{ 319, "mbind", 6, { { "unsigned long", "start" }, { "unsigned long", "len" }, { "unsigned long", "mode" }, { "const unsigned long *", "nmask" }, { "unsigned long", "maxnode" }, { "unsigned int", "flags" } } },
{ 320, "get_mempolicy", 5, { { "int *", "policy" }, { "unsigned long *", "nmask" }, { "unsigned long", "maxnode" }, { "unsigned long", "addr" }, { "unsigned long", "flags" } } },
{ 321, "set_mempolicy", 3, { { "int", "mode" }, { "const unsigned long *", "nmask" }, { "unsigned long", "maxnode" } } },
{ 322, "openat", 4, { { "int", "dfd" }, { "const char *", "filename" }, { "int", "flags" }, { "umode_t", "mode" } } },
{ 323, "mkdirat", 3, { { "int", "dfd" }, { "const char *", "pathname" }, { "umode_t", "mode" } } },
{ 324, "mknodat", 4, { { "int", "dfd" }, { "const char *", "filename" }, { "umode_t", "mode" }, { "unsigned int", "dev" } } },
{ 325, "fchownat", 5, { { "int", "dfd" }, { "const char *", "filename" }, { "uid_t", "user" }, { "gid_t", "group" }, { "int", "flag" } } },
{ 326, "futimesat", 3, { { "unsigned int", "dfd" }, { "const char *", "filename" }, { "struct old_timeval32 *", "t" } } },
{ 327, "fstatat64", 4, { { "int", "dfd" }, { "const char *", "filename" }, { "struct stat64 *", "statbuf" }, { "int", "flag" } } },
{ 328, "unlinkat", 3, { { "int", "dfd" }, { "const char *", "pathname" }, { "int", "flag" } } },
{ 329, "renameat", 4, { { "int", "olddfd" }, { "const char *", "oldname" }, { "int", "newdfd" }, { "const char *", "newname" } } },
{ 330, "linkat", 5, { { "int", "olddfd" }, { "const char *", "oldname" }, { "int", "newdfd" }, { "const char *", "newname" }, { "int", "flags" } } },
{ 331, "symlinkat", 3, { { "const char *", "oldname" }, { "int", "newdfd" }, { "const char *", "newname" } } },
{ 332, "readlinkat", 4, { { "int", "dfd" }, { "const char *", "pathname" }, { "char *", "buf" }, { "int", "bufsiz" } } },
{ 333, "fchmodat", 3, { { "int", "dfd" }, { "const char *", "filename" }, { "umode_t", "mode" } } },
{ 334, "faccessat", 3, { { "int", "dfd" }, { "const char *", "filename" }, { "int", "mode" } } },
{ 335, "pselect6", 6, { { "int", "n" }, { "fd_set *", "inp" }, { "fd_set *", "outp" }, { "fd_set *", "exp" }, { "struct __kernel_timespec *", "tsp" }, { "void *", "sig" } } },
{ 336, "ppoll", 5, { { "struct pollfd *", "ufds" }, { "unsigned int", "nfds" }, { "struct __kernel_timespec *", "tsp" }, { "const sigset_t *", "sigmask" }, { "size_t", "sigsetsize" } } },
{ 337, "unshare", 1, { { "unsigned long", "unshare_flags" } } },
{ 338, "set_robust_list", 2, { { "struct robust_list_head *", "head" }, { "size_t", "len" } } },
{ 339, "get_robust_list", 3, { { "int", "pid" }, { "struct robust_list_head * *", "head_ptr" }, { "size_t *", "len_ptr" } } },
{ 340, "splice", 6, { { "int", "fd_in" }, { "loff_t *", "off_in" }, { "int", "fd_out" }, { "loff_t *", "off_out" }, { "size_t", "len" }, { "unsigned int", "flags" } } },
{ 341, "arm_sync_file_range", 4, { { "int", "fd" }, { "unsigned int", "flags" }, { "loff_t", "offset" }, { "loff_t", "nbytes" } } },
{ 342, "tee", 4, { { "int", "fdin" }, { "int", "fdout" }, { "size_t", "len" }, { "unsigned int", "flags" } } },
{ 343, "vmsplice", 4, { { "int", "fd" }, { "const struct iovec *", "uiov" }, { "unsigned long", "nr_segs" }, { "unsigned int", "flags" } } },
{ 344, "move_pages", 6, { { "pid_t", "pid" }, { "unsigned long", "nr_pages" }, { "const void * *", "pages" }, { "const int *", "nodes" }, { "int *", "status" }, { "int", "flags" } } },
{ 345, "getcpu", 3, { { "unsigned *", "cpup" }, { "unsigned *", "nodep" }, { "struct getcpu_cache *", "unused" } } },
{ 346, "epoll_pwait", 6, { { "int", "epfd" }, { "struct epoll_event *", "events" }, { "int", "maxevents" }, { "int", "timeout" }, { "const sigset_t *", "sigmask" }, { "size_t", "sigsetsize" } } },
{ 347, "kexec_load", 4, { { "unsigned long", "entry" }, { "unsigned long", "nr_segments" }, { "struct kexec_segment *", "segments" }, { "unsigned long", "flags" } } },
{ 348, "utimensat", 4, { { "int", "dfd" }, { "const char *", "filename" }, { "struct __kernel_timespec *", "utimes" }, { "int", "flags" } } },
{ 349, "signalfd", 3, { { "int", "ufd" }, { "sigset_t *", "user_mask" }, { "size_t", "sizemask" } } },
{ 350, "timerfd_create", 2, { { "int", "clockid" }, { "int", "flags" } } },
{ 351, "eventfd", 1, { { "unsigned int", "count" } } },
{ 352, "fallocate", 4, { { "int", "fd" }, { "int", "mode" }, { "loff_t", "offset" }, { "loff_t", "len" } } },
{ 353, "timerfd_settime", 4, { { "int", "ufd" }, { "int", "flags" }, { "const struct __kernel_itimerspec *", "utmr" }, { "struct __kernel_itimerspec *", "otmr" } } },
{ 354, "timerfd_gettime", 2, { { "int", "ufd" }, { "struct __kernel_itimerspec *", "otmr" } } },
{ 355, "signalfd4", 4, { { "int", "ufd" }, { "sigset_t *", "user_mask" }, { "size_t", "sizemask" }, { "int", "flags" } } },
{ 356, "eventfd2", 2, { { "unsigned int", "count" }, { "int", "flags" } } },
{ 357, "epoll_create1", 1, { { "int", "flags" } } },
{ 358, "dup3", 3, { { "unsigned int", "oldfd" }, { "unsigned int", "newfd" }, { "int", "flags" } } },
{ 359, "pipe2", 2, { { "int *", "fildes" }, { "int", "flags" } } },
{ 360, "inotify_init1", 1, { { "int", "flags" } } },
{ 361, "preadv", 5, { { "unsigned long", "fd" }, { "const struct iovec *", "vec" }, { "unsigned long", "vlen" }, { "unsigned long", "pos_l" }, { "unsigned long", "pos_h" } } },
{ 362, "pwritev", 5, { { "unsigned long", "fd" }, { "const struct iovec *", "vec" }, { "unsigned long", "vlen" }, { "unsigned long", "pos_l" }, { "unsigned long", "pos_h" } } },
{ 363, "rt_tgsigqueueinfo", 4, { { "pid_t", "tgid" }, { "pid_t", "pid" }, { "int", "sig" }, { "siginfo_t *", "uinfo" } } },
{ 364, "perf_event_open", 5, { { "struct perf_event_attr *", "attr_uptr" }, { "pid_t", "pid" }, { "int", "cpu" }, { "int", "group_fd" }, { "unsigned long", "flags" } } },
{ 365, "recvmmsg", 5, { { "int", "fd" }, { "struct mmsghdr *", "mmsg" }, { "unsigned int", "vlen" }, { "unsigned int", "flags" }, { "struct __kernel_timespec *", "timeout" } } },
{ 366, "accept4", 4, { { "int", "fd" }, { "struct sockaddr *", "upeer_sockaddr" }, { "int *", "upeer_addrlen" }, { "int", "flags" } } },
{ 367, "fanotify_init", 2, { { "unsigned int", "flags" }, { "unsigned int", "event_f_flags" } } },
{ 368, "fanotify_mark", 5, { { "int", "fanotify_fd" }, { "unsigned int", "flags" }, { "__u64", "mask" }, { "int", "dfd" }, { "const char *", "pathname" } } },
{ 369, "prlimit64", 4, { { "pid_t", "pid" }, { "unsigned int", "resource" }, { "const struct rlimit64 *", "new_rlim" }, { "struct rlimit64 *", "old_rlim" } } },
{ 370, "name_to_handle_at", 5, { { "int", "dfd" }, { "const char *", "name" }, { "struct file_handle *", "handle" }, { "void *", "mnt_id" }, { "int", "flag" } } },
{ 371, "open_by_handle_at", 3, { { "int", "mountdirfd" }, { "struct file_handle *", "handle" }, { "int", "flags" } } },
{ 372, "clock_adjtime", 2, { { "const clockid_t", "which_clock" }, { "struct __kernel_timex *", "utx" } } },
{ 373, "syncfs", 1, { { "int", "fd" } } },
{ 374, "sendmmsg", 4, { { "int", "fd" }, { "struct mmsghdr *", "mmsg" }, { "unsigned int", "vlen" }, { "unsigned int", "flags" } } },
{ 375, "setns", 2, { { "int", "fd" }, { "int", "flags" } } },
{ 376, "process_vm_readv", 6, { { "pid_t", "pid" }, { "const struct iovec *", "lvec" }, { "unsigned long", "liovcnt" }, { "const struct iovec *", "rvec" }, { "unsigned long", "riovcnt" }, { "unsigned long", "flags" } } },
{ 377, "process_vm_writev", 6, { { "pid_t", "pid" }, { "const struct iovec *", "lvec" }, { "unsigned long", "liovcnt" }, { "const struct iovec *", "rvec" }, { "unsigned long", "riovcnt" }, { "unsigned long", "flags" } } },
{ 378, "kcmp", 5, { { "pid_t", "pid1" }, { "pid_t", "pid2" }, { "int", "type" }, { "unsigned long", "idx1" }, { "unsigned long", "idx2" } } },
{ 379, "finit_module", 3, { { "int", "fd" }, { "const char *", "uargs" }, { "int", "flags" } } },
{ 380, "sched_setattr", 3, { { "pid_t", "pid" }, { "struct sched_attr *", "uattr" }, { "unsigned int", "flags" } } },
{ 381, "sched_getattr", 4, { { "pid_t", "pid" }, { "struct sched_attr *", "uattr" }, { "unsigned int", "usize" }, { "unsigned int", "flags" } } },
{ 382, "renameat2", 5, { { "int", "olddfd" }, { "const char *", "oldname" }, { "int", "newdfd" }, { "const char *", "newname" }, { "unsigned int", "flags" } } },
{ 383, "seccomp", 3, { { "unsigned int", "op" }, { "unsigned int", "flags" }, { "void *", "uargs" } } },
{ 384, "getrandom", 3, { { "char *", "ubuf" }, { "size_t", "len" }, { "unsigned int", "flags" } } },
{ 385, "memfd_create", 2, { { "const char *", "uname" }, { "unsigned int", "flags" } } },
{ 386, "bpf", 3, { { "int", "cmd" }, { "union bpf_attr *", "uattr" }, { "unsigned int", "size" } } },
{ 387, "execveat", 5, { { "int", "fd" }, { "const char *", "filename" }, { "const char *const *", "argv" }, { "const char *const *", "envp" }, { "int", "flags" } } },
{ 388, "userfaultfd", 1, { { "int", "flags" } } },
{ 389, "membarrier", 3, { { "int", "cmd" }, { "unsigned int", "flags" }, { "int", "cpu_id" } } },
{ 390, "mlock2", 3, { { "unsigned long", "start" }, { "size_t", "len" }, { "int", "flags" } } },
{ 391, "copy_file_range", 6, { { "int", "fd_in" }, { "loff_t *", "off_in" }, { "int", "fd_out" }, { "loff_t *", "off_out" }, { "size_t", "len" }, { "unsigned int", "flags" } } },
{ 392, "preadv2", 6, { { "unsigned long", "fd" }, { "const struct iovec *", "vec" }, { "unsigned long", "vlen" }, { "unsigned long", "pos_l" }, { "unsigned long", "pos_h" }, { "rwf_t", "flags" } } },
{ 393, "pwritev2", 6, { { "unsigned long", "fd" }, { "const struct iovec *", "vec" }, { "unsigned long", "vlen" }, { "unsigned long", "pos_l" }, { "unsigned long", "pos_h" }, { "rwf_t", "flags" } } },
{ 394, "pkey_mprotect", 4, { { "unsigned long", "start" }, { "size_t", "len" }, { "unsigned long", "prot" }, { "int", "pkey" } } },
{ 395, "pkey_alloc", 2, { { "unsigned long", "flags" }, { "unsigned long", "init_val" } } },
{ 396, "pkey_free", 1, { { "int", "pkey" } } },
{ 397, "statx", 5, { { "int", "dfd" }, { "const char *", "filename" }, { "unsigned", "flags" }, { "unsigned int", "mask" }, { "struct statx *", "buffer" } } },
{ 398, "rseq", 4, { { "struct rseq *", "rseq" }, { "u32", "rseq_len" }, { "int", "flags" }, { "u32", "sig" } } },
{ 399, "io_pgetevents", 6, { { "aio_context_t", "ctx_id" }, { "long", "min_nr" }, { "long", "nr" }, { "struct io_event *", "events" }, { "struct __kernel_timespec *", "timeout" }, { "const struct __aio_sigset *", "usig" } } },
{ 400, "migrate_pages", 4, { { "pid_t", "pid" }, { "unsigned long", "maxnode" }, { "const unsigned long *", "old_nodes" }, { "const unsigned long *", "new_nodes" } } },
{ 401, "kexec_file_load", 5, { { "int", "kernel_fd" }, { "int", "initrd_fd" }, { "unsigned long", "cmdline_len" }, { "const char *", "cmdline_ptr" }, { "unsigned long", "flags" } } },
{ 403, "clock_gettime64", 2, { { "clockid_t", "which_clock" }, { "struct __kernel_timespec *", "tp" } } },
{ 404, "clock_settime64", 2, { { "clockid_t", "which_clock" }, { "const struct __kernel_timespec *", "tp" } } },
{ 405, "clock_adjtime64", 2, { { "clockid_t", "which_clock" }, { "struct __kernel_timex *", "tx" } } },
{ 406, "clock_getres_time64", 2, { { "clockid_t", "which_clock" }, { "struct __kernel_timespec *", "tp" } } },
{ 407, "clock_nanosleep_time64", 4, { { "clockid_t", "which_clock" }, { "int", "flags" }, { "const struct __kernel_timespec *", "rqtp" }, { "struct __kernel_timespec *", "rmtp" } } },
{ 408, "timer_gettime64", 2, { { "timer_t", "timer_id" }, { "struct __kernel_itimerspec *", "setting" } } },
{ 409, "timer_settime64", 4, { { "timer_t", "timer_id" }, { "int", "flags" }, { "const struct __kernel_itimerspec *", "new_setting" }, { "struct __kernel_itimerspec *", "old_setting" } } },
{ 410, "timerfd_gettime64", 2, { { "int", "ufd" }, { "struct __kernel_itimerspec *", "otmr" } } },
{ 411, "timerfd_settime64", 4, { { "int", "ufd" }, { "int", "flags" }, { "const struct __kernel_itimerspec *", "utmr" }, { "struct __kernel_itimerspec *", "otmr" } } },
{ 412, "utimensat_time64", 4, { { "int", "dfd" }, { "const char *", "filename" }, { "struct __kernel_timespec *", "utimes" }, { "int", "flags" } } },
{ 413, "pselect6_time64", 6, { { "int", "arg0" }, { "fd_set *", "arg1" }, { "fd_set *", "arg2" }, { "fd_set *", "arg3" }, { "struct __kernel_timespec *", "arg4" }, { "void *", "arg5" } } },
{ 414, "ppoll_time64", 5, { { "struct pollfd *", "arg0" }, { "unsigned", "int" }, { "struct __kernel_timespec *", "arg2" }, { "const sigset_t *", "arg3" }, { "size_t", "arg4" } } },
{ 416, "io_pgetevents_time64", 6, { { "aio_context_t", "ctx_id" }, { "long", "min_nr" }, { "long", "nr" }, { "struct io_event *", "events" }, { "struct __kernel_timespec *", "timeout" }, { "const struct __aio_sigset *", "sig" } } },
{ 417, "recvmmsg_time64", 5, { { "int", "fd" }, { "struct compat_mmsghdr *", "mmsg" }, { "unsigned int", "vlen" }, { "unsigned int", "flags" }, { "struct __kernel_timespec *", "timeout" } } },
{ 418, "mq_timedsend_time64", 5, { { "mqd_t", "mqdes" }, { "const char *", "msg_ptr" }, { "size_t", "msg_len" }, { "unsigned int", "msg_prio" }, { "const struct __kernel_timespec *", "abs_timeout" } } },
{ 419, "mq_timedreceive_time64", 5, { { "mqd_t", "mqdes" }, { "char *", "msg_ptr" }, { "size_t", "msg_len" }, { "unsigned int *", "msg_prio" }, { "const struct __kernel_timespec *", "abs_timeout" } } },
{ 420, "semtimedop_time64", 4, { { "int", "semid" }, { "struct sembuf *", "sops" }, { "unsigned", "nsops" }, { "const struct __kernel_timespec *", "timeout" } } },
{ 421, "rt_sigtimedwait_time64", 4, { { "const sigset_t *", "uthese" }, { "siginfo_t *", "uinfo" }, { "const struct __kernel_timespec *", "uts" }, { "size_t", "sigsetsize" } } },
{ 422, "futex_time64", 6, { { "u32 *", "uaddr" }, { "int", "op" }, { "u32", "val" }, { "const struct __kernel_timespec *", "utime" }, { "u32 *", "uaddr2" }, { "u32", "val3" } } },
{ 423, "sched_rr_get_interval_time64", 2, { { "pid_t", "pid" }, { "struct __kernel_timespec *", "interval" } } },
{ 424, "pidfd_send_signal", 4, { { "int", "pidfd" }, { "int", "sig" }, { "siginfo_t *", "info" }, { "unsigned int", "flags" } } },
{ 425, "io_uring_setup", 2, { { "u32", "entries" }, { "struct io_uring_params *", "params" } } },
{ 426, "io_uring_enter", 6, { { "unsigned int", "fd" }, { "u32", "to_submit" }, { "u32", "min_complete" }, { "u32", "flags" }, { "const void *", "argp" }, { "size_t", "argsz" } } },
{ 427, "io_uring_register", 4, { { "unsigned int", "fd" }, { "unsigned int", "opcode" }, { "void *", "arg" }, { "unsigned int", "nr_args" } } },
{ 428, "open_tree", 3, { { "int", "dfd" }, { "const char *", "filename" }, { "unsigned", "flags" } } },
{ 429, "move_mount", 5, { { "int", "from_dfd" }, { "const char *", "from_pathname" }, { "int", "to_dfd" }, { "const char *", "to_pathname" }, { "unsigned int", "flags" } } },
{ 430, "fsopen", 2, { { "const char *", "_fs_name" }, { "unsigned int", "flags" } } },
{ 431, "fsconfig", 5, { { "int", "fd" }, { "unsigned int", "cmd" }, { "const char *", "_key" }, { "const void *", "_value" }, { "int", "aux" } } },
{ 432, "fsmount", 3, { { "int", "fs_fd" }, { "unsigned int", "flags" }, { "unsigned int", "attr_flags" } } },
{ 433, "fspick", 3, { { "int", "dfd" }, { "const char *", "path" }, { "unsigned int", "flags" } } },
{ 434, "pidfd_open", 2, { { "pid_t", "pid" }, { "unsigned int", "flags" } } },
{ 435, "clone3", 2, { { "struct clone_args *", "uargs" }, { "size_t", "size" } } },
{ 436, "close_range", 3, { { "unsigned int", "fd" }, { "unsigned int", "max_fd" }, { "unsigned int", "flags" } } },
{ 437, "openat2", 4, { { "int", "dfd" }, { "const char *", "filename" }, { "struct open_how *", "how" }, { "size_t", "usize" } } },
{ 438, "pidfd_getfd", 3, { { "int", "pidfd" }, { "int", "fd" }, { "unsigned int", "flags" } } },
{ 439, "faccessat2", 4, { { "int", "dfd" }, { "const char *", "filename" }, { "int", "mode" }, { "int", "flags" } } },
{ 440, "process_madvise", 5, { { "int", "pidfd" }, { "const struct iovec *", "vec" }, { "size_t", "vlen" }, { "int", "behavior" }, { "unsigned int", "flags" } } },
{ 441, "epoll_pwait2", 6, { { "int", "epfd" }, { "struct epoll_event *", "events" }, { "int", "maxevents" }, { "const struct __kernel_timespec *", "timeout" }, { "const sigset_t *", "sigmask" }, { "size_t", "sigsetsize" } } },
{ 442, "mount_setattr", 5, { { "int", "dfd" }, { "const char *", "path" }, { "unsigned int", "flags" }, { "struct mount_attr *", "uattr" }, { "size_t", "usize" } } },
{ 443, "quotactl_fd", 4, { { "unsigned int", "fd" }, { "unsigned int", "cmd" }, { "qid_t", "id" }, { "void *", "addr" } } },
{ 444, "landlock_create_ruleset", 3, { { "const struct landlock_ruleset_attr *const", "attr" }, { "const size_t", "size" }, { "const __u32", "flags" } } },
{ 445, "landlock_add_rule", 4, { { "const int", "ruleset_fd" }, { "const enum landlock_rule_type", "rule_type" }, { "const void *const", "rule_attr" }, { "const __u32", "flags" } } },
{ 446, "landlock_restrict_self", 2, { { "const int", "ruleset_fd" }, { "const __u32", "flags" } } },
{ 448, "process_mrelease", 2, { { "int", "pidfd" }, { "unsigned int", "flags" } } },
{ 449, "futex_waitv", 5, { { "struct futex_waitv *", "waiters" }, { "unsigned int", "nr_futexes" }, { "unsigned int", "flags" }, { "struct __kernel_timespec *", "timeout" }, { "clockid_t", "clockid" } } },
{ 450, "set_mempolicy_home_node", 4, { { "unsigned long", "start" }, { "unsigned long", "len" }, { "unsigned long", "home_node" }, { "unsigned long", "flags" } } },
{ 451, "cachestat", 4, { { "unsigned int", "fd" }, { "struct cachestat_range *", "cstat_range" }, { "struct cachestat *", "cstat" }, { "unsigned int", "flags" } } },
{ 452, "fchmodat2", 4, { { "int", "dfd" }, { "const char *", "filename" }, { "umode_t", "mode" }, { "unsigned int", "flags" } } },
{ 453, "map_shadow_stack", 3, { { "unsigned long", "addr" }, { "unsigned long", "size" }, { "unsigned int", "flags" } } },
{ 454, "futex_wake", 4, { { "void *", "uaddr" }, { "unsigned long", "mask" }, { "int", "nr" }, { "unsigned int", "flags" } } },
{ 455, "futex_wait", 6, { { "void *", "uaddr" }, { "unsigned long", "val" }, { "unsigned long", "mask" }, { "unsigned int", "flags" }, { "struct __kernel_timespec *", "timeout" }, { "clockid_t", "clockid" } } },
{ 456, "futex_requeue", 4, { { "struct futex_waitv *", "waiters" }, { "unsigned int", "flags" }, { "int", "nr_wake" }, { "int", "nr_requeue" } } },
{ 457, "statmount", 4, { { "const struct mnt_id_req *", "req" }, { "struct statmount *", "buf" }, { "size_t", "bufsize" }, { "unsigned int", "flags" } } },
{ 458, "listmount", 4, { { "const struct mnt_id_req *", "req" }, { "u64 *", "mnt_ids" }, { "size_t", "nr_mnt_ids" }, { "unsigned int", "flags" } } },
{ 459, "lsm_get_self_attr", 4, { { "unsigned int", "attr" }, { "struct lsm_ctx *", "ctx" }, { "u32 *", "size" }, { "u32", "flags" } } },
{ 460, "lsm_set_self_attr", 4, { { "unsigned int", "attr" }, { "struct lsm_ctx *", "ctx" }, { "u32", "size" }, { "u32", "flags" } } },
{ 461, "lsm_list_modules", 3, { { "u64 *", "ids" }, { "u32 *", "size" }, { "u32", "flags" } } },
{ 462, "mseal", 3, { { "unsigned long", "start" }, { "size_t", "len" }, { "unsigned long", "flags" } } },
{ 463, "setxattrat", 6, { { "int", "dfd" }, { "const char *", "pathname" }, { "unsigned int", "at_flags" }, { "const char *", "name" }, { "const struct xattr_args *", "uargs" }, { "size_t", "usize" } } },
{ 464, "getxattrat", 6, { { "int", "dfd" }, { "const char *", "pathname" }, { "unsigned int", "at_flags" }, { "const char *", "name" }, { "struct xattr_args *", "uargs" }, { "size_t", "usize" } } },
{ 465, "listxattrat", 5, { { "int", "dfd" }, { "const char *", "pathname" }, { "unsigned int", "at_flags" }, { "char *", "list" }, { "size_t", "size" } } },
{ 466, "removexattrat", 4, { { "int", "dfd" }, { "const char *", "pathname" }, { "unsigned int", "at_flags" }, { "const char *", "name" } } },
{ 467, "open_tree_attr", 5, { { "int", "dfd" }, { "const char *", "filename" }, { "unsigned", "flags" }, { "struct mount_attr *", "uattr" }, { "size_t", "usize" } } },
{ 468, "file_getattr", 5, { { "int", "dfd" }, { "const char *", "filename" }, { "struct file_attr *", "ufattr" }, { "size_t", "usize" }, { "unsigned int", "at_flags" } } },
{ 469, "file_setattr", 5, { { "int", "dfd" }, { "const char *", "filename" }, { "struct file_attr *", "ufattr" }, { "size_t", "usize" }, { "unsigned int", "at_flags" } } },
{ 470, "listns", 4, { { "const struct ns_id_req *", "req" }, { "u64 *", "ns_ids" }, { "size_t", "nr_ns_ids" }, { "unsigned int", "flags" } } },
};
FridaLinuxSyscallSignature *
frida_get_syscall_signatures (int * len)
{
if (len != NULL)
*len = G_N_ELEMENTS (frida_syscall_signatures);
return (FridaLinuxSyscallSignature *) frida_syscall_signatures;
}
FridaLinuxSyscallSignature *
frida_get_compat32_syscall_signatures (int * len)
{
if (len != NULL)
*len = 0;
return NULL;
}
+434
View File
@@ -0,0 +1,434 @@
// AUTO-GENERATED FILE. DO NOT EDIT.
namespace Frida {
public enum LinuxSyscall {
RESTART_SYSCALL = 0,
EXIT = 1,
FORK = 2,
READ = 3,
WRITE = 4,
OPEN = 5,
CLOSE = 6,
CREAT = 8,
LINK = 9,
UNLINK = 10,
EXECVE = 11,
CHDIR = 12,
TIME = 13,
MKNOD = 14,
CHMOD = 15,
LCHOWN = 16,
LSEEK = 19,
GETPID = 20,
MOUNT = 21,
UMOUNT = 22,
SETUID = 23,
GETUID = 24,
STIME = 25,
PTRACE = 26,
ALARM = 27,
PAUSE = 29,
UTIME = 30,
ACCESS = 33,
NICE = 34,
SYNC = 36,
KILL = 37,
RENAME = 38,
MKDIR = 39,
RMDIR = 40,
DUP = 41,
PIPE = 42,
TIMES = 43,
BRK = 45,
SETGID = 46,
GETGID = 47,
GETEUID = 49,
GETEGID = 50,
ACCT = 51,
UMOUNT2 = 52,
IOCTL = 54,
FCNTL = 55,
SETPGID = 57,
UMASK = 60,
CHROOT = 61,
USTAT = 62,
DUP2 = 63,
GETPPID = 64,
GETPGRP = 65,
SETSID = 66,
SIGACTION = 67,
SETREUID = 70,
SETREGID = 71,
SIGSUSPEND = 72,
SIGPENDING = 73,
SETHOSTNAME = 74,
SETRLIMIT = 75,
GETRLIMIT = 76,
GETRUSAGE = 77,
GETTIMEOFDAY = 78,
SETTIMEOFDAY = 79,
GETGROUPS = 80,
SETGROUPS = 81,
SELECT = 82,
SYMLINK = 83,
READLINK = 85,
USELIB = 86,
SWAPON = 87,
REBOOT = 88,
READDIR = 89,
MMAP = 90,
MUNMAP = 91,
TRUNCATE = 92,
FTRUNCATE = 93,
FCHMOD = 94,
FCHOWN = 95,
GETPRIORITY = 96,
SETPRIORITY = 97,
STATFS = 99,
FSTATFS = 100,
SOCKETCALL = 102,
SYSLOG = 103,
SETITIMER = 104,
GETITIMER = 105,
STAT = 106,
LSTAT = 107,
FSTAT = 108,
VHANGUP = 111,
WAIT4 = 114,
SWAPOFF = 115,
SYSINFO = 116,
IPC = 117,
FSYNC = 118,
CLONE = 120,
SETDOMAINNAME = 121,
UNAME = 122,
ADJTIMEX = 124,
MPROTECT = 125,
SIGPROCMASK = 126,
INIT_MODULE = 128,
DELETE_MODULE = 129,
QUOTACTL = 131,
GETPGID = 132,
FCHDIR = 133,
BDFLUSH = 134,
SYSFS = 135,
PERSONALITY = 136,
SETFSUID = 138,
SETFSGID = 139,
_LLSEEK = 140,
GETDENTS = 141,
_NEWSELECT = 142,
FLOCK = 143,
MSYNC = 144,
READV = 145,
WRITEV = 146,
GETSID = 147,
FDATASYNC = 148,
_SYSCTL = 149,
MLOCK = 150,
MUNLOCK = 151,
MLOCKALL = 152,
MUNLOCKALL = 153,
SCHED_SETPARAM = 154,
SCHED_GETPARAM = 155,
SCHED_SETSCHEDULER = 156,
SCHED_GETSCHEDULER = 157,
SCHED_YIELD = 158,
SCHED_GET_PRIORITY_MAX = 159,
SCHED_GET_PRIORITY_MIN = 160,
SCHED_RR_GET_INTERVAL = 161,
NANOSLEEP = 162,
MREMAP = 163,
SETRESUID = 164,
GETRESUID = 165,
POLL = 168,
SETRESGID = 170,
GETRESGID = 171,
PRCTL = 172,
RT_SIGACTION = 174,
RT_SIGPROCMASK = 175,
RT_SIGPENDING = 176,
RT_SIGTIMEDWAIT = 177,
RT_SIGQUEUEINFO = 178,
RT_SIGSUSPEND = 179,
PREAD64 = 180,
PWRITE64 = 181,
CHOWN = 182,
GETCWD = 183,
CAPGET = 184,
CAPSET = 185,
SIGALTSTACK = 186,
SENDFILE = 187,
VFORK = 190,
UGETRLIMIT = 191,
TRUNCATE64 = 193,
FTRUNCATE64 = 194,
STAT64 = 195,
LSTAT64 = 196,
FSTAT64 = 197,
LCHOWN32 = 198,
GETUID32 = 199,
GETGID32 = 200,
GETEUID32 = 201,
GETEGID32 = 202,
SETREUID32 = 203,
SETREGID32 = 204,
GETGROUPS32 = 205,
SETGROUPS32 = 206,
FCHOWN32 = 207,
SETRESUID32 = 208,
GETRESUID32 = 209,
SETRESGID32 = 210,
GETRESGID32 = 211,
CHOWN32 = 212,
SETUID32 = 213,
SETGID32 = 214,
SETFSUID32 = 215,
SETFSGID32 = 216,
GETDENTS64 = 217,
PIVOT_ROOT = 218,
MINCORE = 219,
MADVISE = 220,
FCNTL64 = 221,
GETTID = 224,
READAHEAD = 225,
SETXATTR = 226,
LSETXATTR = 227,
FSETXATTR = 228,
GETXATTR = 229,
LGETXATTR = 230,
FGETXATTR = 231,
LISTXATTR = 232,
LLISTXATTR = 233,
FLISTXATTR = 234,
REMOVEXATTR = 235,
LREMOVEXATTR = 236,
FREMOVEXATTR = 237,
TKILL = 238,
SENDFILE64 = 239,
FUTEX = 240,
SCHED_SETAFFINITY = 241,
SCHED_GETAFFINITY = 242,
IO_SETUP = 243,
IO_DESTROY = 244,
IO_GETEVENTS = 245,
IO_SUBMIT = 246,
IO_CANCEL = 247,
EXIT_GROUP = 248,
LOOKUP_DCOOKIE = 249,
EPOLL_CREATE = 250,
EPOLL_CTL = 251,
EPOLL_WAIT = 252,
REMAP_FILE_PAGES = 253,
SET_TID_ADDRESS = 256,
TIMER_CREATE = 257,
TIMER_SETTIME = 258,
TIMER_GETTIME = 259,
TIMER_GETOVERRUN = 260,
TIMER_DELETE = 261,
CLOCK_SETTIME = 262,
CLOCK_GETTIME = 263,
CLOCK_GETRES = 264,
CLOCK_NANOSLEEP = 265,
STATFS64 = 266,
FSTATFS64 = 267,
TGKILL = 268,
UTIMES = 269,
PCICONFIG_IOBASE = 271,
PCICONFIG_READ = 272,
PCICONFIG_WRITE = 273,
MQ_OPEN = 274,
MQ_UNLINK = 275,
MQ_TIMEDSEND = 276,
MQ_TIMEDRECEIVE = 277,
MQ_NOTIFY = 278,
MQ_GETSETATTR = 279,
WAITID = 280,
SOCKET = 281,
BIND = 282,
CONNECT = 283,
LISTEN = 284,
ACCEPT = 285,
GETSOCKNAME = 286,
GETPEERNAME = 287,
SOCKETPAIR = 288,
SEND = 289,
SENDTO = 290,
RECV = 291,
RECVFROM = 292,
SHUTDOWN = 293,
SETSOCKOPT = 294,
GETSOCKOPT = 295,
SENDMSG = 296,
RECVMSG = 297,
SEMOP = 298,
SEMGET = 299,
SEMCTL = 300,
MSGSND = 301,
MSGRCV = 302,
MSGGET = 303,
MSGCTL = 304,
SHMAT = 305,
SHMDT = 306,
SHMGET = 307,
SHMCTL = 308,
ADD_KEY = 309,
REQUEST_KEY = 310,
KEYCTL = 311,
SEMTIMEDOP = 312,
IOPRIO_SET = 314,
IOPRIO_GET = 315,
INOTIFY_INIT = 316,
INOTIFY_ADD_WATCH = 317,
INOTIFY_RM_WATCH = 318,
MBIND = 319,
GET_MEMPOLICY = 320,
SET_MEMPOLICY = 321,
OPENAT = 322,
MKDIRAT = 323,
MKNODAT = 324,
FCHOWNAT = 325,
FUTIMESAT = 326,
FSTATAT64 = 327,
UNLINKAT = 328,
RENAMEAT = 329,
LINKAT = 330,
SYMLINKAT = 331,
READLINKAT = 332,
FCHMODAT = 333,
FACCESSAT = 334,
PSELECT6 = 335,
PPOLL = 336,
UNSHARE = 337,
SET_ROBUST_LIST = 338,
GET_ROBUST_LIST = 339,
SPLICE = 340,
ARM_SYNC_FILE_RANGE = 341,
TEE = 342,
VMSPLICE = 343,
MOVE_PAGES = 344,
GETCPU = 345,
EPOLL_PWAIT = 346,
KEXEC_LOAD = 347,
UTIMENSAT = 348,
SIGNALFD = 349,
TIMERFD_CREATE = 350,
EVENTFD = 351,
FALLOCATE = 352,
TIMERFD_SETTIME = 353,
TIMERFD_GETTIME = 354,
SIGNALFD4 = 355,
EVENTFD2 = 356,
EPOLL_CREATE1 = 357,
DUP3 = 358,
PIPE2 = 359,
INOTIFY_INIT1 = 360,
PREADV = 361,
PWRITEV = 362,
RT_TGSIGQUEUEINFO = 363,
PERF_EVENT_OPEN = 364,
RECVMMSG = 365,
ACCEPT4 = 366,
FANOTIFY_INIT = 367,
FANOTIFY_MARK = 368,
PRLIMIT64 = 369,
NAME_TO_HANDLE_AT = 370,
OPEN_BY_HANDLE_AT = 371,
CLOCK_ADJTIME = 372,
SYNCFS = 373,
SENDMMSG = 374,
SETNS = 375,
PROCESS_VM_READV = 376,
PROCESS_VM_WRITEV = 377,
KCMP = 378,
FINIT_MODULE = 379,
SCHED_SETATTR = 380,
SCHED_GETATTR = 381,
RENAMEAT2 = 382,
SECCOMP = 383,
GETRANDOM = 384,
MEMFD_CREATE = 385,
BPF = 386,
EXECVEAT = 387,
USERFAULTFD = 388,
MEMBARRIER = 389,
MLOCK2 = 390,
COPY_FILE_RANGE = 391,
PREADV2 = 392,
PWRITEV2 = 393,
PKEY_MPROTECT = 394,
PKEY_ALLOC = 395,
PKEY_FREE = 396,
STATX = 397,
RSEQ = 398,
IO_PGETEVENTS = 399,
MIGRATE_PAGES = 400,
KEXEC_FILE_LOAD = 401,
CLOCK_GETTIME64 = 403,
CLOCK_SETTIME64 = 404,
CLOCK_ADJTIME64 = 405,
CLOCK_GETRES_TIME64 = 406,
CLOCK_NANOSLEEP_TIME64 = 407,
TIMER_GETTIME64 = 408,
TIMER_SETTIME64 = 409,
TIMERFD_GETTIME64 = 410,
TIMERFD_SETTIME64 = 411,
UTIMENSAT_TIME64 = 412,
PSELECT6_TIME64 = 413,
PPOLL_TIME64 = 414,
IO_PGETEVENTS_TIME64 = 416,
RECVMMSG_TIME64 = 417,
MQ_TIMEDSEND_TIME64 = 418,
MQ_TIMEDRECEIVE_TIME64 = 419,
SEMTIMEDOP_TIME64 = 420,
RT_SIGTIMEDWAIT_TIME64 = 421,
FUTEX_TIME64 = 422,
SCHED_RR_GET_INTERVAL_TIME64 = 423,
PIDFD_SEND_SIGNAL = 424,
IO_URING_SETUP = 425,
IO_URING_ENTER = 426,
IO_URING_REGISTER = 427,
OPEN_TREE = 428,
MOVE_MOUNT = 429,
FSOPEN = 430,
FSCONFIG = 431,
FSMOUNT = 432,
FSPICK = 433,
PIDFD_OPEN = 434,
CLONE3 = 435,
CLOSE_RANGE = 436,
OPENAT2 = 437,
PIDFD_GETFD = 438,
FACCESSAT2 = 439,
PROCESS_MADVISE = 440,
EPOLL_PWAIT2 = 441,
MOUNT_SETATTR = 442,
QUOTACTL_FD = 443,
LANDLOCK_CREATE_RULESET = 444,
LANDLOCK_ADD_RULE = 445,
LANDLOCK_RESTRICT_SELF = 446,
PROCESS_MRELEASE = 448,
FUTEX_WAITV = 449,
SET_MEMPOLICY_HOME_NODE = 450,
CACHESTAT = 451,
FCHMODAT2 = 452,
MAP_SHADOW_STACK = 453,
FUTEX_WAKE = 454,
FUTEX_WAIT = 455,
FUTEX_REQUEUE = 456,
STATMOUNT = 457,
LISTMOUNT = 458,
LSM_GET_SELF_ATTR = 459,
LSM_SET_SELF_ATTR = 460,
LSM_LIST_MODULES = 461,
MSEAL = 462,
SETXATTRAT = 463,
GETXATTRAT = 464,
LISTXATTRAT = 465,
REMOVEXATTRAT = 466,
OPEN_TREE_ATTR = 467,
FILE_GETATTR = 468,
FILE_SETATTR = 469,
LISTNS = 470,
}
}
+790
View File
@@ -0,0 +1,790 @@
/* AUTO-GENERATED FILE. DO NOT EDIT. */
#include "frida-base.h"
static const FridaLinuxSyscallSignature frida_syscall_signatures[] =
{
{ 0, "io_setup", 2, { { "unsigned", "nr_events" }, { "aio_context_t *", "ctxp" } } },
{ 1, "io_destroy", 1, { { "aio_context_t", "ctx" } } },
{ 2, "io_submit", 3, { { "aio_context_t", "ctx_id" }, { "long", "nr" }, { "struct iocb * *", "iocbpp" } } },
{ 3, "io_cancel", 3, { { "aio_context_t", "ctx_id" }, { "struct iocb *", "iocb" }, { "struct io_event *", "result" } } },
{ 4, "io_getevents", 5, { { "aio_context_t", "ctx_id" }, { "long", "min_nr" }, { "long", "nr" }, { "struct io_event *", "events" }, { "struct __kernel_timespec *", "timeout" } } },
{ 5, "setxattr", 5, { { "const char *", "pathname" }, { "const char *", "name" }, { "const void *", "value" }, { "size_t", "size" }, { "int", "flags" } } },
{ 6, "lsetxattr", 5, { { "const char *", "pathname" }, { "const char *", "name" }, { "const void *", "value" }, { "size_t", "size" }, { "int", "flags" } } },
{ 7, "fsetxattr", 5, { { "int", "fd" }, { "const char *", "name" }, { "const void *", "value" }, { "size_t", "size" }, { "int", "flags" } } },
{ 8, "getxattr", 4, { { "const char *", "pathname" }, { "const char *", "name" }, { "void *", "value" }, { "size_t", "size" } } },
{ 9, "lgetxattr", 4, { { "const char *", "pathname" }, { "const char *", "name" }, { "void *", "value" }, { "size_t", "size" } } },
{ 10, "fgetxattr", 4, { { "int", "fd" }, { "const char *", "name" }, { "void *", "value" }, { "size_t", "size" } } },
{ 11, "listxattr", 3, { { "const char *", "pathname" }, { "char *", "list" }, { "size_t", "size" } } },
{ 12, "llistxattr", 3, { { "const char *", "pathname" }, { "char *", "list" }, { "size_t", "size" } } },
{ 13, "flistxattr", 3, { { "int", "fd" }, { "char *", "list" }, { "size_t", "size" } } },
{ 14, "removexattr", 2, { { "const char *", "pathname" }, { "const char *", "name" } } },
{ 15, "lremovexattr", 2, { { "const char *", "pathname" }, { "const char *", "name" } } },
{ 16, "fremovexattr", 2, { { "int", "fd" }, { "const char *", "name" } } },
{ 17, "getcwd", 2, { { "char *", "buf" }, { "unsigned long", "size" } } },
{ 18, "lookup_dcookie", 0, {} },
{ 19, "eventfd2", 2, { { "unsigned int", "count" }, { "int", "flags" } } },
{ 20, "epoll_create1", 1, { { "int", "flags" } } },
{ 21, "epoll_ctl", 4, { { "int", "epfd" }, { "int", "op" }, { "int", "fd" }, { "struct epoll_event *", "event" } } },
{ 22, "epoll_pwait", 6, { { "int", "epfd" }, { "struct epoll_event *", "events" }, { "int", "maxevents" }, { "int", "timeout" }, { "const sigset_t *", "sigmask" }, { "size_t", "sigsetsize" } } },
{ 23, "dup", 1, { { "unsigned int", "fildes" } } },
{ 24, "dup3", 3, { { "unsigned int", "oldfd" }, { "unsigned int", "newfd" }, { "int", "flags" } } },
{ 25, "fcntl", 3, { { "unsigned int", "fd" }, { "unsigned int", "cmd" }, { "unsigned long", "arg" } } },
{ 26, "inotify_init1", 1, { { "int", "flags" } } },
{ 27, "inotify_add_watch", 3, { { "int", "fd" }, { "const char *", "pathname" }, { "u32", "mask" } } },
{ 28, "inotify_rm_watch", 2, { { "int", "fd" }, { "__s32", "wd" } } },
{ 29, "ioctl", 3, { { "unsigned int", "fd" }, { "unsigned int", "cmd" }, { "unsigned long", "arg" } } },
{ 30, "ioprio_set", 3, { { "int", "which" }, { "int", "who" }, { "int", "ioprio" } } },
{ 31, "ioprio_get", 2, { { "int", "which" }, { "int", "who" } } },
{ 32, "flock", 2, { { "unsigned int", "fd" }, { "unsigned int", "cmd" } } },
{ 33, "mknodat", 4, { { "int", "dfd" }, { "const char *", "filename" }, { "umode_t", "mode" }, { "unsigned int", "dev" } } },
{ 34, "mkdirat", 3, { { "int", "dfd" }, { "const char *", "pathname" }, { "umode_t", "mode" } } },
{ 35, "unlinkat", 3, { { "int", "dfd" }, { "const char *", "pathname" }, { "int", "flag" } } },
{ 36, "symlinkat", 3, { { "const char *", "oldname" }, { "int", "newdfd" }, { "const char *", "newname" } } },
{ 37, "linkat", 5, { { "int", "olddfd" }, { "const char *", "oldname" }, { "int", "newdfd" }, { "const char *", "newname" }, { "int", "flags" } } },
{ 39, "umount2", 2, { { "char *", "name" }, { "int", "flags" } } },
{ 40, "mount", 5, { { "char *", "dev_name" }, { "char *", "dir_name" }, { "char *", "type" }, { "unsigned long", "flags" }, { "void *", "data" } } },
{ 41, "pivot_root", 2, { { "const char *", "new_root" }, { "const char *", "put_old" } } },
{ 42, "nfsservctl", 0, {} },
{ 43, "statfs", 2, { { "const char *", "pathname" }, { "struct statfs *", "buf" } } },
{ 44, "fstatfs", 2, { { "unsigned int", "fd" }, { "struct statfs *", "buf" } } },
{ 45, "truncate", 2, { { "const char *", "path" }, { "long", "length" } } },
{ 46, "ftruncate", 2, { { "unsigned int", "fd" }, { "off_t", "length" } } },
{ 47, "fallocate", 4, { { "int", "fd" }, { "int", "mode" }, { "loff_t", "offset" }, { "loff_t", "len" } } },
{ 48, "faccessat", 3, { { "int", "dfd" }, { "const char *", "filename" }, { "int", "mode" } } },
{ 49, "chdir", 1, { { "const char *", "filename" } } },
{ 50, "fchdir", 1, { { "unsigned int", "fd" } } },
{ 51, "chroot", 1, { { "const char *", "filename" } } },
{ 52, "fchmod", 2, { { "unsigned int", "fd" }, { "umode_t", "mode" } } },
{ 53, "fchmodat", 3, { { "int", "dfd" }, { "const char *", "filename" }, { "umode_t", "mode" } } },
{ 54, "fchownat", 5, { { "int", "dfd" }, { "const char *", "filename" }, { "uid_t", "user" }, { "gid_t", "group" }, { "int", "flag" } } },
{ 55, "fchown", 3, { { "unsigned int", "fd" }, { "uid_t", "user" }, { "gid_t", "group" } } },
{ 56, "openat", 4, { { "int", "dfd" }, { "const char *", "filename" }, { "int", "flags" }, { "umode_t", "mode" } } },
{ 57, "close", 1, { { "unsigned int", "fd" } } },
{ 58, "vhangup", 0, {} },
{ 59, "pipe2", 2, { { "int *", "fildes" }, { "int", "flags" } } },
{ 60, "quotactl", 4, { { "unsigned int", "cmd" }, { "const char *", "special" }, { "qid_t", "id" }, { "void *", "addr" } } },
{ 61, "getdents64", 3, { { "unsigned int", "fd" }, { "struct linux_dirent64 *", "dirent" }, { "unsigned int", "count" } } },
{ 62, "lseek", 3, { { "unsigned int", "fd" }, { "off_t", "offset" }, { "unsigned int", "whence" } } },
{ 63, "read", 3, { { "unsigned int", "fd" }, { "char *", "buf" }, { "size_t", "count" } } },
{ 64, "write", 3, { { "unsigned int", "fd" }, { "const char *", "buf" }, { "size_t", "count" } } },
{ 65, "readv", 3, { { "unsigned long", "fd" }, { "const struct iovec *", "vec" }, { "unsigned long", "vlen" } } },
{ 66, "writev", 3, { { "unsigned long", "fd" }, { "const struct iovec *", "vec" }, { "unsigned long", "vlen" } } },
{ 67, "pread64", 4, { { "unsigned int", "fd" }, { "char *", "buf" }, { "size_t", "count" }, { "loff_t", "pos" } } },
{ 68, "pwrite64", 4, { { "unsigned int", "fd" }, { "const char *", "buf" }, { "size_t", "count" }, { "loff_t", "pos" } } },
{ 69, "preadv", 5, { { "unsigned long", "fd" }, { "const struct iovec *", "vec" }, { "unsigned long", "vlen" }, { "unsigned long", "pos_l" }, { "unsigned long", "pos_h" } } },
{ 70, "pwritev", 5, { { "unsigned long", "fd" }, { "const struct iovec *", "vec" }, { "unsigned long", "vlen" }, { "unsigned long", "pos_l" }, { "unsigned long", "pos_h" } } },
{ 71, "sendfile", 4, { { "int", "out_fd" }, { "int", "in_fd" }, { "off_t *", "offset" }, { "size_t", "count" } } },
{ 72, "pselect6", 6, { { "int", "n" }, { "fd_set *", "inp" }, { "fd_set *", "outp" }, { "fd_set *", "exp" }, { "struct __kernel_timespec *", "tsp" }, { "void *", "sig" } } },
{ 73, "ppoll", 5, { { "struct pollfd *", "ufds" }, { "unsigned int", "nfds" }, { "struct __kernel_timespec *", "tsp" }, { "const sigset_t *", "sigmask" }, { "size_t", "sigsetsize" } } },
{ 74, "signalfd4", 4, { { "int", "ufd" }, { "sigset_t *", "user_mask" }, { "size_t", "sizemask" }, { "int", "flags" } } },
{ 75, "vmsplice", 4, { { "int", "fd" }, { "const struct iovec *", "uiov" }, { "unsigned long", "nr_segs" }, { "unsigned int", "flags" } } },
{ 76, "splice", 6, { { "int", "fd_in" }, { "loff_t *", "off_in" }, { "int", "fd_out" }, { "loff_t *", "off_out" }, { "size_t", "len" }, { "unsigned int", "flags" } } },
{ 77, "tee", 4, { { "int", "fdin" }, { "int", "fdout" }, { "size_t", "len" }, { "unsigned int", "flags" } } },
{ 78, "readlinkat", 4, { { "int", "dfd" }, { "const char *", "pathname" }, { "char *", "buf" }, { "int", "bufsiz" } } },
{ 79, "newfstatat", 4, { { "int", "dfd" }, { "const char *", "filename" }, { "struct stat *", "statbuf" }, { "int", "flag" } } },
{ 80, "fstat", 2, { { "unsigned int", "fd" }, { "struct stat *", "statbuf" } } },
{ 81, "sync", 0, {} },
{ 82, "fsync", 1, { { "unsigned int", "fd" } } },
{ 83, "fdatasync", 1, { { "unsigned int", "fd" } } },
{ 84, "sync_file_range", 4, { { "int", "fd" }, { "loff_t", "offset" }, { "loff_t", "nbytes" }, { "unsigned int", "flags" } } },
{ 85, "timerfd_create", 2, { { "int", "clockid" }, { "int", "flags" } } },
{ 86, "timerfd_settime", 4, { { "int", "ufd" }, { "int", "flags" }, { "const struct __kernel_itimerspec *", "utmr" }, { "struct __kernel_itimerspec *", "otmr" } } },
{ 87, "timerfd_gettime", 2, { { "int", "ufd" }, { "struct __kernel_itimerspec *", "otmr" } } },
{ 88, "utimensat", 4, { { "int", "dfd" }, { "const char *", "filename" }, { "struct __kernel_timespec *", "utimes" }, { "int", "flags" } } },
{ 89, "acct", 1, { { "const char *", "name" } } },
{ 90, "capget", 2, { { "cap_user_header_t", "header" }, { "cap_user_data_t", "dataptr" } } },
{ 91, "capset", 2, { { "cap_user_header_t", "header" }, { "const cap_user_data_t", "data" } } },
{ 92, "personality", 1, { { "unsigned int", "personality" } } },
{ 93, "exit", 1, { { "int", "error_code" } } },
{ 94, "exit_group", 1, { { "int", "error_code" } } },
{ 95, "waitid", 5, { { "int", "which" }, { "pid_t", "upid" }, { "struct siginfo *", "infop" }, { "int", "options" }, { "struct rusage *", "ru" } } },
{ 96, "set_tid_address", 1, { { "int *", "tidptr" } } },
{ 97, "unshare", 1, { { "unsigned long", "unshare_flags" } } },
{ 98, "futex", 6, { { "u32 *", "uaddr" }, { "int", "op" }, { "u32", "val" }, { "const struct __kernel_timespec *", "utime" }, { "u32 *", "uaddr2" }, { "u32", "val3" } } },
{ 99, "set_robust_list", 2, { { "struct robust_list_head *", "head" }, { "size_t", "len" } } },
{ 100, "get_robust_list", 3, { { "int", "pid" }, { "struct robust_list_head * *", "head_ptr" }, { "size_t *", "len_ptr" } } },
{ 101, "nanosleep", 2, { { "struct __kernel_timespec *", "rqtp" }, { "struct __kernel_timespec *", "rmtp" } } },
{ 102, "getitimer", 2, { { "int", "which" }, { "struct __kernel_old_itimerval *", "value" } } },
{ 103, "setitimer", 3, { { "int", "which" }, { "struct __kernel_old_itimerval *", "value" }, { "struct __kernel_old_itimerval *", "ovalue" } } },
{ 104, "kexec_load", 4, { { "unsigned long", "entry" }, { "unsigned long", "nr_segments" }, { "struct kexec_segment *", "segments" }, { "unsigned long", "flags" } } },
{ 105, "init_module", 3, { { "void *", "umod" }, { "unsigned long", "len" }, { "const char *", "uargs" } } },
{ 106, "delete_module", 2, { { "const char *", "name_user" }, { "unsigned int", "flags" } } },
{ 107, "timer_create", 3, { { "const clockid_t", "which_clock" }, { "struct sigevent *", "timer_event_spec" }, { "timer_t *", "created_timer_id" } } },
{ 108, "timer_gettime", 2, { { "timer_t", "timer_id" }, { "struct __kernel_itimerspec *", "setting" } } },
{ 109, "timer_getoverrun", 1, { { "timer_t", "timer_id" } } },
{ 110, "timer_settime", 4, { { "timer_t", "timer_id" }, { "int", "flags" }, { "const struct __kernel_itimerspec *", "new_setting" }, { "struct __kernel_itimerspec *", "old_setting" } } },
{ 111, "timer_delete", 1, { { "timer_t", "timer_id" } } },
{ 112, "clock_settime", 2, { { "const clockid_t", "which_clock" }, { "const struct __kernel_timespec *", "tp" } } },
{ 113, "clock_gettime", 2, { { "const clockid_t", "which_clock" }, { "struct __kernel_timespec *", "tp" } } },
{ 114, "clock_getres", 2, { { "const clockid_t", "which_clock" }, { "struct __kernel_timespec *", "tp" } } },
{ 115, "clock_nanosleep", 4, { { "const clockid_t", "which_clock" }, { "int", "flags" }, { "const struct __kernel_timespec *", "rqtp" }, { "struct __kernel_timespec *", "rmtp" } } },
{ 116, "syslog", 3, { { "int", "type" }, { "char *", "buf" }, { "int", "len" } } },
{ 117, "ptrace", 4, { { "long", "request" }, { "long", "pid" }, { "unsigned long", "addr" }, { "unsigned long", "data" } } },
{ 118, "sched_setparam", 2, { { "pid_t", "pid" }, { "struct sched_param *", "param" } } },
{ 119, "sched_setscheduler", 3, { { "pid_t", "pid" }, { "int", "policy" }, { "struct sched_param *", "param" } } },
{ 120, "sched_getscheduler", 1, { { "pid_t", "pid" } } },
{ 121, "sched_getparam", 2, { { "pid_t", "pid" }, { "struct sched_param *", "param" } } },
{ 122, "sched_setaffinity", 3, { { "pid_t", "pid" }, { "unsigned int", "len" }, { "unsigned long *", "user_mask_ptr" } } },
{ 123, "sched_getaffinity", 3, { { "pid_t", "pid" }, { "unsigned int", "len" }, { "unsigned long *", "user_mask_ptr" } } },
{ 124, "sched_yield", 0, {} },
{ 125, "sched_get_priority_max", 1, { { "int", "policy" } } },
{ 126, "sched_get_priority_min", 1, { { "int", "policy" } } },
{ 127, "sched_rr_get_interval", 2, { { "pid_t", "pid" }, { "struct __kernel_timespec *", "interval" } } },
{ 128, "restart_syscall", 0, {} },
{ 129, "kill", 2, { { "pid_t", "pid" }, { "int", "sig" } } },
{ 130, "tkill", 2, { { "pid_t", "pid" }, { "int", "sig" } } },
{ 131, "tgkill", 3, { { "pid_t", "tgid" }, { "pid_t", "pid" }, { "int", "sig" } } },
{ 132, "sigaltstack", 2, { { "const stack_t *", "uss" }, { "stack_t *", "uoss" } } },
{ 133, "rt_sigsuspend", 2, { { "sigset_t *", "unewset" }, { "size_t", "sigsetsize" } } },
{ 134, "rt_sigaction", 4, { { "int", "sig" }, { "const struct sigaction *", "act" }, { "struct sigaction *", "oact" }, { "size_t", "sigsetsize" } } },
{ 135, "rt_sigprocmask", 4, { { "int", "how" }, { "sigset_t *", "nset" }, { "sigset_t *", "oset" }, { "size_t", "sigsetsize" } } },
{ 136, "rt_sigpending", 2, { { "sigset_t *", "uset" }, { "size_t", "sigsetsize" } } },
{ 137, "rt_sigtimedwait", 4, { { "const sigset_t *", "uthese" }, { "siginfo_t *", "uinfo" }, { "const struct __kernel_timespec *", "uts" }, { "size_t", "sigsetsize" } } },
{ 138, "rt_sigqueueinfo", 3, { { "pid_t", "pid" }, { "int", "sig" }, { "siginfo_t *", "uinfo" } } },
{ 139, "rt_sigreturn", 0, {} },
{ 140, "setpriority", 3, { { "int", "which" }, { "int", "who" }, { "int", "niceval" } } },
{ 141, "getpriority", 2, { { "int", "which" }, { "int", "who" } } },
{ 142, "reboot", 4, { { "int", "magic1" }, { "int", "magic2" }, { "unsigned int", "cmd" }, { "void *", "arg" } } },
{ 143, "setregid", 2, { { "gid_t", "rgid" }, { "gid_t", "egid" } } },
{ 144, "setgid", 1, { { "gid_t", "gid" } } },
{ 145, "setreuid", 2, { { "uid_t", "ruid" }, { "uid_t", "euid" } } },
{ 146, "setuid", 1, { { "uid_t", "uid" } } },
{ 147, "setresuid", 3, { { "uid_t", "ruid" }, { "uid_t", "euid" }, { "uid_t", "suid" } } },
{ 148, "getresuid", 3, { { "uid_t *", "ruidp" }, { "uid_t *", "euidp" }, { "uid_t *", "suidp" } } },
{ 149, "setresgid", 3, { { "gid_t", "rgid" }, { "gid_t", "egid" }, { "gid_t", "sgid" } } },
{ 150, "getresgid", 3, { { "gid_t *", "rgidp" }, { "gid_t *", "egidp" }, { "gid_t *", "sgidp" } } },
{ 151, "setfsuid", 1, { { "uid_t", "uid" } } },
{ 152, "setfsgid", 1, { { "gid_t", "gid" } } },
{ 153, "times", 1, { { "struct tms *", "tbuf" } } },
{ 154, "setpgid", 2, { { "pid_t", "pid" }, { "pid_t", "pgid" } } },
{ 155, "getpgid", 1, { { "pid_t", "pid" } } },
{ 156, "getsid", 1, { { "pid_t", "pid" } } },
{ 157, "setsid", 0, {} },
{ 158, "getgroups", 2, { { "int", "gidsetsize" }, { "gid_t *", "grouplist" } } },
{ 159, "setgroups", 2, { { "int", "gidsetsize" }, { "gid_t *", "grouplist" } } },
{ 160, "uname", 1, { { "struct new_utsname *", "name" } } },
{ 161, "sethostname", 2, { { "char *", "name" }, { "int", "len" } } },
{ 162, "setdomainname", 2, { { "char *", "name" }, { "int", "len" } } },
{ 163, "getrlimit", 2, { { "unsigned int", "resource" }, { "struct rlimit *", "rlim" } } },
{ 164, "setrlimit", 2, { { "unsigned int", "resource" }, { "struct rlimit *", "rlim" } } },
{ 165, "getrusage", 2, { { "int", "who" }, { "struct rusage *", "ru" } } },
{ 166, "umask", 1, { { "int", "mask" } } },
{ 167, "prctl", 5, { { "int", "option" }, { "unsigned long", "arg2" }, { "unsigned long", "arg3" }, { "unsigned long", "arg4" }, { "unsigned long", "arg5" } } },
{ 168, "getcpu", 3, { { "unsigned *", "cpup" }, { "unsigned *", "nodep" }, { "struct getcpu_cache *", "unused" } } },
{ 169, "gettimeofday", 2, { { "struct __kernel_old_timeval *", "tv" }, { "struct timezone *", "tz" } } },
{ 170, "settimeofday", 2, { { "struct __kernel_old_timeval *", "tv" }, { "struct timezone *", "tz" } } },
{ 171, "adjtimex", 1, { { "struct __kernel_timex *", "txc_p" } } },
{ 172, "getpid", 0, {} },
{ 173, "getppid", 0, {} },
{ 174, "getuid", 0, {} },
{ 175, "geteuid", 0, {} },
{ 176, "getgid", 0, {} },
{ 177, "getegid", 0, {} },
{ 178, "gettid", 0, {} },
{ 179, "sysinfo", 1, { { "struct sysinfo *", "info" } } },
{ 180, "mq_open", 4, { { "const char *", "u_name" }, { "int", "oflag" }, { "umode_t", "mode" }, { "struct mq_attr *", "u_attr" } } },
{ 181, "mq_unlink", 1, { { "const char *", "u_name" } } },
{ 182, "mq_timedsend", 5, { { "mqd_t", "mqdes" }, { "const char *", "u_msg_ptr" }, { "size_t", "msg_len" }, { "unsigned int", "msg_prio" }, { "const struct __kernel_timespec *", "u_abs_timeout" } } },
{ 183, "mq_timedreceive", 5, { { "mqd_t", "mqdes" }, { "char *", "u_msg_ptr" }, { "size_t", "msg_len" }, { "unsigned int *", "u_msg_prio" }, { "const struct __kernel_timespec *", "u_abs_timeout" } } },
{ 184, "mq_notify", 2, { { "mqd_t", "mqdes" }, { "const struct sigevent *", "u_notification" } } },
{ 185, "mq_getsetattr", 3, { { "mqd_t", "mqdes" }, { "const struct mq_attr *", "u_mqstat" }, { "struct mq_attr *", "u_omqstat" } } },
{ 186, "msgget", 2, { { "key_t", "key" }, { "int", "msgflg" } } },
{ 187, "msgctl", 3, { { "int", "msqid" }, { "int", "cmd" }, { "struct msqid_ds *", "buf" } } },
{ 188, "msgrcv", 5, { { "int", "msqid" }, { "struct msgbuf *", "msgp" }, { "size_t", "msgsz" }, { "long", "msgtyp" }, { "int", "msgflg" } } },
{ 189, "msgsnd", 4, { { "int", "msqid" }, { "struct msgbuf *", "msgp" }, { "size_t", "msgsz" }, { "int", "msgflg" } } },
{ 190, "semget", 3, { { "key_t", "key" }, { "int", "nsems" }, { "int", "semflg" } } },
{ 191, "semctl", 4, { { "int", "semid" }, { "int", "semnum" }, { "int", "cmd" }, { "unsigned long", "arg" } } },
{ 192, "semtimedop", 4, { { "int", "semid" }, { "struct sembuf *", "tsops" }, { "unsigned int", "nsops" }, { "const struct __kernel_timespec *", "timeout" } } },
{ 193, "semop", 3, { { "int", "semid" }, { "struct sembuf *", "tsops" }, { "unsigned", "nsops" } } },
{ 194, "shmget", 3, { { "key_t", "key" }, { "size_t", "size" }, { "int", "shmflg" } } },
{ 195, "shmctl", 3, { { "int", "shmid" }, { "int", "cmd" }, { "struct shmid_ds *", "buf" } } },
{ 196, "shmat", 3, { { "int", "shmid" }, { "char *", "shmaddr" }, { "int", "shmflg" } } },
{ 197, "shmdt", 1, { { "char *", "shmaddr" } } },
{ 198, "socket", 3, { { "int", "family" }, { "int", "type" }, { "int", "protocol" } } },
{ 199, "socketpair", 4, { { "int", "family" }, { "int", "type" }, { "int", "protocol" }, { "int *", "usockvec" } } },
{ 200, "bind", 3, { { "int", "fd" }, { "struct sockaddr *", "umyaddr" }, { "int", "addrlen" } } },
{ 201, "listen", 2, { { "int", "fd" }, { "int", "backlog" } } },
{ 202, "accept", 3, { { "int", "fd" }, { "struct sockaddr *", "upeer_sockaddr" }, { "int *", "upeer_addrlen" } } },
{ 203, "connect", 3, { { "int", "fd" }, { "struct sockaddr *", "uservaddr" }, { "int", "addrlen" } } },
{ 204, "getsockname", 3, { { "int", "fd" }, { "struct sockaddr *", "usockaddr" }, { "int *", "usockaddr_len" } } },
{ 205, "getpeername", 3, { { "int", "fd" }, { "struct sockaddr *", "usockaddr" }, { "int *", "usockaddr_len" } } },
{ 206, "sendto", 6, { { "int", "fd" }, { "void *", "buff" }, { "size_t", "len" }, { "unsigned int", "flags" }, { "struct sockaddr *", "addr" }, { "int", "addr_len" } } },
{ 207, "recvfrom", 6, { { "int", "fd" }, { "void *", "ubuf" }, { "size_t", "size" }, { "unsigned int", "flags" }, { "struct sockaddr *", "addr" }, { "int *", "addr_len" } } },
{ 208, "setsockopt", 5, { { "int", "fd" }, { "int", "level" }, { "int", "optname" }, { "char *", "optval" }, { "int", "optlen" } } },
{ 209, "getsockopt", 5, { { "int", "fd" }, { "int", "level" }, { "int", "optname" }, { "char *", "optval" }, { "int *", "optlen" } } },
{ 210, "shutdown", 2, { { "int", "fd" }, { "int", "how" } } },
{ 211, "sendmsg", 3, { { "int", "fd" }, { "struct user_msghdr *", "msg" }, { "unsigned int", "flags" } } },
{ 212, "recvmsg", 3, { { "int", "fd" }, { "struct user_msghdr *", "msg" }, { "unsigned int", "flags" } } },
{ 213, "readahead", 3, { { "int", "fd" }, { "loff_t", "offset" }, { "size_t", "count" } } },
{ 214, "brk", 1, { { "unsigned long", "brk" } } },
{ 215, "munmap", 2, { { "unsigned long", "addr" }, { "size_t", "len" } } },
{ 216, "mremap", 5, { { "unsigned long", "addr" }, { "unsigned long", "old_len" }, { "unsigned long", "new_len" }, { "unsigned long", "flags" }, { "unsigned long", "new_addr" } } },
{ 217, "add_key", 5, { { "const char *", "_type" }, { "const char *", "_description" }, { "const void *", "_payload" }, { "size_t", "plen" }, { "key_serial_t", "ringid" } } },
{ 218, "request_key", 4, { { "const char *", "_type" }, { "const char *", "_description" }, { "const char *", "_callout_info" }, { "key_serial_t", "destringid" } } },
{ 219, "keyctl", 5, { { "int", "option" }, { "unsigned long", "arg2" }, { "unsigned long", "arg3" }, { "unsigned long", "arg4" }, { "unsigned long", "arg5" } } },
{ 220, "clone", 5, { { "unsigned long", "clone_flags" }, { "unsigned long", "newsp" }, { "int *", "parent_tidptr" }, { "int *", "child_tidptr" }, { "unsigned long", "tls" } } },
{ 221, "execve", 3, { { "const char *", "filename" }, { "const char *const *", "argv" }, { "const char *const *", "envp" } } },
{ 222, "mmap", 6, { { "unsigned long", "addr" }, { "unsigned long", "len" }, { "unsigned long", "prot" }, { "unsigned long", "flags" }, { "unsigned long", "fd" }, { "unsigned long", "off" } } },
{ 223, "fadvise64", 4, { { "int", "fd" }, { "loff_t", "offset" }, { "loff_t", "len" }, { "int", "advice" } } },
{ 224, "swapon", 2, { { "const char *", "specialfile" }, { "int", "swap_flags" } } },
{ 225, "swapoff", 1, { { "const char *", "specialfile" } } },
{ 226, "mprotect", 3, { { "unsigned long", "start" }, { "size_t", "len" }, { "unsigned long", "prot" } } },
{ 227, "msync", 3, { { "unsigned long", "start" }, { "size_t", "len" }, { "int", "flags" } } },
{ 228, "mlock", 2, { { "unsigned long", "start" }, { "size_t", "len" } } },
{ 229, "munlock", 2, { { "unsigned long", "start" }, { "size_t", "len" } } },
{ 230, "mlockall", 1, { { "int", "flags" } } },
{ 231, "munlockall", 0, {} },
{ 232, "mincore", 3, { { "unsigned long", "start" }, { "size_t", "len" }, { "unsigned char *", "vec" } } },
{ 233, "madvise", 3, { { "unsigned long", "start" }, { "size_t", "len_in" }, { "int", "behavior" } } },
{ 234, "remap_file_pages", 5, { { "unsigned long", "start" }, { "unsigned long", "size" }, { "unsigned long", "prot" }, { "unsigned long", "pgoff" }, { "unsigned long", "flags" } } },
{ 235, "mbind", 6, { { "unsigned long", "start" }, { "unsigned long", "len" }, { "unsigned long", "mode" }, { "const unsigned long *", "nmask" }, { "unsigned long", "maxnode" }, { "unsigned int", "flags" } } },
{ 236, "get_mempolicy", 5, { { "int *", "policy" }, { "unsigned long *", "nmask" }, { "unsigned long", "maxnode" }, { "unsigned long", "addr" }, { "unsigned long", "flags" } } },
{ 237, "set_mempolicy", 3, { { "int", "mode" }, { "const unsigned long *", "nmask" }, { "unsigned long", "maxnode" } } },
{ 238, "migrate_pages", 4, { { "pid_t", "pid" }, { "unsigned long", "maxnode" }, { "const unsigned long *", "old_nodes" }, { "const unsigned long *", "new_nodes" } } },
{ 239, "move_pages", 6, { { "pid_t", "pid" }, { "unsigned long", "nr_pages" }, { "const void * *", "pages" }, { "const int *", "nodes" }, { "int *", "status" }, { "int", "flags" } } },
{ 240, "rt_tgsigqueueinfo", 4, { { "pid_t", "tgid" }, { "pid_t", "pid" }, { "int", "sig" }, { "siginfo_t *", "uinfo" } } },
{ 241, "perf_event_open", 5, { { "struct perf_event_attr *", "attr_uptr" }, { "pid_t", "pid" }, { "int", "cpu" }, { "int", "group_fd" }, { "unsigned long", "flags" } } },
{ 242, "accept4", 4, { { "int", "fd" }, { "struct sockaddr *", "upeer_sockaddr" }, { "int *", "upeer_addrlen" }, { "int", "flags" } } },
{ 243, "recvmmsg", 5, { { "int", "fd" }, { "struct mmsghdr *", "mmsg" }, { "unsigned int", "vlen" }, { "unsigned int", "flags" }, { "struct __kernel_timespec *", "timeout" } } },
{ 260, "wait4", 4, { { "pid_t", "upid" }, { "int *", "stat_addr" }, { "int", "options" }, { "struct rusage *", "ru" } } },
{ 261, "prlimit64", 4, { { "pid_t", "pid" }, { "unsigned int", "resource" }, { "const struct rlimit64 *", "new_rlim" }, { "struct rlimit64 *", "old_rlim" } } },
{ 262, "fanotify_init", 2, { { "unsigned int", "flags" }, { "unsigned int", "event_f_flags" } } },
{ 263, "fanotify_mark", 5, { { "int", "fanotify_fd" }, { "unsigned int", "flags" }, { "__u64", "mask" }, { "int", "dfd" }, { "const char *", "pathname" } } },
{ 264, "name_to_handle_at", 5, { { "int", "dfd" }, { "const char *", "name" }, { "struct file_handle *", "handle" }, { "void *", "mnt_id" }, { "int", "flag" } } },
{ 265, "open_by_handle_at", 3, { { "int", "mountdirfd" }, { "struct file_handle *", "handle" }, { "int", "flags" } } },
{ 266, "clock_adjtime", 2, { { "const clockid_t", "which_clock" }, { "struct __kernel_timex *", "utx" } } },
{ 267, "syncfs", 1, { { "int", "fd" } } },
{ 268, "setns", 2, { { "int", "fd" }, { "int", "flags" } } },
{ 269, "sendmmsg", 4, { { "int", "fd" }, { "struct mmsghdr *", "mmsg" }, { "unsigned int", "vlen" }, { "unsigned int", "flags" } } },
{ 270, "process_vm_readv", 6, { { "pid_t", "pid" }, { "const struct iovec *", "lvec" }, { "unsigned long", "liovcnt" }, { "const struct iovec *", "rvec" }, { "unsigned long", "riovcnt" }, { "unsigned long", "flags" } } },
{ 271, "process_vm_writev", 6, { { "pid_t", "pid" }, { "const struct iovec *", "lvec" }, { "unsigned long", "liovcnt" }, { "const struct iovec *", "rvec" }, { "unsigned long", "riovcnt" }, { "unsigned long", "flags" } } },
{ 272, "kcmp", 5, { { "pid_t", "pid1" }, { "pid_t", "pid2" }, { "int", "type" }, { "unsigned long", "idx1" }, { "unsigned long", "idx2" } } },
{ 273, "finit_module", 3, { { "int", "fd" }, { "const char *", "uargs" }, { "int", "flags" } } },
{ 274, "sched_setattr", 3, { { "pid_t", "pid" }, { "struct sched_attr *", "uattr" }, { "unsigned int", "flags" } } },
{ 275, "sched_getattr", 4, { { "pid_t", "pid" }, { "struct sched_attr *", "uattr" }, { "unsigned int", "usize" }, { "unsigned int", "flags" } } },
{ 276, "renameat2", 5, { { "int", "olddfd" }, { "const char *", "oldname" }, { "int", "newdfd" }, { "const char *", "newname" }, { "unsigned int", "flags" } } },
{ 277, "seccomp", 3, { { "unsigned int", "op" }, { "unsigned int", "flags" }, { "void *", "uargs" } } },
{ 278, "getrandom", 3, { { "char *", "ubuf" }, { "size_t", "len" }, { "unsigned int", "flags" } } },
{ 279, "memfd_create", 2, { { "const char *", "uname" }, { "unsigned int", "flags" } } },
{ 280, "bpf", 3, { { "int", "cmd" }, { "union bpf_attr *", "uattr" }, { "unsigned int", "size" } } },
{ 281, "execveat", 5, { { "int", "fd" }, { "const char *", "filename" }, { "const char *const *", "argv" }, { "const char *const *", "envp" }, { "int", "flags" } } },
{ 282, "userfaultfd", 1, { { "int", "flags" } } },
{ 283, "membarrier", 3, { { "int", "cmd" }, { "unsigned int", "flags" }, { "int", "cpu_id" } } },
{ 284, "mlock2", 3, { { "unsigned long", "start" }, { "size_t", "len" }, { "int", "flags" } } },
{ 285, "copy_file_range", 6, { { "int", "fd_in" }, { "loff_t *", "off_in" }, { "int", "fd_out" }, { "loff_t *", "off_out" }, { "size_t", "len" }, { "unsigned int", "flags" } } },
{ 286, "preadv2", 6, { { "unsigned long", "fd" }, { "const struct iovec *", "vec" }, { "unsigned long", "vlen" }, { "unsigned long", "pos_l" }, { "unsigned long", "pos_h" }, { "rwf_t", "flags" } } },
{ 287, "pwritev2", 6, { { "unsigned long", "fd" }, { "const struct iovec *", "vec" }, { "unsigned long", "vlen" }, { "unsigned long", "pos_l" }, { "unsigned long", "pos_h" }, { "rwf_t", "flags" } } },
{ 288, "pkey_mprotect", 4, { { "unsigned long", "start" }, { "size_t", "len" }, { "unsigned long", "prot" }, { "int", "pkey" } } },
{ 289, "pkey_alloc", 2, { { "unsigned long", "flags" }, { "unsigned long", "init_val" } } },
{ 290, "pkey_free", 1, { { "int", "pkey" } } },
{ 291, "statx", 5, { { "int", "dfd" }, { "const char *", "filename" }, { "unsigned", "flags" }, { "unsigned int", "mask" }, { "struct statx *", "buffer" } } },
{ 292, "io_pgetevents", 6, { { "aio_context_t", "ctx_id" }, { "long", "min_nr" }, { "long", "nr" }, { "struct io_event *", "events" }, { "struct __kernel_timespec *", "timeout" }, { "const struct __aio_sigset *", "usig" } } },
{ 293, "rseq", 4, { { "struct rseq *", "rseq" }, { "u32", "rseq_len" }, { "int", "flags" }, { "u32", "sig" } } },
{ 294, "kexec_file_load", 5, { { "int", "kernel_fd" }, { "int", "initrd_fd" }, { "unsigned long", "cmdline_len" }, { "const char *", "cmdline_ptr" }, { "unsigned long", "flags" } } },
{ 424, "pidfd_send_signal", 4, { { "int", "pidfd" }, { "int", "sig" }, { "siginfo_t *", "info" }, { "unsigned int", "flags" } } },
{ 425, "io_uring_setup", 2, { { "u32", "entries" }, { "struct io_uring_params *", "params" } } },
{ 426, "io_uring_enter", 6, { { "unsigned int", "fd" }, { "u32", "to_submit" }, { "u32", "min_complete" }, { "u32", "flags" }, { "const void *", "argp" }, { "size_t", "argsz" } } },
{ 427, "io_uring_register", 4, { { "unsigned int", "fd" }, { "unsigned int", "opcode" }, { "void *", "arg" }, { "unsigned int", "nr_args" } } },
{ 428, "open_tree", 3, { { "int", "dfd" }, { "const char *", "filename" }, { "unsigned", "flags" } } },
{ 429, "move_mount", 5, { { "int", "from_dfd" }, { "const char *", "from_pathname" }, { "int", "to_dfd" }, { "const char *", "to_pathname" }, { "unsigned int", "flags" } } },
{ 430, "fsopen", 2, { { "const char *", "_fs_name" }, { "unsigned int", "flags" } } },
{ 431, "fsconfig", 5, { { "int", "fd" }, { "unsigned int", "cmd" }, { "const char *", "_key" }, { "const void *", "_value" }, { "int", "aux" } } },
{ 432, "fsmount", 3, { { "int", "fs_fd" }, { "unsigned int", "flags" }, { "unsigned int", "attr_flags" } } },
{ 433, "fspick", 3, { { "int", "dfd" }, { "const char *", "path" }, { "unsigned int", "flags" } } },
{ 434, "pidfd_open", 2, { { "pid_t", "pid" }, { "unsigned int", "flags" } } },
{ 435, "clone3", 2, { { "struct clone_args *", "uargs" }, { "size_t", "size" } } },
{ 436, "close_range", 3, { { "unsigned int", "fd" }, { "unsigned int", "max_fd" }, { "unsigned int", "flags" } } },
{ 437, "openat2", 4, { { "int", "dfd" }, { "const char *", "filename" }, { "struct open_how *", "how" }, { "size_t", "usize" } } },
{ 438, "pidfd_getfd", 3, { { "int", "pidfd" }, { "int", "fd" }, { "unsigned int", "flags" } } },
{ 439, "faccessat2", 4, { { "int", "dfd" }, { "const char *", "filename" }, { "int", "mode" }, { "int", "flags" } } },
{ 440, "process_madvise", 5, { { "int", "pidfd" }, { "const struct iovec *", "vec" }, { "size_t", "vlen" }, { "int", "behavior" }, { "unsigned int", "flags" } } },
{ 441, "epoll_pwait2", 6, { { "int", "epfd" }, { "struct epoll_event *", "events" }, { "int", "maxevents" }, { "const struct __kernel_timespec *", "timeout" }, { "const sigset_t *", "sigmask" }, { "size_t", "sigsetsize" } } },
{ 442, "mount_setattr", 5, { { "int", "dfd" }, { "const char *", "path" }, { "unsigned int", "flags" }, { "struct mount_attr *", "uattr" }, { "size_t", "usize" } } },
{ 443, "quotactl_fd", 4, { { "unsigned int", "fd" }, { "unsigned int", "cmd" }, { "qid_t", "id" }, { "void *", "addr" } } },
{ 444, "landlock_create_ruleset", 3, { { "const struct landlock_ruleset_attr *const", "attr" }, { "const size_t", "size" }, { "const __u32", "flags" } } },
{ 445, "landlock_add_rule", 4, { { "const int", "ruleset_fd" }, { "const enum landlock_rule_type", "rule_type" }, { "const void *const", "rule_attr" }, { "const __u32", "flags" } } },
{ 446, "landlock_restrict_self", 2, { { "const int", "ruleset_fd" }, { "const __u32", "flags" } } },
{ 448, "process_mrelease", 2, { { "int", "pidfd" }, { "unsigned int", "flags" } } },
{ 449, "futex_waitv", 5, { { "struct futex_waitv *", "waiters" }, { "unsigned int", "nr_futexes" }, { "unsigned int", "flags" }, { "struct __kernel_timespec *", "timeout" }, { "clockid_t", "clockid" } } },
{ 450, "set_mempolicy_home_node", 4, { { "unsigned long", "start" }, { "unsigned long", "len" }, { "unsigned long", "home_node" }, { "unsigned long", "flags" } } },
{ 451, "cachestat", 4, { { "unsigned int", "fd" }, { "struct cachestat_range *", "cstat_range" }, { "struct cachestat *", "cstat" }, { "unsigned int", "flags" } } },
{ 452, "fchmodat2", 4, { { "int", "dfd" }, { "const char *", "filename" }, { "umode_t", "mode" }, { "unsigned int", "flags" } } },
{ 453, "map_shadow_stack", 3, { { "unsigned long", "addr" }, { "unsigned long", "size" }, { "unsigned int", "flags" } } },
{ 454, "futex_wake", 4, { { "void *", "uaddr" }, { "unsigned long", "mask" }, { "int", "nr" }, { "unsigned int", "flags" } } },
{ 455, "futex_wait", 6, { { "void *", "uaddr" }, { "unsigned long", "val" }, { "unsigned long", "mask" }, { "unsigned int", "flags" }, { "struct __kernel_timespec *", "timeout" }, { "clockid_t", "clockid" } } },
{ 456, "futex_requeue", 4, { { "struct futex_waitv *", "waiters" }, { "unsigned int", "flags" }, { "int", "nr_wake" }, { "int", "nr_requeue" } } },
{ 457, "statmount", 4, { { "const struct mnt_id_req *", "req" }, { "struct statmount *", "buf" }, { "size_t", "bufsize" }, { "unsigned int", "flags" } } },
{ 458, "listmount", 4, { { "const struct mnt_id_req *", "req" }, { "u64 *", "mnt_ids" }, { "size_t", "nr_mnt_ids" }, { "unsigned int", "flags" } } },
{ 459, "lsm_get_self_attr", 4, { { "unsigned int", "attr" }, { "struct lsm_ctx *", "ctx" }, { "u32 *", "size" }, { "u32", "flags" } } },
{ 460, "lsm_set_self_attr", 4, { { "unsigned int", "attr" }, { "struct lsm_ctx *", "ctx" }, { "u32", "size" }, { "u32", "flags" } } },
{ 461, "lsm_list_modules", 3, { { "u64 *", "ids" }, { "u32 *", "size" }, { "u32", "flags" } } },
{ 462, "mseal", 3, { { "unsigned long", "start" }, { "size_t", "len" }, { "unsigned long", "flags" } } },
{ 463, "setxattrat", 6, { { "int", "dfd" }, { "const char *", "pathname" }, { "unsigned int", "at_flags" }, { "const char *", "name" }, { "const struct xattr_args *", "uargs" }, { "size_t", "usize" } } },
{ 464, "getxattrat", 6, { { "int", "dfd" }, { "const char *", "pathname" }, { "unsigned int", "at_flags" }, { "const char *", "name" }, { "struct xattr_args *", "uargs" }, { "size_t", "usize" } } },
{ 465, "listxattrat", 5, { { "int", "dfd" }, { "const char *", "pathname" }, { "unsigned int", "at_flags" }, { "char *", "list" }, { "size_t", "size" } } },
{ 466, "removexattrat", 4, { { "int", "dfd" }, { "const char *", "pathname" }, { "unsigned int", "at_flags" }, { "const char *", "name" } } },
{ 467, "open_tree_attr", 5, { { "int", "dfd" }, { "const char *", "filename" }, { "unsigned", "flags" }, { "struct mount_attr *", "uattr" }, { "size_t", "usize" } } },
{ 468, "file_getattr", 5, { { "int", "dfd" }, { "const char *", "filename" }, { "struct file_attr *", "ufattr" }, { "size_t", "usize" }, { "unsigned int", "at_flags" } } },
{ 469, "file_setattr", 5, { { "int", "dfd" }, { "const char *", "filename" }, { "struct file_attr *", "ufattr" }, { "size_t", "usize" }, { "unsigned int", "at_flags" } } },
{ 470, "listns", 4, { { "const struct ns_id_req *", "req" }, { "u64 *", "ns_ids" }, { "size_t", "nr_ns_ids" }, { "unsigned int", "flags" } } },
};
static const FridaLinuxSyscallSignature frida_compat32_syscall_signatures[] =
{
{ 0, "restart_syscall", 0, {} },
{ 1, "exit", 1, { { "int", "error_code" } } },
{ 2, "fork", 0, {} },
{ 3, "read", 3, { { "unsigned int", "fd" }, { "char *", "buf" }, { "size_t", "count" } } },
{ 4, "write", 3, { { "unsigned int", "fd" }, { "const char *", "buf" }, { "size_t", "count" } } },
{ 5, "open", 3, { { "const char *", "filename" }, { "int", "flags" }, { "umode_t", "mode" } } },
{ 6, "close", 1, { { "unsigned int", "fd" } } },
{ 8, "creat", 2, { { "const char *", "pathname" }, { "umode_t", "mode" } } },
{ 9, "link", 2, { { "const char *", "oldname" }, { "const char *", "newname" } } },
{ 10, "unlink", 1, { { "const char *", "pathname" } } },
{ 11, "execve", 3, { { "const char *", "filename" }, { "const compat_uptr_t *", "argv" }, { "const compat_uptr_t *", "envp" } } },
{ 12, "chdir", 1, { { "const char *", "filename" } } },
{ 14, "mknod", 3, { { "const char *", "filename" }, { "umode_t", "mode" }, { "unsigned", "dev" } } },
{ 15, "chmod", 2, { { "const char *", "filename" }, { "umode_t", "mode" } } },
{ 16, "lchown", 3, { { "const char *", "filename" }, { "uid_t", "user" }, { "gid_t", "group" } } },
{ 19, "lseek", 3, { { "unsigned int", "fd" }, { "compat_off_t", "offset" }, { "unsigned int", "whence" } } },
{ 20, "getpid", 0, {} },
{ 21, "mount", 5, { { "char *", "dev_name" }, { "char *", "dir_name" }, { "char *", "type" }, { "unsigned long", "flags" }, { "void *", "data" } } },
{ 23, "setuid", 1, { { "uid_t", "uid" } } },
{ 24, "getuid", 0, {} },
{ 26, "ptrace", 4, { { "compat_long_t", "request" }, { "compat_long_t", "pid" }, { "compat_long_t", "addr" }, { "compat_long_t", "data" } } },
{ 29, "pause", 0, {} },
{ 33, "access", 2, { { "const char *", "filename" }, { "int", "mode" } } },
{ 34, "nice", 1, { { "int", "increment" } } },
{ 36, "sync", 0, {} },
{ 37, "kill", 2, { { "pid_t", "pid" }, { "int", "sig" } } },
{ 38, "rename", 2, { { "const char *", "oldname" }, { "const char *", "newname" } } },
{ 39, "mkdir", 2, { { "const char *", "pathname" }, { "umode_t", "mode" } } },
{ 40, "rmdir", 1, { { "const char *", "pathname" } } },
{ 41, "dup", 1, { { "unsigned int", "fildes" } } },
{ 42, "pipe", 1, { { "int *", "fildes" } } },
{ 43, "times", 1, { { "struct compat_tms *", "tbuf" } } },
{ 45, "brk", 1, { { "unsigned long", "brk" } } },
{ 46, "setgid", 1, { { "gid_t", "gid" } } },
{ 47, "getgid", 0, {} },
{ 49, "geteuid", 0, {} },
{ 50, "getegid", 0, {} },
{ 51, "acct", 1, { { "const char *", "name" } } },
{ 52, "umount2", 2, { { "char *", "name" }, { "int", "flags" } } },
{ 54, "ioctl", 3, { { "unsigned int", "fd" }, { "unsigned int", "cmd" }, { "compat_ulong_t", "arg" } } },
{ 55, "fcntl", 3, { { "unsigned int", "fd" }, { "unsigned int", "cmd" }, { "compat_ulong_t", "arg" } } },
{ 57, "setpgid", 2, { { "pid_t", "pid" }, { "pid_t", "pgid" } } },
{ 60, "umask", 1, { { "int", "mask" } } },
{ 61, "chroot", 1, { { "const char *", "filename" } } },
{ 62, "ustat", 2, { { "unsigned", "dev" }, { "struct compat_ustat *", "u" } } },
{ 63, "dup2", 2, { { "unsigned int", "oldfd" }, { "unsigned int", "newfd" } } },
{ 64, "getppid", 0, {} },
{ 65, "getpgrp", 0, {} },
{ 66, "setsid", 0, {} },
{ 67, "sigaction", 3, { { "int", "sig" }, { "const struct compat_old_sigaction *", "act" }, { "struct compat_old_sigaction *", "oact" } } },
{ 70, "setreuid", 2, { { "uid_t", "ruid" }, { "uid_t", "euid" } } },
{ 71, "setregid", 2, { { "gid_t", "rgid" }, { "gid_t", "egid" } } },
{ 72, "sigsuspend", 3, { { "int", "unused1" }, { "int", "unused2" }, { "old_sigset_t", "mask" } } },
{ 73, "sigpending", 1, { { "compat_old_sigset_t *", "set32" } } },
{ 74, "sethostname", 2, { { "char *", "name" }, { "int", "len" } } },
{ 75, "setrlimit", 2, { { "unsigned int", "resource" }, { "struct compat_rlimit *", "rlim" } } },
{ 77, "getrusage", 2, { { "int", "who" }, { "struct compat_rusage *", "ru" } } },
{ 78, "gettimeofday", 2, { { "struct old_timeval32 *", "tv" }, { "struct timezone *", "tz" } } },
{ 79, "settimeofday", 2, { { "struct old_timeval32 *", "tv" }, { "struct timezone *", "tz" } } },
{ 80, "getgroups", 2, { { "int", "gidsetsize" }, { "gid_t *", "grouplist" } } },
{ 81, "setgroups", 2, { { "int", "gidsetsize" }, { "gid_t *", "grouplist" } } },
{ 83, "symlink", 2, { { "const char *", "oldname" }, { "const char *", "newname" } } },
{ 85, "readlink", 3, { { "const char *", "path" }, { "char *", "buf" }, { "int", "bufsiz" } } },
{ 86, "uselib", 1, { { "const char *", "library" } } },
{ 87, "swapon", 2, { { "const char *", "specialfile" }, { "int", "swap_flags" } } },
{ 88, "reboot", 4, { { "int", "magic1" }, { "int", "magic2" }, { "unsigned int", "cmd" }, { "void *", "arg" } } },
{ 91, "munmap", 2, { { "unsigned long", "addr" }, { "size_t", "len" } } },
{ 92, "truncate", 2, { { "const char *", "path" }, { "compat_off_t", "length" } } },
{ 93, "ftruncate", 2, { { "unsigned int", "fd" }, { "compat_off_t", "length" } } },
{ 94, "fchmod", 2, { { "unsigned int", "fd" }, { "umode_t", "mode" } } },
{ 95, "fchown", 3, { { "unsigned int", "fd" }, { "uid_t", "user" }, { "gid_t", "group" } } },
{ 96, "getpriority", 2, { { "int", "which" }, { "int", "who" } } },
{ 97, "setpriority", 3, { { "int", "which" }, { "int", "who" }, { "int", "niceval" } } },
{ 99, "statfs", 2, { { "const char *", "pathname" }, { "struct compat_statfs *", "buf" } } },
{ 100, "fstatfs", 2, { { "unsigned int", "fd" }, { "struct compat_statfs *", "buf" } } },
{ 103, "syslog", 3, { { "int", "type" }, { "char *", "buf" }, { "int", "len" } } },
{ 104, "setitimer", 3, { { "int", "which" }, { "struct old_itimerval32 *", "value" }, { "struct old_itimerval32 *", "ovalue" } } },
{ 105, "getitimer", 2, { { "int", "which" }, { "struct old_itimerval32 *", "value" } } },
{ 106, "stat", 2, { { "const char *", "filename" }, { "struct compat_stat *", "statbuf" } } },
{ 107, "lstat", 2, { { "const char *", "filename" }, { "struct compat_stat *", "statbuf" } } },
{ 108, "fstat", 2, { { "unsigned int", "fd" }, { "struct compat_stat *", "statbuf" } } },
{ 111, "vhangup", 0, {} },
{ 114, "wait4", 4, { { "compat_pid_t", "pid" }, { "compat_uint_t *", "stat_addr" }, { "int", "options" }, { "struct compat_rusage *", "ru" } } },
{ 115, "swapoff", 1, { { "const char *", "specialfile" } } },
{ 116, "sysinfo", 1, { { "struct compat_sysinfo *", "info" } } },
{ 118, "fsync", 1, { { "unsigned int", "fd" } } },
{ 119, "sigreturn", 0, {} },
{ 120, "clone", 5, { { "unsigned long", "clone_flags" }, { "unsigned long", "newsp" }, { "int *", "parent_tidptr" }, { "int *", "child_tidptr" }, { "unsigned long", "tls" } } },
{ 121, "setdomainname", 2, { { "char *", "name" }, { "int", "len" } } },
{ 122, "uname", 1, { { "struct new_utsname *", "name" } } },
{ 124, "adjtimex", 1, { { "struct __kernel_timex *", "txc_p" } } },
{ 125, "mprotect", 3, { { "unsigned long", "start" }, { "size_t", "len" }, { "unsigned long", "prot" } } },
{ 126, "sigprocmask", 3, { { "int", "how" }, { "compat_old_sigset_t *", "nset" }, { "compat_old_sigset_t *", "oset" } } },
{ 128, "init_module", 3, { { "void *", "umod" }, { "unsigned long", "len" }, { "const char *", "uargs" } } },
{ 129, "delete_module", 2, { { "const char *", "name_user" }, { "unsigned int", "flags" } } },
{ 131, "quotactl", 4, { { "unsigned int", "cmd" }, { "const char *", "special" }, { "qid_t", "id" }, { "void *", "addr" } } },
{ 132, "getpgid", 1, { { "pid_t", "pid" } } },
{ 133, "fchdir", 1, { { "unsigned int", "fd" } } },
{ 134, "bdflush", 0, {} },
{ 135, "sysfs", 3, { { "int", "option" }, { "unsigned long", "arg1" }, { "unsigned long", "arg2" } } },
{ 136, "personality", 1, { { "unsigned int", "personality" } } },
{ 138, "setfsuid", 1, { { "uid_t", "uid" } } },
{ 139, "setfsgid", 1, { { "gid_t", "gid" } } },
{ 140, "_llseek", 5, { { "unsigned int", "fd" }, { "unsigned long", "offset_high" }, { "unsigned long", "offset_low" }, { "loff_t *", "result" }, { "unsigned int", "whence" } } },
{ 141, "getdents", 3, { { "unsigned int", "fd" }, { "struct compat_linux_dirent *", "dirent" }, { "unsigned int", "count" } } },
{ 142, "_newselect", 5, { { "int", "n" }, { "compat_ulong_t *", "inp" }, { "compat_ulong_t *", "outp" }, { "compat_ulong_t *", "exp" }, { "struct old_timeval32 *", "tvp" } } },
{ 143, "flock", 2, { { "unsigned int", "fd" }, { "unsigned int", "cmd" } } },
{ 144, "msync", 3, { { "unsigned long", "start" }, { "size_t", "len" }, { "int", "flags" } } },
{ 145, "readv", 3, { { "unsigned long", "fd" }, { "const struct iovec *", "vec" }, { "unsigned long", "vlen" } } },
{ 146, "writev", 3, { { "unsigned long", "fd" }, { "const struct iovec *", "vec" }, { "unsigned long", "vlen" } } },
{ 147, "getsid", 1, { { "pid_t", "pid" } } },
{ 148, "fdatasync", 1, { { "unsigned int", "fd" } } },
{ 149, "_sysctl", 0, {} },
{ 150, "mlock", 2, { { "unsigned long", "start" }, { "size_t", "len" } } },
{ 151, "munlock", 2, { { "unsigned long", "start" }, { "size_t", "len" } } },
{ 152, "mlockall", 1, { { "int", "flags" } } },
{ 153, "munlockall", 0, {} },
{ 154, "sched_setparam", 2, { { "pid_t", "pid" }, { "struct sched_param *", "param" } } },
{ 155, "sched_getparam", 2, { { "pid_t", "pid" }, { "struct sched_param *", "param" } } },
{ 156, "sched_setscheduler", 3, { { "pid_t", "pid" }, { "int", "policy" }, { "struct sched_param *", "param" } } },
{ 157, "sched_getscheduler", 1, { { "pid_t", "pid" } } },
{ 158, "sched_yield", 0, {} },
{ 159, "sched_get_priority_max", 1, { { "int", "policy" } } },
{ 160, "sched_get_priority_min", 1, { { "int", "policy" } } },
{ 161, "sched_rr_get_interval", 2, { { "pid_t", "pid" }, { "struct __kernel_timespec *", "interval" } } },
{ 162, "nanosleep", 2, { { "struct __kernel_timespec *", "rqtp" }, { "struct __kernel_timespec *", "rmtp" } } },
{ 163, "mremap", 5, { { "unsigned long", "addr" }, { "unsigned long", "old_len" }, { "unsigned long", "new_len" }, { "unsigned long", "flags" }, { "unsigned long", "new_addr" } } },
{ 164, "setresuid", 3, { { "uid_t", "ruid" }, { "uid_t", "euid" }, { "uid_t", "suid" } } },
{ 165, "getresuid", 3, { { "uid_t *", "ruidp" }, { "uid_t *", "euidp" }, { "uid_t *", "suidp" } } },
{ 168, "poll", 3, { { "struct pollfd *", "ufds" }, { "unsigned int", "nfds" }, { "int", "timeout_msecs" } } },
{ 169, "nfsservctl", 0, {} },
{ 170, "setresgid", 3, { { "gid_t", "rgid" }, { "gid_t", "egid" }, { "gid_t", "sgid" } } },
{ 171, "getresgid", 3, { { "gid_t *", "rgidp" }, { "gid_t *", "egidp" }, { "gid_t *", "sgidp" } } },
{ 172, "prctl", 5, { { "int", "option" }, { "unsigned long", "arg2" }, { "unsigned long", "arg3" }, { "unsigned long", "arg4" }, { "unsigned long", "arg5" } } },
{ 173, "rt_sigreturn", 0, {} },
{ 174, "rt_sigaction", 4, { { "int", "sig" }, { "const struct compat_sigaction *", "act" }, { "struct compat_sigaction *", "oact" }, { "compat_size_t", "sigsetsize" } } },
{ 175, "rt_sigprocmask", 4, { { "int", "how" }, { "compat_sigset_t *", "nset" }, { "compat_sigset_t *", "oset" }, { "compat_size_t", "sigsetsize" } } },
{ 176, "rt_sigpending", 2, { { "compat_sigset_t *", "uset" }, { "compat_size_t", "sigsetsize" } } },
{ 177, "rt_sigtimedwait", 4, { { "const sigset_t *", "uthese" }, { "siginfo_t *", "uinfo" }, { "const struct __kernel_timespec *", "uts" }, { "size_t", "sigsetsize" } } },
{ 178, "rt_sigqueueinfo", 3, { { "compat_pid_t", "pid" }, { "int", "sig" }, { "struct compat_siginfo *", "uinfo" } } },
{ 179, "rt_sigsuspend", 2, { { "compat_sigset_t *", "unewset" }, { "compat_size_t", "sigsetsize" } } },
{ 180, "pread64", 4, { { "unsigned int", "fd" }, { "char *", "buf" }, { "size_t", "count" }, { "loff_t", "pos" } } },
{ 181, "pwrite64", 4, { { "unsigned int", "fd" }, { "const char *", "buf" }, { "size_t", "count" }, { "loff_t", "pos" } } },
{ 182, "chown", 3, { { "const char *", "filename" }, { "uid_t", "user" }, { "gid_t", "group" } } },
{ 183, "getcwd", 2, { { "char *", "buf" }, { "unsigned long", "size" } } },
{ 184, "capget", 2, { { "cap_user_header_t", "header" }, { "cap_user_data_t", "dataptr" } } },
{ 185, "capset", 2, { { "cap_user_header_t", "header" }, { "const cap_user_data_t", "data" } } },
{ 186, "sigaltstack", 2, { { "const compat_stack_t *", "uss_ptr" }, { "compat_stack_t *", "uoss_ptr" } } },
{ 187, "sendfile", 4, { { "int", "out_fd" }, { "int", "in_fd" }, { "compat_off_t *", "offset" }, { "compat_size_t", "count" } } },
{ 190, "vfork", 0, {} },
{ 191, "ugetrlimit", 2, { { "unsigned int", "resource" }, { "struct compat_rlimit *", "rlim" } } },
{ 192, "mmap2", 6, { { "unsigned long", "addr" }, { "unsigned long", "len" }, { "unsigned long", "prot" }, { "unsigned long", "flags" }, { "unsigned long", "fd" }, { "unsigned long", "off_4k" } } },
#if G_BYTE_ORDER == G_BIG_ENDIAN
{ 193, "truncate64", 4, { { "const char *", "pathname" }, { "u32", "__pad" }, { "u32", "length_hi" }, { "u32", "length_lo" } } },
#else
{ 193, "truncate64", 4, { { "const char *", "pathname" }, { "u32", "__pad" }, { "u32", "length_lo" }, { "u32", "length_hi" } } },
#endif
#if G_BYTE_ORDER == G_BIG_ENDIAN
{ 194, "ftruncate64", 4, { { "unsigned int", "fd" }, { "u32", "__pad" }, { "u32", "length_hi" }, { "u32", "length_lo" } } },
#else
{ 194, "ftruncate64", 4, { { "unsigned int", "fd" }, { "u32", "__pad" }, { "u32", "length_lo" }, { "u32", "length_hi" } } },
#endif
{ 195, "stat64", 2, { { "const char *", "filename" }, { "struct stat64 *", "statbuf" } } },
{ 196, "lstat64", 2, { { "const char *", "filename" }, { "struct stat64 *", "statbuf" } } },
{ 197, "fstat64", 2, { { "unsigned long", "fd" }, { "struct stat64 *", "statbuf" } } },
{ 198, "lchown32", 3, { { "const char *", "filename" }, { "uid_t", "user" }, { "gid_t", "group" } } },
{ 199, "getuid32", 0, {} },
{ 200, "getgid32", 0, {} },
{ 201, "geteuid32", 0, {} },
{ 202, "getegid32", 0, {} },
{ 203, "setreuid32", 2, { { "uid_t", "ruid" }, { "uid_t", "euid" } } },
{ 204, "setregid32", 2, { { "gid_t", "rgid" }, { "gid_t", "egid" } } },
{ 205, "getgroups32", 2, { { "int", "gidsetsize" }, { "gid_t *", "grouplist" } } },
{ 206, "setgroups32", 2, { { "int", "gidsetsize" }, { "gid_t *", "grouplist" } } },
{ 207, "fchown32", 3, { { "unsigned int", "fd" }, { "uid_t", "user" }, { "gid_t", "group" } } },
{ 208, "setresuid32", 3, { { "uid_t", "ruid" }, { "uid_t", "euid" }, { "uid_t", "suid" } } },
{ 209, "getresuid32", 3, { { "uid_t *", "ruid" }, { "uid_t *", "euid" }, { "uid_t *", "suid" } } },
{ 210, "setresgid32", 3, { { "gid_t", "rgid" }, { "gid_t", "egid" }, { "gid_t", "sgid" } } },
{ 211, "getresgid32", 3, { { "gid_t *", "rgid" }, { "gid_t *", "egid" }, { "gid_t *", "sgid" } } },
{ 212, "chown32", 3, { { "const char *", "filename" }, { "uid_t", "user" }, { "gid_t", "group" } } },
{ 213, "setuid32", 1, { { "uid_t", "uid" } } },
{ 214, "setgid32", 1, { { "gid_t", "gid" } } },
{ 215, "setfsuid32", 1, { { "uid_t", "uid" } } },
{ 216, "setfsgid32", 1, { { "gid_t", "gid" } } },
{ 217, "getdents64", 3, { { "unsigned int", "fd" }, { "struct linux_dirent64 *", "dirent" }, { "unsigned int", "count" } } },
{ 218, "pivot_root", 2, { { "const char *", "new_root" }, { "const char *", "put_old" } } },
{ 219, "mincore", 3, { { "unsigned long", "start" }, { "size_t", "len" }, { "unsigned char *", "vec" } } },
{ 220, "madvise", 3, { { "unsigned long", "start" }, { "size_t", "len_in" }, { "int", "behavior" } } },
{ 221, "fcntl64", 3, { { "unsigned int", "fd" }, { "unsigned int", "cmd" }, { "compat_ulong_t", "arg" } } },
{ 224, "gettid", 0, {} },
{ 225, "readahead", 3, { { "int", "fd" }, { "loff_t", "offset" }, { "size_t", "count" } } },
{ 226, "setxattr", 5, { { "const char *", "pathname" }, { "const char *", "name" }, { "const void *", "value" }, { "size_t", "size" }, { "int", "flags" } } },
{ 227, "lsetxattr", 5, { { "const char *", "pathname" }, { "const char *", "name" }, { "const void *", "value" }, { "size_t", "size" }, { "int", "flags" } } },
{ 228, "fsetxattr", 5, { { "int", "fd" }, { "const char *", "name" }, { "const void *", "value" }, { "size_t", "size" }, { "int", "flags" } } },
{ 229, "getxattr", 4, { { "const char *", "pathname" }, { "const char *", "name" }, { "void *", "value" }, { "size_t", "size" } } },
{ 230, "lgetxattr", 4, { { "const char *", "pathname" }, { "const char *", "name" }, { "void *", "value" }, { "size_t", "size" } } },
{ 231, "fgetxattr", 4, { { "int", "fd" }, { "const char *", "name" }, { "void *", "value" }, { "size_t", "size" } } },
{ 232, "listxattr", 3, { { "const char *", "pathname" }, { "char *", "list" }, { "size_t", "size" } } },
{ 233, "llistxattr", 3, { { "const char *", "pathname" }, { "char *", "list" }, { "size_t", "size" } } },
{ 234, "flistxattr", 3, { { "int", "fd" }, { "char *", "list" }, { "size_t", "size" } } },
{ 235, "removexattr", 2, { { "const char *", "pathname" }, { "const char *", "name" } } },
{ 236, "lremovexattr", 2, { { "const char *", "pathname" }, { "const char *", "name" } } },
{ 237, "fremovexattr", 2, { { "int", "fd" }, { "const char *", "name" } } },
{ 238, "tkill", 2, { { "pid_t", "pid" }, { "int", "sig" } } },
{ 239, "sendfile64", 4, { { "int", "out_fd" }, { "int", "in_fd" }, { "compat_loff_t *", "offset" }, { "compat_size_t", "count" } } },
{ 240, "futex", 6, { { "u32 *", "uaddr" }, { "int", "op" }, { "u32", "val" }, { "const struct __kernel_timespec *", "utime" }, { "u32 *", "uaddr2" }, { "u32", "val3" } } },
{ 241, "sched_setaffinity", 3, { { "compat_pid_t", "pid" }, { "unsigned int", "len" }, { "compat_ulong_t *", "user_mask_ptr" } } },
{ 242, "sched_getaffinity", 3, { { "compat_pid_t", "pid" }, { "unsigned int", "len" }, { "compat_ulong_t *", "user_mask_ptr" } } },
{ 243, "io_setup", 2, { { "unsigned", "nr_events" }, { "u32 *", "ctx32p" } } },
{ 244, "io_destroy", 1, { { "aio_context_t", "ctx" } } },
{ 245, "io_getevents", 5, { { "aio_context_t", "ctx_id" }, { "long", "min_nr" }, { "long", "nr" }, { "struct io_event *", "events" }, { "struct __kernel_timespec *", "timeout" } } },
{ 246, "io_submit", 3, { { "compat_aio_context_t", "ctx_id" }, { "int", "nr" }, { "compat_uptr_t *", "iocbpp" } } },
{ 247, "io_cancel", 3, { { "aio_context_t", "ctx_id" }, { "struct iocb *", "iocb" }, { "struct io_event *", "result" } } },
{ 248, "exit_group", 1, { { "int", "error_code" } } },
{ 249, "lookup_dcookie", 0, {} },
{ 250, "epoll_create", 1, { { "int", "size" } } },
{ 251, "epoll_ctl", 4, { { "int", "epfd" }, { "int", "op" }, { "int", "fd" }, { "struct epoll_event *", "event" } } },
{ 252, "epoll_wait", 4, { { "int", "epfd" }, { "struct epoll_event *", "events" }, { "int", "maxevents" }, { "int", "timeout" } } },
{ 253, "remap_file_pages", 5, { { "unsigned long", "start" }, { "unsigned long", "size" }, { "unsigned long", "prot" }, { "unsigned long", "pgoff" }, { "unsigned long", "flags" } } },
{ 256, "set_tid_address", 1, { { "int *", "tidptr" } } },
{ 257, "timer_create", 3, { { "clockid_t", "which_clock" }, { "struct compat_sigevent *", "timer_event_spec" }, { "timer_t *", "created_timer_id" } } },
{ 258, "timer_settime", 4, { { "timer_t", "timer_id" }, { "int", "flags" }, { "const struct __kernel_itimerspec *", "new_setting" }, { "struct __kernel_itimerspec *", "old_setting" } } },
{ 259, "timer_gettime", 2, { { "timer_t", "timer_id" }, { "struct __kernel_itimerspec *", "setting" } } },
{ 260, "timer_getoverrun", 1, { { "timer_t", "timer_id" } } },
{ 261, "timer_delete", 1, { { "timer_t", "timer_id" } } },
{ 262, "clock_settime", 2, { { "const clockid_t", "which_clock" }, { "const struct __kernel_timespec *", "tp" } } },
{ 263, "clock_gettime", 2, { { "const clockid_t", "which_clock" }, { "struct __kernel_timespec *", "tp" } } },
{ 264, "clock_getres", 2, { { "const clockid_t", "which_clock" }, { "struct __kernel_timespec *", "tp" } } },
{ 265, "clock_nanosleep", 4, { { "const clockid_t", "which_clock" }, { "int", "flags" }, { "const struct __kernel_timespec *", "rqtp" }, { "struct __kernel_timespec *", "rmtp" } } },
{ 266, "statfs64", 3, { { "const char *", "pathname" }, { "compat_size_t", "sz" }, { "struct compat_statfs64 *", "buf" } } },
{ 267, "fstatfs64", 3, { { "unsigned int", "fd" }, { "compat_size_t", "sz" }, { "struct compat_statfs64 *", "buf" } } },
{ 268, "tgkill", 3, { { "pid_t", "tgid" }, { "pid_t", "pid" }, { "int", "sig" } } },
{ 269, "utimes", 2, { { "const char *", "filename" }, { "struct old_timeval32 *", "t" } } },
#if G_BYTE_ORDER == G_BIG_ENDIAN
{ 270, "arm_fadvise64_64", 6, { { "int", "fd" }, { "int", "advice" }, { "u32", "offset_hi" }, { "u32", "offset_lo" }, { "u32", "len_hi" }, { "u32", "len_lo" } } },
#else
{ 270, "arm_fadvise64_64", 6, { { "int", "fd" }, { "int", "advice" }, { "u32", "offset_lo" }, { "u32", "offset_hi" }, { "u32", "len_lo" }, { "u32", "len_hi" } } },
#endif
{ 271, "pciconfig_iobase", 3, { { "long", "which" }, { "unsigned long", "bus" }, { "unsigned long", "devfn" } } },
{ 272, "pciconfig_read", 5, { { "unsigned long", "bus" }, { "unsigned long", "dfn" }, { "unsigned long", "off" }, { "unsigned long", "len" }, { "void *", "buf" } } },
{ 273, "pciconfig_write", 5, { { "unsigned long", "bus" }, { "unsigned long", "dfn" }, { "unsigned long", "off" }, { "unsigned long", "len" }, { "void *", "buf" } } },
{ 274, "mq_open", 4, { { "const char *", "u_name" }, { "int", "oflag" }, { "compat_mode_t", "mode" }, { "struct compat_mq_attr *", "u_attr" } } },
{ 275, "mq_unlink", 1, { { "const char *", "u_name" } } },
{ 276, "mq_timedsend", 5, { { "mqd_t", "mqdes" }, { "const char *", "u_msg_ptr" }, { "size_t", "msg_len" }, { "unsigned int", "msg_prio" }, { "const struct __kernel_timespec *", "u_abs_timeout" } } },
{ 277, "mq_timedreceive", 5, { { "mqd_t", "mqdes" }, { "char *", "u_msg_ptr" }, { "size_t", "msg_len" }, { "unsigned int *", "u_msg_prio" }, { "const struct __kernel_timespec *", "u_abs_timeout" } } },
{ 278, "mq_notify", 2, { { "mqd_t", "mqdes" }, { "const struct compat_sigevent *", "u_notification" } } },
{ 279, "mq_getsetattr", 3, { { "mqd_t", "mqdes" }, { "const struct compat_mq_attr *", "u_mqstat" }, { "struct compat_mq_attr *", "u_omqstat" } } },
{ 280, "waitid", 5, { { "int", "which" }, { "compat_pid_t", "pid" }, { "struct compat_siginfo *", "infop" }, { "int", "options" }, { "struct compat_rusage *", "uru" } } },
{ 281, "socket", 3, { { "int", "family" }, { "int", "type" }, { "int", "protocol" } } },
{ 282, "bind", 3, { { "int", "fd" }, { "struct sockaddr *", "umyaddr" }, { "int", "addrlen" } } },
{ 283, "connect", 3, { { "int", "fd" }, { "struct sockaddr *", "uservaddr" }, { "int", "addrlen" } } },
{ 284, "listen", 2, { { "int", "fd" }, { "int", "backlog" } } },
{ 285, "accept", 3, { { "int", "fd" }, { "struct sockaddr *", "upeer_sockaddr" }, { "int *", "upeer_addrlen" } } },
{ 286, "getsockname", 3, { { "int", "fd" }, { "struct sockaddr *", "usockaddr" }, { "int *", "usockaddr_len" } } },
{ 287, "getpeername", 3, { { "int", "fd" }, { "struct sockaddr *", "usockaddr" }, { "int *", "usockaddr_len" } } },
{ 288, "socketpair", 4, { { "int", "family" }, { "int", "type" }, { "int", "protocol" }, { "int *", "usockvec" } } },
{ 289, "send", 4, { { "int", "fd" }, { "void *", "buff" }, { "size_t", "len" }, { "unsigned int", "flags" } } },
{ 290, "sendto", 6, { { "int", "fd" }, { "void *", "buff" }, { "size_t", "len" }, { "unsigned int", "flags" }, { "struct sockaddr *", "addr" }, { "int", "addr_len" } } },
{ 291, "recv", 4, { { "int", "fd" }, { "void *", "buf" }, { "compat_size_t", "len" }, { "unsigned int", "flags" } } },
{ 292, "recvfrom", 6, { { "int", "fd" }, { "void *", "buf" }, { "compat_size_t", "len" }, { "unsigned int", "flags" }, { "struct sockaddr *", "addr" }, { "int *", "addrlen" } } },
{ 293, "shutdown", 2, { { "int", "fd" }, { "int", "how" } } },
{ 294, "setsockopt", 5, { { "int", "fd" }, { "int", "level" }, { "int", "optname" }, { "char *", "optval" }, { "int", "optlen" } } },
{ 295, "getsockopt", 5, { { "int", "fd" }, { "int", "level" }, { "int", "optname" }, { "char *", "optval" }, { "int *", "optlen" } } },
{ 296, "sendmsg", 3, { { "int", "fd" }, { "struct compat_msghdr *", "msg" }, { "unsigned int", "flags" } } },
{ 297, "recvmsg", 3, { { "int", "fd" }, { "struct compat_msghdr *", "msg" }, { "unsigned int", "flags" } } },
{ 298, "semop", 3, { { "int", "semid" }, { "struct sembuf *", "tsops" }, { "unsigned", "nsops" } } },
{ 299, "semget", 3, { { "key_t", "key" }, { "int", "nsems" }, { "int", "semflg" } } },
{ 300, "semctl", 4, { { "int", "semid" }, { "int", "semnum" }, { "int", "cmd" }, { "int", "arg" } } },
{ 301, "msgsnd", 4, { { "int", "msqid" }, { "compat_uptr_t", "msgp" }, { "compat_ssize_t", "msgsz" }, { "int", "msgflg" } } },
{ 302, "msgrcv", 5, { { "int", "msqid" }, { "compat_uptr_t", "msgp" }, { "compat_ssize_t", "msgsz" }, { "compat_long_t", "msgtyp" }, { "int", "msgflg" } } },
{ 303, "msgget", 2, { { "key_t", "key" }, { "int", "msgflg" } } },
{ 304, "msgctl", 3, { { "int", "msqid" }, { "int", "cmd" }, { "void *", "uptr" } } },
{ 305, "shmat", 3, { { "int", "shmid" }, { "compat_uptr_t", "shmaddr" }, { "int", "shmflg" } } },
{ 306, "shmdt", 1, { { "char *", "shmaddr" } } },
{ 307, "shmget", 3, { { "key_t", "key" }, { "size_t", "size" }, { "int", "shmflg" } } },
{ 308, "shmctl", 3, { { "int", "shmid" }, { "int", "cmd" }, { "void *", "uptr" } } },
{ 309, "add_key", 5, { { "const char *", "_type" }, { "const char *", "_description" }, { "const void *", "_payload" }, { "size_t", "plen" }, { "key_serial_t", "ringid" } } },
{ 310, "request_key", 4, { { "const char *", "_type" }, { "const char *", "_description" }, { "const char *", "_callout_info" }, { "key_serial_t", "destringid" } } },
{ 311, "keyctl", 5, { { "u32", "option" }, { "u32", "arg2" }, { "u32", "arg3" }, { "u32", "arg4" }, { "u32", "arg5" } } },
{ 312, "semtimedop", 4, { { "int", "semid" }, { "struct sembuf *", "tsops" }, { "unsigned int", "nsops" }, { "const struct __kernel_timespec *", "timeout" } } },
{ 313, "vserver", 0, {} },
{ 314, "ioprio_set", 3, { { "int", "which" }, { "int", "who" }, { "int", "ioprio" } } },
{ 315, "ioprio_get", 2, { { "int", "which" }, { "int", "who" } } },
{ 316, "inotify_init", 0, {} },
{ 317, "inotify_add_watch", 3, { { "int", "fd" }, { "const char *", "pathname" }, { "u32", "mask" } } },
{ 318, "inotify_rm_watch", 2, { { "int", "fd" }, { "__s32", "wd" } } },
{ 319, "mbind", 6, { { "unsigned long", "start" }, { "unsigned long", "len" }, { "unsigned long", "mode" }, { "const unsigned long *", "nmask" }, { "unsigned long", "maxnode" }, { "unsigned int", "flags" } } },
{ 320, "get_mempolicy", 5, { { "int *", "policy" }, { "unsigned long *", "nmask" }, { "unsigned long", "maxnode" }, { "unsigned long", "addr" }, { "unsigned long", "flags" } } },
{ 321, "set_mempolicy", 3, { { "int", "mode" }, { "const unsigned long *", "nmask" }, { "unsigned long", "maxnode" } } },
{ 322, "openat", 4, { { "int", "dfd" }, { "const char *", "filename" }, { "int", "flags" }, { "umode_t", "mode" } } },
{ 323, "mkdirat", 3, { { "int", "dfd" }, { "const char *", "pathname" }, { "umode_t", "mode" } } },
{ 324, "mknodat", 4, { { "int", "dfd" }, { "const char *", "filename" }, { "umode_t", "mode" }, { "unsigned int", "dev" } } },
{ 325, "fchownat", 5, { { "int", "dfd" }, { "const char *", "filename" }, { "uid_t", "user" }, { "gid_t", "group" }, { "int", "flag" } } },
{ 326, "futimesat", 3, { { "unsigned int", "dfd" }, { "const char *", "filename" }, { "struct old_timeval32 *", "t" } } },
{ 327, "fstatat64", 4, { { "int", "dfd" }, { "const char *", "filename" }, { "struct stat64 *", "statbuf" }, { "int", "flag" } } },
{ 328, "unlinkat", 3, { { "int", "dfd" }, { "const char *", "pathname" }, { "int", "flag" } } },
{ 329, "renameat", 4, { { "int", "olddfd" }, { "const char *", "oldname" }, { "int", "newdfd" }, { "const char *", "newname" } } },
{ 330, "linkat", 5, { { "int", "olddfd" }, { "const char *", "oldname" }, { "int", "newdfd" }, { "const char *", "newname" }, { "int", "flags" } } },
{ 331, "symlinkat", 3, { { "const char *", "oldname" }, { "int", "newdfd" }, { "const char *", "newname" } } },
{ 332, "readlinkat", 4, { { "int", "dfd" }, { "const char *", "pathname" }, { "char *", "buf" }, { "int", "bufsiz" } } },
{ 333, "fchmodat", 3, { { "int", "dfd" }, { "const char *", "filename" }, { "umode_t", "mode" } } },
{ 334, "faccessat", 3, { { "int", "dfd" }, { "const char *", "filename" }, { "int", "mode" } } },
{ 335, "pselect6", 6, { { "int", "n" }, { "fd_set *", "inp" }, { "fd_set *", "outp" }, { "fd_set *", "exp" }, { "struct __kernel_timespec *", "tsp" }, { "void *", "sig" } } },
{ 336, "ppoll", 5, { { "struct pollfd *", "ufds" }, { "unsigned int", "nfds" }, { "struct __kernel_timespec *", "tsp" }, { "const sigset_t *", "sigmask" }, { "size_t", "sigsetsize" } } },
{ 337, "unshare", 1, { { "unsigned long", "unshare_flags" } } },
{ 338, "set_robust_list", 2, { { "struct compat_robust_list_head *", "head" }, { "compat_size_t", "len" } } },
{ 339, "get_robust_list", 3, { { "int", "pid" }, { "compat_uptr_t *", "head_ptr" }, { "compat_size_t *", "len_ptr" } } },
{ 340, "splice", 6, { { "int", "fd_in" }, { "loff_t *", "off_in" }, { "int", "fd_out" }, { "loff_t *", "off_out" }, { "size_t", "len" }, { "unsigned int", "flags" } } },
#if G_BYTE_ORDER == G_BIG_ENDIAN
{ 341, "arm_sync_file_range", 6, { { "int", "fd" }, { "unsigned int", "flags" }, { "u32", "offset_hi" }, { "u32", "offset_lo" }, { "u32", "nbytes_hi" }, { "u32", "nbytes_lo" } } },
#else
{ 341, "arm_sync_file_range", 6, { { "int", "fd" }, { "unsigned int", "flags" }, { "u32", "offset_lo" }, { "u32", "offset_hi" }, { "u32", "nbytes_lo" }, { "u32", "nbytes_hi" } } },
#endif
{ 342, "tee", 4, { { "int", "fdin" }, { "int", "fdout" }, { "size_t", "len" }, { "unsigned int", "flags" } } },
{ 343, "vmsplice", 4, { { "int", "fd" }, { "const struct iovec *", "uiov" }, { "unsigned long", "nr_segs" }, { "unsigned int", "flags" } } },
{ 344, "move_pages", 6, { { "pid_t", "pid" }, { "unsigned long", "nr_pages" }, { "const void * *", "pages" }, { "const int *", "nodes" }, { "int *", "status" }, { "int", "flags" } } },
{ 345, "getcpu", 3, { { "unsigned *", "cpup" }, { "unsigned *", "nodep" }, { "struct getcpu_cache *", "unused" } } },
{ 346, "epoll_pwait", 6, { { "int", "epfd" }, { "struct epoll_event *", "events" }, { "int", "maxevents" }, { "int", "timeout" }, { "const compat_sigset_t *", "sigmask" }, { "compat_size_t", "sigsetsize" } } },
{ 347, "kexec_load", 4, { { "compat_ulong_t", "entry" }, { "compat_ulong_t", "nr_segments" }, { "struct compat_kexec_segment *", "segments" }, { "compat_ulong_t", "flags" } } },
{ 348, "utimensat", 4, { { "int", "dfd" }, { "const char *", "filename" }, { "struct __kernel_timespec *", "utimes" }, { "int", "flags" } } },
{ 349, "signalfd", 3, { { "int", "ufd" }, { "const compat_sigset_t *", "user_mask" }, { "compat_size_t", "sigsetsize" } } },
{ 350, "timerfd_create", 2, { { "int", "clockid" }, { "int", "flags" } } },
{ 351, "eventfd", 1, { { "unsigned int", "count" } } },
{ 352, "fallocate", 4, { { "int", "fd" }, { "int", "mode" }, { "loff_t", "offset" }, { "loff_t", "len" } } },
{ 353, "timerfd_settime", 4, { { "int", "ufd" }, { "int", "flags" }, { "const struct __kernel_itimerspec *", "utmr" }, { "struct __kernel_itimerspec *", "otmr" } } },
{ 354, "timerfd_gettime", 2, { { "int", "ufd" }, { "struct __kernel_itimerspec *", "otmr" } } },
{ 355, "signalfd4", 4, { { "int", "ufd" }, { "const compat_sigset_t *", "user_mask" }, { "compat_size_t", "sigsetsize" }, { "int", "flags" } } },
{ 356, "eventfd2", 2, { { "unsigned int", "count" }, { "int", "flags" } } },
{ 357, "epoll_create1", 1, { { "int", "flags" } } },
{ 358, "dup3", 3, { { "unsigned int", "oldfd" }, { "unsigned int", "newfd" }, { "int", "flags" } } },
{ 359, "pipe2", 2, { { "int *", "fildes" }, { "int", "flags" } } },
{ 360, "inotify_init1", 1, { { "int", "flags" } } },
{ 361, "preadv", 5, { { "compat_ulong_t", "fd" }, { "const struct iovec *", "vec" }, { "compat_ulong_t", "vlen" }, { "u32", "pos_low" }, { "u32", "pos_high" } } },
{ 362, "pwritev", 5, { { "compat_ulong_t", "fd" }, { "const struct iovec *", "vec" }, { "compat_ulong_t", "vlen" }, { "u32", "pos_low" }, { "u32", "pos_high" } } },
{ 363, "rt_tgsigqueueinfo", 4, { { "compat_pid_t", "tgid" }, { "compat_pid_t", "pid" }, { "int", "sig" }, { "struct compat_siginfo *", "uinfo" } } },
{ 364, "perf_event_open", 5, { { "struct perf_event_attr *", "attr_uptr" }, { "pid_t", "pid" }, { "int", "cpu" }, { "int", "group_fd" }, { "unsigned long", "flags" } } },
{ 365, "recvmmsg", 5, { { "int", "fd" }, { "struct mmsghdr *", "mmsg" }, { "unsigned int", "vlen" }, { "unsigned int", "flags" }, { "struct __kernel_timespec *", "timeout" } } },
{ 366, "accept4", 4, { { "int", "fd" }, { "struct sockaddr *", "upeer_sockaddr" }, { "int *", "upeer_addrlen" }, { "int", "flags" } } },
{ 367, "fanotify_init", 2, { { "unsigned int", "flags" }, { "unsigned int", "event_f_flags" } } },
{ 368, "fanotify_mark", 5, { { "int", "fanotify_fd" }, { "unsigned int", "flags" }, { "__u64", "mask" }, { "int", "dfd" }, { "const char *", "pathname" } } },
{ 369, "prlimit64", 4, { { "pid_t", "pid" }, { "unsigned int", "resource" }, { "const struct rlimit64 *", "new_rlim" }, { "struct rlimit64 *", "old_rlim" } } },
{ 370, "name_to_handle_at", 5, { { "int", "dfd" }, { "const char *", "name" }, { "struct file_handle *", "handle" }, { "void *", "mnt_id" }, { "int", "flag" } } },
{ 371, "open_by_handle_at", 3, { { "int", "mountdirfd" }, { "struct file_handle *", "handle" }, { "int", "flags" } } },
{ 372, "clock_adjtime", 2, { { "const clockid_t", "which_clock" }, { "struct __kernel_timex *", "utx" } } },
{ 373, "syncfs", 1, { { "int", "fd" } } },
{ 374, "sendmmsg", 4, { { "int", "fd" }, { "struct compat_mmsghdr *", "mmsg" }, { "unsigned int", "vlen" }, { "unsigned int", "flags" } } },
{ 375, "setns", 2, { { "int", "fd" }, { "int", "flags" } } },
{ 376, "process_vm_readv", 6, { { "pid_t", "pid" }, { "const struct iovec *", "lvec" }, { "unsigned long", "liovcnt" }, { "const struct iovec *", "rvec" }, { "unsigned long", "riovcnt" }, { "unsigned long", "flags" } } },
{ 377, "process_vm_writev", 6, { { "pid_t", "pid" }, { "const struct iovec *", "lvec" }, { "unsigned long", "liovcnt" }, { "const struct iovec *", "rvec" }, { "unsigned long", "riovcnt" }, { "unsigned long", "flags" } } },
{ 378, "kcmp", 5, { { "pid_t", "pid1" }, { "pid_t", "pid2" }, { "int", "type" }, { "unsigned long", "idx1" }, { "unsigned long", "idx2" } } },
{ 379, "finit_module", 3, { { "int", "fd" }, { "const char *", "uargs" }, { "int", "flags" } } },
{ 380, "sched_setattr", 3, { { "pid_t", "pid" }, { "struct sched_attr *", "uattr" }, { "unsigned int", "flags" } } },
{ 381, "sched_getattr", 4, { { "pid_t", "pid" }, { "struct sched_attr *", "uattr" }, { "unsigned int", "usize" }, { "unsigned int", "flags" } } },
{ 382, "renameat2", 5, { { "int", "olddfd" }, { "const char *", "oldname" }, { "int", "newdfd" }, { "const char *", "newname" }, { "unsigned int", "flags" } } },
{ 383, "seccomp", 3, { { "unsigned int", "op" }, { "unsigned int", "flags" }, { "void *", "uargs" } } },
{ 384, "getrandom", 3, { { "char *", "ubuf" }, { "size_t", "len" }, { "unsigned int", "flags" } } },
{ 385, "memfd_create", 2, { { "const char *", "uname" }, { "unsigned int", "flags" } } },
{ 386, "bpf", 3, { { "int", "cmd" }, { "union bpf_attr *", "uattr" }, { "unsigned int", "size" } } },
{ 387, "execveat", 5, { { "int", "fd" }, { "const char *", "filename" }, { "const compat_uptr_t *", "argv" }, { "const compat_uptr_t *", "envp" }, { "int", "flags" } } },
{ 388, "userfaultfd", 1, { { "int", "flags" } } },
{ 389, "membarrier", 3, { { "int", "cmd" }, { "unsigned int", "flags" }, { "int", "cpu_id" } } },
{ 390, "mlock2", 3, { { "unsigned long", "start" }, { "size_t", "len" }, { "int", "flags" } } },
{ 391, "copy_file_range", 6, { { "int", "fd_in" }, { "loff_t *", "off_in" }, { "int", "fd_out" }, { "loff_t *", "off_out" }, { "size_t", "len" }, { "unsigned int", "flags" } } },
{ 392, "preadv2", 6, { { "compat_ulong_t", "fd" }, { "const struct iovec *", "vec" }, { "compat_ulong_t", "vlen" }, { "u32", "pos_low" }, { "u32", "pos_high" }, { "rwf_t", "flags" } } },
{ 393, "pwritev2", 6, { { "compat_ulong_t", "fd" }, { "const struct iovec *", "vec" }, { "compat_ulong_t", "vlen" }, { "u32", "pos_low" }, { "u32", "pos_high" }, { "rwf_t", "flags" } } },
{ 394, "pkey_mprotect", 4, { { "unsigned long", "start" }, { "size_t", "len" }, { "unsigned long", "prot" }, { "int", "pkey" } } },
{ 395, "pkey_alloc", 2, { { "unsigned long", "flags" }, { "unsigned long", "init_val" } } },
{ 396, "pkey_free", 1, { { "int", "pkey" } } },
{ 397, "statx", 5, { { "int", "dfd" }, { "const char *", "filename" }, { "unsigned", "flags" }, { "unsigned int", "mask" }, { "struct statx *", "buffer" } } },
{ 398, "rseq", 4, { { "struct rseq *", "rseq" }, { "u32", "rseq_len" }, { "int", "flags" }, { "u32", "sig" } } },
{ 399, "io_pgetevents", 6, { { "compat_aio_context_t", "ctx_id" }, { "compat_long_t", "min_nr" }, { "compat_long_t", "nr" }, { "struct io_event *", "events" }, { "struct old_timespec32 *", "timeout" }, { "const struct __compat_aio_sigset *", "usig" } } },
{ 400, "migrate_pages", 4, { { "pid_t", "pid" }, { "unsigned long", "maxnode" }, { "const unsigned long *", "old_nodes" }, { "const unsigned long *", "new_nodes" } } },
{ 401, "kexec_file_load", 5, { { "int", "kernel_fd" }, { "int", "initrd_fd" }, { "unsigned long", "cmdline_len" }, { "const char *", "cmdline_ptr" }, { "unsigned long", "flags" } } },
{ 403, "clock_gettime64", 2, { { "clockid_t", "which_clock" }, { "struct __kernel_timespec *", "tp" } } },
{ 404, "clock_settime64", 2, { { "clockid_t", "which_clock" }, { "const struct __kernel_timespec *", "tp" } } },
{ 405, "clock_adjtime64", 2, { { "clockid_t", "which_clock" }, { "struct __kernel_timex *", "tx" } } },
{ 406, "clock_getres_time64", 2, { { "clockid_t", "which_clock" }, { "struct __kernel_timespec *", "tp" } } },
{ 407, "clock_nanosleep_time64", 4, { { "clockid_t", "which_clock" }, { "int", "flags" }, { "const struct __kernel_timespec *", "rqtp" }, { "struct __kernel_timespec *", "rmtp" } } },
{ 408, "timer_gettime64", 2, { { "timer_t", "timer_id" }, { "struct __kernel_itimerspec *", "setting" } } },
{ 409, "timer_settime64", 4, { { "timer_t", "timer_id" }, { "int", "flags" }, { "const struct __kernel_itimerspec *", "new_setting" }, { "struct __kernel_itimerspec *", "old_setting" } } },
{ 410, "timerfd_gettime64", 2, { { "int", "ufd" }, { "struct __kernel_itimerspec *", "otmr" } } },
{ 411, "timerfd_settime64", 4, { { "int", "ufd" }, { "int", "flags" }, { "const struct __kernel_itimerspec *", "utmr" }, { "struct __kernel_itimerspec *", "otmr" } } },
{ 412, "utimensat_time64", 4, { { "int", "dfd" }, { "const char *", "filename" }, { "struct __kernel_timespec *", "utimes" }, { "int", "flags" } } },
{ 413, "pselect6_time64", 6, { { "int", "n" }, { "compat_ulong_t *", "inp" }, { "compat_ulong_t *", "outp" }, { "compat_ulong_t *", "exp" }, { "struct __kernel_timespec *", "tsp" }, { "void *", "sig" } } },
{ 414, "ppoll_time64", 5, { { "struct pollfd *", "ufds" }, { "unsigned int", "nfds" }, { "struct __kernel_timespec *", "tsp" }, { "const compat_sigset_t *", "sigmask" }, { "compat_size_t", "sigsetsize" } } },
{ 416, "io_pgetevents_time64", 6, { { "compat_aio_context_t", "ctx_id" }, { "compat_long_t", "min_nr" }, { "compat_long_t", "nr" }, { "struct io_event *", "events" }, { "struct __kernel_timespec *", "timeout" }, { "const struct __compat_aio_sigset *", "usig" } } },
{ 417, "recvmmsg_time64", 5, { { "int", "fd" }, { "struct compat_mmsghdr *", "mmsg" }, { "unsigned int", "vlen" }, { "unsigned int", "flags" }, { "struct __kernel_timespec *", "timeout" } } },
{ 418, "mq_timedsend_time64", 5, { { "mqd_t", "mqdes" }, { "const char *", "msg_ptr" }, { "size_t", "msg_len" }, { "unsigned int", "msg_prio" }, { "const struct __kernel_timespec *", "abs_timeout" } } },
{ 419, "mq_timedreceive_time64", 5, { { "mqd_t", "mqdes" }, { "char *", "msg_ptr" }, { "size_t", "msg_len" }, { "unsigned int *", "msg_prio" }, { "const struct __kernel_timespec *", "abs_timeout" } } },
{ 420, "semtimedop_time64", 4, { { "int", "semid" }, { "struct sembuf *", "sops" }, { "unsigned", "nsops" }, { "const struct __kernel_timespec *", "timeout" } } },
{ 421, "rt_sigtimedwait_time64", 4, { { "compat_sigset_t *", "uthese" }, { "struct compat_siginfo *", "uinfo" }, { "struct __kernel_timespec *", "uts" }, { "compat_size_t", "sigsetsize" } } },
{ 422, "futex_time64", 6, { { "u32 *", "uaddr" }, { "int", "op" }, { "u32", "val" }, { "const struct __kernel_timespec *", "utime" }, { "u32 *", "uaddr2" }, { "u32", "val3" } } },
{ 423, "sched_rr_get_interval_time64", 2, { { "pid_t", "pid" }, { "struct __kernel_timespec *", "interval" } } },
{ 424, "pidfd_send_signal", 4, { { "int", "pidfd" }, { "int", "sig" }, { "siginfo_t *", "info" }, { "unsigned int", "flags" } } },
{ 425, "io_uring_setup", 2, { { "u32", "entries" }, { "struct io_uring_params *", "params" } } },
{ 426, "io_uring_enter", 6, { { "unsigned int", "fd" }, { "u32", "to_submit" }, { "u32", "min_complete" }, { "u32", "flags" }, { "const void *", "argp" }, { "size_t", "argsz" } } },
{ 427, "io_uring_register", 4, { { "unsigned int", "fd" }, { "unsigned int", "opcode" }, { "void *", "arg" }, { "unsigned int", "nr_args" } } },
{ 428, "open_tree", 3, { { "int", "dfd" }, { "const char *", "filename" }, { "unsigned", "flags" } } },
{ 429, "move_mount", 5, { { "int", "from_dfd" }, { "const char *", "from_pathname" }, { "int", "to_dfd" }, { "const char *", "to_pathname" }, { "unsigned int", "flags" } } },
{ 430, "fsopen", 2, { { "const char *", "_fs_name" }, { "unsigned int", "flags" } } },
{ 431, "fsconfig", 5, { { "int", "fd" }, { "unsigned int", "cmd" }, { "const char *", "_key" }, { "const void *", "_value" }, { "int", "aux" } } },
{ 432, "fsmount", 3, { { "int", "fs_fd" }, { "unsigned int", "flags" }, { "unsigned int", "attr_flags" } } },
{ 433, "fspick", 3, { { "int", "dfd" }, { "const char *", "path" }, { "unsigned int", "flags" } } },
{ 434, "pidfd_open", 2, { { "pid_t", "pid" }, { "unsigned int", "flags" } } },
{ 435, "clone3", 2, { { "struct clone_args *", "uargs" }, { "size_t", "size" } } },
{ 436, "close_range", 3, { { "unsigned int", "fd" }, { "unsigned int", "max_fd" }, { "unsigned int", "flags" } } },
{ 437, "openat2", 4, { { "int", "dfd" }, { "const char *", "filename" }, { "struct open_how *", "how" }, { "size_t", "usize" } } },
{ 438, "pidfd_getfd", 3, { { "int", "pidfd" }, { "int", "fd" }, { "unsigned int", "flags" } } },
{ 439, "faccessat2", 4, { { "int", "dfd" }, { "const char *", "filename" }, { "int", "mode" }, { "int", "flags" } } },
{ 440, "process_madvise", 5, { { "int", "pidfd" }, { "const struct iovec *", "vec" }, { "size_t", "vlen" }, { "int", "behavior" }, { "unsigned int", "flags" } } },
{ 441, "epoll_pwait2", 6, { { "int", "epfd" }, { "struct epoll_event *", "events" }, { "int", "maxevents" }, { "const struct __kernel_timespec *", "timeout" }, { "const compat_sigset_t *", "sigmask" }, { "compat_size_t", "sigsetsize" } } },
{ 442, "mount_setattr", 5, { { "int", "dfd" }, { "const char *", "path" }, { "unsigned int", "flags" }, { "struct mount_attr *", "uattr" }, { "size_t", "usize" } } },
{ 443, "quotactl_fd", 4, { { "unsigned int", "fd" }, { "unsigned int", "cmd" }, { "qid_t", "id" }, { "void *", "addr" } } },
{ 444, "landlock_create_ruleset", 3, { { "const struct landlock_ruleset_attr *const", "attr" }, { "const size_t", "size" }, { "const __u32", "flags" } } },
{ 445, "landlock_add_rule", 4, { { "const int", "ruleset_fd" }, { "const enum landlock_rule_type", "rule_type" }, { "const void *const", "rule_attr" }, { "const __u32", "flags" } } },
{ 446, "landlock_restrict_self", 2, { { "const int", "ruleset_fd" }, { "const __u32", "flags" } } },
{ 448, "process_mrelease", 2, { { "int", "pidfd" }, { "unsigned int", "flags" } } },
{ 449, "futex_waitv", 5, { { "struct futex_waitv *", "waiters" }, { "unsigned int", "nr_futexes" }, { "unsigned int", "flags" }, { "struct __kernel_timespec *", "timeout" }, { "clockid_t", "clockid" } } },
{ 450, "set_mempolicy_home_node", 4, { { "unsigned long", "start" }, { "unsigned long", "len" }, { "unsigned long", "home_node" }, { "unsigned long", "flags" } } },
{ 451, "cachestat", 4, { { "unsigned int", "fd" }, { "struct cachestat_range *", "cstat_range" }, { "struct cachestat *", "cstat" }, { "unsigned int", "flags" } } },
{ 452, "fchmodat2", 4, { { "int", "dfd" }, { "const char *", "filename" }, { "umode_t", "mode" }, { "unsigned int", "flags" } } },
{ 453, "map_shadow_stack", 3, { { "unsigned long", "addr" }, { "unsigned long", "size" }, { "unsigned int", "flags" } } },
{ 454, "futex_wake", 4, { { "void *", "uaddr" }, { "unsigned long", "mask" }, { "int", "nr" }, { "unsigned int", "flags" } } },
{ 455, "futex_wait", 6, { { "void *", "uaddr" }, { "unsigned long", "val" }, { "unsigned long", "mask" }, { "unsigned int", "flags" }, { "struct __kernel_timespec *", "timeout" }, { "clockid_t", "clockid" } } },
{ 456, "futex_requeue", 4, { { "struct futex_waitv *", "waiters" }, { "unsigned int", "flags" }, { "int", "nr_wake" }, { "int", "nr_requeue" } } },
{ 457, "statmount", 4, { { "const struct mnt_id_req *", "req" }, { "struct statmount *", "buf" }, { "size_t", "bufsize" }, { "unsigned int", "flags" } } },
{ 458, "listmount", 4, { { "const struct mnt_id_req *", "req" }, { "u64 *", "mnt_ids" }, { "size_t", "nr_mnt_ids" }, { "unsigned int", "flags" } } },
{ 459, "lsm_get_self_attr", 4, { { "unsigned int", "attr" }, { "struct lsm_ctx *", "ctx" }, { "u32 *", "size" }, { "u32", "flags" } } },
{ 460, "lsm_set_self_attr", 4, { { "unsigned int", "attr" }, { "struct lsm_ctx *", "ctx" }, { "u32", "size" }, { "u32", "flags" } } },
{ 461, "lsm_list_modules", 3, { { "u64 *", "ids" }, { "u32 *", "size" }, { "u32", "flags" } } },
{ 462, "mseal", 3, { { "unsigned long", "start" }, { "size_t", "len" }, { "unsigned long", "flags" } } },
{ 463, "setxattrat", 6, { { "int", "dfd" }, { "const char *", "pathname" }, { "unsigned int", "at_flags" }, { "const char *", "name" }, { "const struct xattr_args *", "uargs" }, { "size_t", "usize" } } },
{ 464, "getxattrat", 6, { { "int", "dfd" }, { "const char *", "pathname" }, { "unsigned int", "at_flags" }, { "const char *", "name" }, { "struct xattr_args *", "uargs" }, { "size_t", "usize" } } },
{ 465, "listxattrat", 5, { { "int", "dfd" }, { "const char *", "pathname" }, { "unsigned int", "at_flags" }, { "char *", "list" }, { "size_t", "size" } } },
{ 466, "removexattrat", 4, { { "int", "dfd" }, { "const char *", "pathname" }, { "unsigned int", "at_flags" }, { "const char *", "name" } } },
{ 467, "open_tree_attr", 5, { { "int", "dfd" }, { "const char *", "filename" }, { "unsigned", "flags" }, { "struct mount_attr *", "uattr" }, { "size_t", "usize" } } },
{ 468, "file_getattr", 5, { { "int", "dfd" }, { "const char *", "filename" }, { "struct file_attr *", "ufattr" }, { "size_t", "usize" }, { "unsigned int", "at_flags" } } },
{ 469, "file_setattr", 5, { { "int", "dfd" }, { "const char *", "filename" }, { "struct file_attr *", "ufattr" }, { "size_t", "usize" }, { "unsigned int", "at_flags" } } },
{ 470, "listns", 4, { { "const struct ns_id_req *", "req" }, { "u64 *", "ns_ids" }, { "size_t", "nr_ns_ids" }, { "unsigned int", "flags" } } },
};
FridaLinuxSyscallSignature *
frida_get_syscall_signatures (int * len)
{
if (len != NULL)
*len = G_N_ELEMENTS (frida_syscall_signatures);
return (FridaLinuxSyscallSignature *) frida_syscall_signatures;
}
FridaLinuxSyscallSignature *
frida_get_compat32_syscall_signatures (int * len)
{
if (len != NULL)
*len = G_N_ELEMENTS (frida_compat32_syscall_signatures);
return (FridaLinuxSyscallSignature *) frida_compat32_syscall_signatures;
}
+756
View File
@@ -0,0 +1,756 @@
// AUTO-GENERATED FILE. DO NOT EDIT.
namespace Frida {
public enum LinuxSyscall {
IO_SETUP = 0,
IO_DESTROY = 1,
IO_SUBMIT = 2,
IO_CANCEL = 3,
IO_GETEVENTS = 4,
SETXATTR = 5,
LSETXATTR = 6,
FSETXATTR = 7,
GETXATTR = 8,
LGETXATTR = 9,
FGETXATTR = 10,
LISTXATTR = 11,
LLISTXATTR = 12,
FLISTXATTR = 13,
REMOVEXATTR = 14,
LREMOVEXATTR = 15,
FREMOVEXATTR = 16,
GETCWD = 17,
LOOKUP_DCOOKIE = 18,
EVENTFD2 = 19,
EPOLL_CREATE1 = 20,
EPOLL_CTL = 21,
EPOLL_PWAIT = 22,
DUP = 23,
DUP3 = 24,
FCNTL = 25,
INOTIFY_INIT1 = 26,
INOTIFY_ADD_WATCH = 27,
INOTIFY_RM_WATCH = 28,
IOCTL = 29,
IOPRIO_SET = 30,
IOPRIO_GET = 31,
FLOCK = 32,
MKNODAT = 33,
MKDIRAT = 34,
UNLINKAT = 35,
SYMLINKAT = 36,
LINKAT = 37,
UMOUNT2 = 39,
MOUNT = 40,
PIVOT_ROOT = 41,
NFSSERVCTL = 42,
STATFS = 43,
FSTATFS = 44,
TRUNCATE = 45,
FTRUNCATE = 46,
FALLOCATE = 47,
FACCESSAT = 48,
CHDIR = 49,
FCHDIR = 50,
CHROOT = 51,
FCHMOD = 52,
FCHMODAT = 53,
FCHOWNAT = 54,
FCHOWN = 55,
OPENAT = 56,
CLOSE = 57,
VHANGUP = 58,
PIPE2 = 59,
QUOTACTL = 60,
GETDENTS64 = 61,
LSEEK = 62,
READ = 63,
WRITE = 64,
READV = 65,
WRITEV = 66,
PREAD64 = 67,
PWRITE64 = 68,
PREADV = 69,
PWRITEV = 70,
SENDFILE = 71,
PSELECT6 = 72,
PPOLL = 73,
SIGNALFD4 = 74,
VMSPLICE = 75,
SPLICE = 76,
TEE = 77,
READLINKAT = 78,
NEWFSTATAT = 79,
FSTAT = 80,
SYNC = 81,
FSYNC = 82,
FDATASYNC = 83,
SYNC_FILE_RANGE = 84,
TIMERFD_CREATE = 85,
TIMERFD_SETTIME = 86,
TIMERFD_GETTIME = 87,
UTIMENSAT = 88,
ACCT = 89,
CAPGET = 90,
CAPSET = 91,
PERSONALITY = 92,
EXIT = 93,
EXIT_GROUP = 94,
WAITID = 95,
SET_TID_ADDRESS = 96,
UNSHARE = 97,
FUTEX = 98,
SET_ROBUST_LIST = 99,
GET_ROBUST_LIST = 100,
NANOSLEEP = 101,
GETITIMER = 102,
SETITIMER = 103,
KEXEC_LOAD = 104,
INIT_MODULE = 105,
DELETE_MODULE = 106,
TIMER_CREATE = 107,
TIMER_GETTIME = 108,
TIMER_GETOVERRUN = 109,
TIMER_SETTIME = 110,
TIMER_DELETE = 111,
CLOCK_SETTIME = 112,
CLOCK_GETTIME = 113,
CLOCK_GETRES = 114,
CLOCK_NANOSLEEP = 115,
SYSLOG = 116,
PTRACE = 117,
SCHED_SETPARAM = 118,
SCHED_SETSCHEDULER = 119,
SCHED_GETSCHEDULER = 120,
SCHED_GETPARAM = 121,
SCHED_SETAFFINITY = 122,
SCHED_GETAFFINITY = 123,
SCHED_YIELD = 124,
SCHED_GET_PRIORITY_MAX = 125,
SCHED_GET_PRIORITY_MIN = 126,
SCHED_RR_GET_INTERVAL = 127,
RESTART_SYSCALL = 128,
KILL = 129,
TKILL = 130,
TGKILL = 131,
SIGALTSTACK = 132,
RT_SIGSUSPEND = 133,
RT_SIGACTION = 134,
RT_SIGPROCMASK = 135,
RT_SIGPENDING = 136,
RT_SIGTIMEDWAIT = 137,
RT_SIGQUEUEINFO = 138,
RT_SIGRETURN = 139,
SETPRIORITY = 140,
GETPRIORITY = 141,
REBOOT = 142,
SETREGID = 143,
SETGID = 144,
SETREUID = 145,
SETUID = 146,
SETRESUID = 147,
GETRESUID = 148,
SETRESGID = 149,
GETRESGID = 150,
SETFSUID = 151,
SETFSGID = 152,
TIMES = 153,
SETPGID = 154,
GETPGID = 155,
GETSID = 156,
SETSID = 157,
GETGROUPS = 158,
SETGROUPS = 159,
UNAME = 160,
SETHOSTNAME = 161,
SETDOMAINNAME = 162,
GETRLIMIT = 163,
SETRLIMIT = 164,
GETRUSAGE = 165,
UMASK = 166,
PRCTL = 167,
GETCPU = 168,
GETTIMEOFDAY = 169,
SETTIMEOFDAY = 170,
ADJTIMEX = 171,
GETPID = 172,
GETPPID = 173,
GETUID = 174,
GETEUID = 175,
GETGID = 176,
GETEGID = 177,
GETTID = 178,
SYSINFO = 179,
MQ_OPEN = 180,
MQ_UNLINK = 181,
MQ_TIMEDSEND = 182,
MQ_TIMEDRECEIVE = 183,
MQ_NOTIFY = 184,
MQ_GETSETATTR = 185,
MSGGET = 186,
MSGCTL = 187,
MSGRCV = 188,
MSGSND = 189,
SEMGET = 190,
SEMCTL = 191,
SEMTIMEDOP = 192,
SEMOP = 193,
SHMGET = 194,
SHMCTL = 195,
SHMAT = 196,
SHMDT = 197,
SOCKET = 198,
SOCKETPAIR = 199,
BIND = 200,
LISTEN = 201,
ACCEPT = 202,
CONNECT = 203,
GETSOCKNAME = 204,
GETPEERNAME = 205,
SENDTO = 206,
RECVFROM = 207,
SETSOCKOPT = 208,
GETSOCKOPT = 209,
SHUTDOWN = 210,
SENDMSG = 211,
RECVMSG = 212,
READAHEAD = 213,
BRK = 214,
MUNMAP = 215,
MREMAP = 216,
ADD_KEY = 217,
REQUEST_KEY = 218,
KEYCTL = 219,
CLONE = 220,
EXECVE = 221,
MMAP = 222,
FADVISE64 = 223,
SWAPON = 224,
SWAPOFF = 225,
MPROTECT = 226,
MSYNC = 227,
MLOCK = 228,
MUNLOCK = 229,
MLOCKALL = 230,
MUNLOCKALL = 231,
MINCORE = 232,
MADVISE = 233,
REMAP_FILE_PAGES = 234,
MBIND = 235,
GET_MEMPOLICY = 236,
SET_MEMPOLICY = 237,
MIGRATE_PAGES = 238,
MOVE_PAGES = 239,
RT_TGSIGQUEUEINFO = 240,
PERF_EVENT_OPEN = 241,
ACCEPT4 = 242,
RECVMMSG = 243,
WAIT4 = 260,
PRLIMIT64 = 261,
FANOTIFY_INIT = 262,
FANOTIFY_MARK = 263,
NAME_TO_HANDLE_AT = 264,
OPEN_BY_HANDLE_AT = 265,
CLOCK_ADJTIME = 266,
SYNCFS = 267,
SETNS = 268,
SENDMMSG = 269,
PROCESS_VM_READV = 270,
PROCESS_VM_WRITEV = 271,
KCMP = 272,
FINIT_MODULE = 273,
SCHED_SETATTR = 274,
SCHED_GETATTR = 275,
RENAMEAT2 = 276,
SECCOMP = 277,
GETRANDOM = 278,
MEMFD_CREATE = 279,
BPF = 280,
EXECVEAT = 281,
USERFAULTFD = 282,
MEMBARRIER = 283,
MLOCK2 = 284,
COPY_FILE_RANGE = 285,
PREADV2 = 286,
PWRITEV2 = 287,
PKEY_MPROTECT = 288,
PKEY_ALLOC = 289,
PKEY_FREE = 290,
STATX = 291,
IO_PGETEVENTS = 292,
RSEQ = 293,
KEXEC_FILE_LOAD = 294,
PIDFD_SEND_SIGNAL = 424,
IO_URING_SETUP = 425,
IO_URING_ENTER = 426,
IO_URING_REGISTER = 427,
OPEN_TREE = 428,
MOVE_MOUNT = 429,
FSOPEN = 430,
FSCONFIG = 431,
FSMOUNT = 432,
FSPICK = 433,
PIDFD_OPEN = 434,
CLONE3 = 435,
CLOSE_RANGE = 436,
OPENAT2 = 437,
PIDFD_GETFD = 438,
FACCESSAT2 = 439,
PROCESS_MADVISE = 440,
EPOLL_PWAIT2 = 441,
MOUNT_SETATTR = 442,
QUOTACTL_FD = 443,
LANDLOCK_CREATE_RULESET = 444,
LANDLOCK_ADD_RULE = 445,
LANDLOCK_RESTRICT_SELF = 446,
PROCESS_MRELEASE = 448,
FUTEX_WAITV = 449,
SET_MEMPOLICY_HOME_NODE = 450,
CACHESTAT = 451,
FCHMODAT2 = 452,
MAP_SHADOW_STACK = 453,
FUTEX_WAKE = 454,
FUTEX_WAIT = 455,
FUTEX_REQUEUE = 456,
STATMOUNT = 457,
LISTMOUNT = 458,
LSM_GET_SELF_ATTR = 459,
LSM_SET_SELF_ATTR = 460,
LSM_LIST_MODULES = 461,
MSEAL = 462,
SETXATTRAT = 463,
GETXATTRAT = 464,
LISTXATTRAT = 465,
REMOVEXATTRAT = 466,
OPEN_TREE_ATTR = 467,
FILE_GETATTR = 468,
FILE_SETATTR = 469,
LISTNS = 470,
}
public enum LinuxCompat32Syscall {
RESTART_SYSCALL = 0,
EXIT = 1,
FORK = 2,
READ = 3,
WRITE = 4,
OPEN = 5,
CLOSE = 6,
CREAT = 8,
LINK = 9,
UNLINK = 10,
EXECVE = 11,
CHDIR = 12,
MKNOD = 14,
CHMOD = 15,
LCHOWN = 16,
LSEEK = 19,
GETPID = 20,
MOUNT = 21,
SETUID = 23,
GETUID = 24,
PTRACE = 26,
PAUSE = 29,
ACCESS = 33,
NICE = 34,
SYNC = 36,
KILL = 37,
RENAME = 38,
MKDIR = 39,
RMDIR = 40,
DUP = 41,
PIPE = 42,
TIMES = 43,
BRK = 45,
SETGID = 46,
GETGID = 47,
GETEUID = 49,
GETEGID = 50,
ACCT = 51,
UMOUNT2 = 52,
IOCTL = 54,
FCNTL = 55,
SETPGID = 57,
UMASK = 60,
CHROOT = 61,
USTAT = 62,
DUP2 = 63,
GETPPID = 64,
GETPGRP = 65,
SETSID = 66,
SIGACTION = 67,
SETREUID = 70,
SETREGID = 71,
SIGSUSPEND = 72,
SIGPENDING = 73,
SETHOSTNAME = 74,
SETRLIMIT = 75,
GETRUSAGE = 77,
GETTIMEOFDAY = 78,
SETTIMEOFDAY = 79,
GETGROUPS = 80,
SETGROUPS = 81,
SYMLINK = 83,
READLINK = 85,
USELIB = 86,
SWAPON = 87,
REBOOT = 88,
MUNMAP = 91,
TRUNCATE = 92,
FTRUNCATE = 93,
FCHMOD = 94,
FCHOWN = 95,
GETPRIORITY = 96,
SETPRIORITY = 97,
STATFS = 99,
FSTATFS = 100,
SYSLOG = 103,
SETITIMER = 104,
GETITIMER = 105,
STAT = 106,
LSTAT = 107,
FSTAT = 108,
VHANGUP = 111,
WAIT4 = 114,
SWAPOFF = 115,
SYSINFO = 116,
FSYNC = 118,
SIGRETURN = 119,
CLONE = 120,
SETDOMAINNAME = 121,
UNAME = 122,
ADJTIMEX = 124,
MPROTECT = 125,
SIGPROCMASK = 126,
INIT_MODULE = 128,
DELETE_MODULE = 129,
QUOTACTL = 131,
GETPGID = 132,
FCHDIR = 133,
BDFLUSH = 134,
SYSFS = 135,
PERSONALITY = 136,
SETFSUID = 138,
SETFSGID = 139,
_LLSEEK = 140,
GETDENTS = 141,
_NEWSELECT = 142,
FLOCK = 143,
MSYNC = 144,
READV = 145,
WRITEV = 146,
GETSID = 147,
FDATASYNC = 148,
_SYSCTL = 149,
MLOCK = 150,
MUNLOCK = 151,
MLOCKALL = 152,
MUNLOCKALL = 153,
SCHED_SETPARAM = 154,
SCHED_GETPARAM = 155,
SCHED_SETSCHEDULER = 156,
SCHED_GETSCHEDULER = 157,
SCHED_YIELD = 158,
SCHED_GET_PRIORITY_MAX = 159,
SCHED_GET_PRIORITY_MIN = 160,
SCHED_RR_GET_INTERVAL = 161,
NANOSLEEP = 162,
MREMAP = 163,
SETRESUID = 164,
GETRESUID = 165,
POLL = 168,
NFSSERVCTL = 169,
SETRESGID = 170,
GETRESGID = 171,
PRCTL = 172,
RT_SIGRETURN = 173,
RT_SIGACTION = 174,
RT_SIGPROCMASK = 175,
RT_SIGPENDING = 176,
RT_SIGTIMEDWAIT = 177,
RT_SIGQUEUEINFO = 178,
RT_SIGSUSPEND = 179,
PREAD64 = 180,
PWRITE64 = 181,
CHOWN = 182,
GETCWD = 183,
CAPGET = 184,
CAPSET = 185,
SIGALTSTACK = 186,
SENDFILE = 187,
VFORK = 190,
UGETRLIMIT = 191,
MMAP2 = 192,
TRUNCATE64 = 193,
FTRUNCATE64 = 194,
STAT64 = 195,
LSTAT64 = 196,
FSTAT64 = 197,
LCHOWN32 = 198,
GETUID32 = 199,
GETGID32 = 200,
GETEUID32 = 201,
GETEGID32 = 202,
SETREUID32 = 203,
SETREGID32 = 204,
GETGROUPS32 = 205,
SETGROUPS32 = 206,
FCHOWN32 = 207,
SETRESUID32 = 208,
GETRESUID32 = 209,
SETRESGID32 = 210,
GETRESGID32 = 211,
CHOWN32 = 212,
SETUID32 = 213,
SETGID32 = 214,
SETFSUID32 = 215,
SETFSGID32 = 216,
GETDENTS64 = 217,
PIVOT_ROOT = 218,
MINCORE = 219,
MADVISE = 220,
FCNTL64 = 221,
GETTID = 224,
READAHEAD = 225,
SETXATTR = 226,
LSETXATTR = 227,
FSETXATTR = 228,
GETXATTR = 229,
LGETXATTR = 230,
FGETXATTR = 231,
LISTXATTR = 232,
LLISTXATTR = 233,
FLISTXATTR = 234,
REMOVEXATTR = 235,
LREMOVEXATTR = 236,
FREMOVEXATTR = 237,
TKILL = 238,
SENDFILE64 = 239,
FUTEX = 240,
SCHED_SETAFFINITY = 241,
SCHED_GETAFFINITY = 242,
IO_SETUP = 243,
IO_DESTROY = 244,
IO_GETEVENTS = 245,
IO_SUBMIT = 246,
IO_CANCEL = 247,
EXIT_GROUP = 248,
LOOKUP_DCOOKIE = 249,
EPOLL_CREATE = 250,
EPOLL_CTL = 251,
EPOLL_WAIT = 252,
REMAP_FILE_PAGES = 253,
SET_TID_ADDRESS = 256,
TIMER_CREATE = 257,
TIMER_SETTIME = 258,
TIMER_GETTIME = 259,
TIMER_GETOVERRUN = 260,
TIMER_DELETE = 261,
CLOCK_SETTIME = 262,
CLOCK_GETTIME = 263,
CLOCK_GETRES = 264,
CLOCK_NANOSLEEP = 265,
STATFS64 = 266,
FSTATFS64 = 267,
TGKILL = 268,
UTIMES = 269,
ARM_FADVISE64_64 = 270,
PCICONFIG_IOBASE = 271,
PCICONFIG_READ = 272,
PCICONFIG_WRITE = 273,
MQ_OPEN = 274,
MQ_UNLINK = 275,
MQ_TIMEDSEND = 276,
MQ_TIMEDRECEIVE = 277,
MQ_NOTIFY = 278,
MQ_GETSETATTR = 279,
WAITID = 280,
SOCKET = 281,
BIND = 282,
CONNECT = 283,
LISTEN = 284,
ACCEPT = 285,
GETSOCKNAME = 286,
GETPEERNAME = 287,
SOCKETPAIR = 288,
SEND = 289,
SENDTO = 290,
RECV = 291,
RECVFROM = 292,
SHUTDOWN = 293,
SETSOCKOPT = 294,
GETSOCKOPT = 295,
SENDMSG = 296,
RECVMSG = 297,
SEMOP = 298,
SEMGET = 299,
SEMCTL = 300,
MSGSND = 301,
MSGRCV = 302,
MSGGET = 303,
MSGCTL = 304,
SHMAT = 305,
SHMDT = 306,
SHMGET = 307,
SHMCTL = 308,
ADD_KEY = 309,
REQUEST_KEY = 310,
KEYCTL = 311,
SEMTIMEDOP = 312,
VSERVER = 313,
IOPRIO_SET = 314,
IOPRIO_GET = 315,
INOTIFY_INIT = 316,
INOTIFY_ADD_WATCH = 317,
INOTIFY_RM_WATCH = 318,
MBIND = 319,
GET_MEMPOLICY = 320,
SET_MEMPOLICY = 321,
OPENAT = 322,
MKDIRAT = 323,
MKNODAT = 324,
FCHOWNAT = 325,
FUTIMESAT = 326,
FSTATAT64 = 327,
UNLINKAT = 328,
RENAMEAT = 329,
LINKAT = 330,
SYMLINKAT = 331,
READLINKAT = 332,
FCHMODAT = 333,
FACCESSAT = 334,
PSELECT6 = 335,
PPOLL = 336,
UNSHARE = 337,
SET_ROBUST_LIST = 338,
GET_ROBUST_LIST = 339,
SPLICE = 340,
ARM_SYNC_FILE_RANGE = 341,
TEE = 342,
VMSPLICE = 343,
MOVE_PAGES = 344,
GETCPU = 345,
EPOLL_PWAIT = 346,
KEXEC_LOAD = 347,
UTIMENSAT = 348,
SIGNALFD = 349,
TIMERFD_CREATE = 350,
EVENTFD = 351,
FALLOCATE = 352,
TIMERFD_SETTIME = 353,
TIMERFD_GETTIME = 354,
SIGNALFD4 = 355,
EVENTFD2 = 356,
EPOLL_CREATE1 = 357,
DUP3 = 358,
PIPE2 = 359,
INOTIFY_INIT1 = 360,
PREADV = 361,
PWRITEV = 362,
RT_TGSIGQUEUEINFO = 363,
PERF_EVENT_OPEN = 364,
RECVMMSG = 365,
ACCEPT4 = 366,
FANOTIFY_INIT = 367,
FANOTIFY_MARK = 368,
PRLIMIT64 = 369,
NAME_TO_HANDLE_AT = 370,
OPEN_BY_HANDLE_AT = 371,
CLOCK_ADJTIME = 372,
SYNCFS = 373,
SENDMMSG = 374,
SETNS = 375,
PROCESS_VM_READV = 376,
PROCESS_VM_WRITEV = 377,
KCMP = 378,
FINIT_MODULE = 379,
SCHED_SETATTR = 380,
SCHED_GETATTR = 381,
RENAMEAT2 = 382,
SECCOMP = 383,
GETRANDOM = 384,
MEMFD_CREATE = 385,
BPF = 386,
EXECVEAT = 387,
USERFAULTFD = 388,
MEMBARRIER = 389,
MLOCK2 = 390,
COPY_FILE_RANGE = 391,
PREADV2 = 392,
PWRITEV2 = 393,
PKEY_MPROTECT = 394,
PKEY_ALLOC = 395,
PKEY_FREE = 396,
STATX = 397,
RSEQ = 398,
IO_PGETEVENTS = 399,
MIGRATE_PAGES = 400,
KEXEC_FILE_LOAD = 401,
CLOCK_GETTIME64 = 403,
CLOCK_SETTIME64 = 404,
CLOCK_ADJTIME64 = 405,
CLOCK_GETRES_TIME64 = 406,
CLOCK_NANOSLEEP_TIME64 = 407,
TIMER_GETTIME64 = 408,
TIMER_SETTIME64 = 409,
TIMERFD_GETTIME64 = 410,
TIMERFD_SETTIME64 = 411,
UTIMENSAT_TIME64 = 412,
PSELECT6_TIME64 = 413,
PPOLL_TIME64 = 414,
IO_PGETEVENTS_TIME64 = 416,
RECVMMSG_TIME64 = 417,
MQ_TIMEDSEND_TIME64 = 418,
MQ_TIMEDRECEIVE_TIME64 = 419,
SEMTIMEDOP_TIME64 = 420,
RT_SIGTIMEDWAIT_TIME64 = 421,
FUTEX_TIME64 = 422,
SCHED_RR_GET_INTERVAL_TIME64 = 423,
PIDFD_SEND_SIGNAL = 424,
IO_URING_SETUP = 425,
IO_URING_ENTER = 426,
IO_URING_REGISTER = 427,
OPEN_TREE = 428,
MOVE_MOUNT = 429,
FSOPEN = 430,
FSCONFIG = 431,
FSMOUNT = 432,
FSPICK = 433,
PIDFD_OPEN = 434,
CLONE3 = 435,
CLOSE_RANGE = 436,
OPENAT2 = 437,
PIDFD_GETFD = 438,
FACCESSAT2 = 439,
PROCESS_MADVISE = 440,
EPOLL_PWAIT2 = 441,
MOUNT_SETATTR = 442,
QUOTACTL_FD = 443,
LANDLOCK_CREATE_RULESET = 444,
LANDLOCK_ADD_RULE = 445,
LANDLOCK_RESTRICT_SELF = 446,
PROCESS_MRELEASE = 448,
FUTEX_WAITV = 449,
SET_MEMPOLICY_HOME_NODE = 450,
CACHESTAT = 451,
FCHMODAT2 = 452,
MAP_SHADOW_STACK = 453,
FUTEX_WAKE = 454,
FUTEX_WAIT = 455,
FUTEX_REQUEUE = 456,
STATMOUNT = 457,
LISTMOUNT = 458,
LSM_GET_SELF_ATTR = 459,
LSM_SET_SELF_ATTR = 460,
LSM_LIST_MODULES = 461,
MSEAL = 462,
SETXATTRAT = 463,
GETXATTRAT = 464,
LISTXATTRAT = 465,
REMOVEXATTRAT = 466,
OPEN_TREE_ATTR = 467,
FILE_GETATTR = 468,
FILE_SETATTR = 469,
LISTNS = 470,
}
}
File diff suppressed because it is too large. Load diff
+462
View File
@@ -0,0 +1,462 @@
/* AUTO-GENERATED FILE. DO NOT EDIT. */
#include "frida-base.h"
static const FridaLinuxSyscallSignature frida_syscall_signatures[] =
{
{ 4001, "exit", 1, { { "int", "error_code" } } },
{ 4002, "fork", 0, {} },
{ 4003, "read", 3, { { "unsigned int", "fd" }, { "char *", "buf" }, { "size_t", "count" } } },
{ 4004, "write", 3, { { "unsigned int", "fd" }, { "const char *", "buf" }, { "size_t", "count" } } },
{ 4005, "open", 3, { { "const char *", "filename" }, { "int", "flags" }, { "umode_t", "mode" } } },
{ 4006, "close", 1, { { "unsigned int", "fd" } } },
{ 4007, "waitpid", 3, { { "pid_t", "pid" }, { "int *", "stat_addr" }, { "int", "options" } } },
{ 4008, "creat", 2, { { "const char *", "pathname" }, { "umode_t", "mode" } } },
{ 4009, "link", 2, { { "const char *", "oldname" }, { "const char *", "newname" } } },
{ 4010, "unlink", 1, { { "const char *", "pathname" } } },
{ 4011, "execve", 3, { { "const char *", "filename" }, { "const char *const *", "argv" }, { "const char *const *", "envp" } } },
{ 4012, "chdir", 1, { { "const char *", "filename" } } },
{ 4013, "time", 1, { { "old_time32_t *", "tloc" } } },
{ 4014, "mknod", 3, { { "const char *", "filename" }, { "umode_t", "mode" }, { "unsigned", "dev" } } },
{ 4015, "chmod", 2, { { "const char *", "filename" }, { "umode_t", "mode" } } },
{ 4016, "lchown", 3, { { "const char *", "filename" }, { "uid_t", "user" }, { "gid_t", "group" } } },
{ 4017, "break", 0, {} },
{ 4018, "unused18", 0, {} },
{ 4019, "lseek", 3, { { "unsigned int", "fd" }, { "off_t", "offset" }, { "unsigned int", "whence" } } },
{ 4020, "getpid", 0, {} },
{ 4021, "mount", 5, { { "char *", "dev_name" }, { "char *", "dir_name" }, { "char *", "type" }, { "unsigned long", "flags" }, { "void *", "data" } } },
{ 4022, "umount", 2, { { "char *", "name" }, { "int", "flags" } } },
{ 4023, "setuid", 1, { { "uid_t", "uid" } } },
{ 4024, "getuid", 0, {} },
{ 4025, "stime", 1, { { "old_time32_t *", "tptr" } } },
{ 4026, "ptrace", 4, { { "long", "request" }, { "long", "pid" }, { "unsigned long", "addr" }, { "unsigned long", "data" } } },
{ 4027, "alarm", 1, { { "unsigned int", "seconds" } } },
{ 4028, "unused28", 0, {} },
{ 4029, "pause", 0, {} },
{ 4030, "utime", 2, { { "char *", "filename" }, { "struct utimbuf *", "times" } } },
{ 4031, "stty", 0, {} },
{ 4032, "gtty", 0, {} },
{ 4033, "access", 2, { { "const char *", "filename" }, { "int", "mode" } } },
{ 4034, "nice", 1, { { "int", "increment" } } },
{ 4035, "ftime", 0, {} },
{ 4036, "sync", 0, {} },
{ 4037, "kill", 2, { { "pid_t", "pid" }, { "int", "sig" } } },
{ 4038, "rename", 2, { { "const char *", "oldname" }, { "const char *", "newname" } } },
{ 4039, "mkdir", 2, { { "const char *", "pathname" }, { "umode_t", "mode" } } },
{ 4040, "rmdir", 1, { { "const char *", "pathname" } } },
{ 4041, "dup", 1, { { "unsigned int", "fildes" } } },
{ 4042, "pipe", 1, { { "int *", "fildes" } } },
{ 4043, "times", 1, { { "struct tms *", "tbuf" } } },
{ 4044, "prof", 0, {} },
{ 4045, "brk", 1, { { "unsigned long", "brk" } } },
{ 4046, "setgid", 1, { { "gid_t", "gid" } } },
{ 4047, "getgid", 0, {} },
{ 4048, "signal", 0, {} },
{ 4049, "geteuid", 0, {} },
{ 4050, "getegid", 0, {} },
{ 4051, "acct", 1, { { "const char *", "name" } } },
{ 4052, "umount2", 2, { { "char *", "name" }, { "int", "flags" } } },
{ 4053, "lock", 0, {} },
{ 4054, "ioctl", 3, { { "unsigned int", "fd" }, { "unsigned int", "cmd" }, { "unsigned long", "arg" } } },
{ 4055, "fcntl", 3, { { "unsigned int", "fd" }, { "unsigned int", "cmd" }, { "unsigned long", "arg" } } },
{ 4056, "mpx", 0, {} },
{ 4057, "setpgid", 2, { { "pid_t", "pid" }, { "pid_t", "pgid" } } },
{ 4058, "ulimit", 0, {} },
{ 4059, "unused59", 1, { { "struct oldold_utsname *", "arg0" } } },
{ 4060, "umask", 1, { { "int", "mask" } } },
{ 4061, "chroot", 1, { { "const char *", "filename" } } },
{ 4062, "ustat", 2, { { "unsigned", "dev" }, { "struct ustat *", "ubuf" } } },
{ 4063, "dup2", 2, { { "unsigned int", "oldfd" }, { "unsigned int", "newfd" } } },
{ 4064, "getppid", 0, {} },
{ 4065, "getpgrp", 0, {} },
{ 4066, "setsid", 0, {} },
{ 4068, "sgetmask", 0, {} },
{ 4069, "ssetmask", 1, { { "int", "newmask" } } },
{ 4070, "setreuid", 2, { { "uid_t", "ruid" }, { "uid_t", "euid" } } },
{ 4071, "setregid", 2, { { "gid_t", "rgid" }, { "gid_t", "egid" } } },
{ 4073, "sigpending", 1, { { "old_sigset_t *", "uset" } } },
{ 4074, "sethostname", 2, { { "char *", "name" }, { "int", "len" } } },
{ 4075, "setrlimit", 2, { { "unsigned int", "resource" }, { "struct rlimit *", "rlim" } } },
{ 4076, "getrlimit", 2, { { "unsigned int", "resource" }, { "struct rlimit *", "rlim" } } },
{ 4077, "getrusage", 2, { { "int", "who" }, { "struct rusage *", "ru" } } },
{ 4078, "gettimeofday", 2, { { "struct __kernel_old_timeval *", "tv" }, { "struct timezone *", "tz" } } },
{ 4079, "settimeofday", 2, { { "struct __kernel_old_timeval *", "tv" }, { "struct timezone *", "tz" } } },
{ 4080, "getgroups", 2, { { "int", "gidsetsize" }, { "gid_t *", "grouplist" } } },
{ 4081, "setgroups", 2, { { "int", "gidsetsize" }, { "gid_t *", "grouplist" } } },
{ 4082, "reserved82", 0, {} },
{ 4083, "symlink", 2, { { "const char *", "oldname" }, { "const char *", "newname" } } },
{ 4084, "unused84", 0, {} },
{ 4085, "readlink", 3, { { "const char *", "path" }, { "char *", "buf" }, { "int", "bufsiz" } } },
{ 4086, "uselib", 1, { { "const char *", "library" } } },
{ 4087, "swapon", 2, { { "const char *", "specialfile" }, { "int", "swap_flags" } } },
{ 4088, "reboot", 4, { { "int", "magic1" }, { "int", "magic2" }, { "unsigned int", "cmd" }, { "void *", "arg" } } },
{ 4089, "readdir", 3, { { "unsigned", "int" }, { "struct old_linux_dirent *", "arg1" }, { "unsigned", "int" } } },
{ 4090, "mmap", 6, { { "unsigned long", "addr" }, { "unsigned long", "len" }, { "unsigned long", "prot" }, { "unsigned long", "flags" }, { "unsigned long", "fd" }, { "off_t", "offset" } } },
{ 4091, "munmap", 2, { { "unsigned long", "addr" }, { "size_t", "len" } } },
{ 4092, "truncate", 2, { { "const char *", "path" }, { "long", "length" } } },
{ 4093, "ftruncate", 2, { { "unsigned int", "fd" }, { "off_t", "length" } } },
{ 4094, "fchmod", 2, { { "unsigned int", "fd" }, { "umode_t", "mode" } } },
{ 4095, "fchown", 3, { { "unsigned int", "fd" }, { "uid_t", "user" }, { "gid_t", "group" } } },
{ 4096, "getpriority", 2, { { "int", "which" }, { "int", "who" } } },
{ 4097, "setpriority", 3, { { "int", "which" }, { "int", "who" }, { "int", "niceval" } } },
{ 4098, "profil", 0, {} },
{ 4099, "statfs", 2, { { "const char *", "pathname" }, { "struct statfs *", "buf" } } },
{ 4100, "fstatfs", 2, { { "unsigned int", "fd" }, { "struct statfs *", "buf" } } },
{ 4101, "ioperm", 0, {} },
{ 4102, "socketcall", 2, { { "int", "call" }, { "unsigned long *", "args" } } },
{ 4103, "syslog", 3, { { "int", "type" }, { "char *", "buf" }, { "int", "len" } } },
{ 4104, "setitimer", 3, { { "int", "which" }, { "struct __kernel_old_itimerval *", "value" }, { "struct __kernel_old_itimerval *", "ovalue" } } },
{ 4105, "getitimer", 2, { { "int", "which" }, { "struct __kernel_old_itimerval *", "value" } } },
{ 4106, "stat", 2, { { "const char *", "filename" }, { "struct stat *", "statbuf" } } },
{ 4107, "lstat", 2, { { "const char *", "filename" }, { "struct stat *", "statbuf" } } },
{ 4108, "fstat", 2, { { "unsigned int", "fd" }, { "struct stat *", "statbuf" } } },
{ 4109, "unused109", 1, { { "struct old_utsname *", "arg0" } } },
{ 4110, "iopl", 0, {} },
{ 4111, "vhangup", 0, {} },
{ 4112, "idle", 0, {} },
{ 4113, "vm86", 0, {} },
{ 4114, "wait4", 4, { { "pid_t", "upid" }, { "int *", "stat_addr" }, { "int", "options" }, { "struct rusage *", "ru" } } },
{ 4115, "swapoff", 1, { { "const char *", "specialfile" } } },
{ 4116, "sysinfo", 1, { { "struct sysinfo *", "info" } } },
{ 4117, "ipc", 6, { { "unsigned int", "call" }, { "int", "first" }, { "unsigned long", "second" }, { "unsigned long", "third" }, { "void *", "ptr" }, { "long", "fifth" } } },
{ 4118, "fsync", 1, { { "unsigned int", "fd" } } },
{ 4120, "clone", 5, { { "unsigned long", "clone_flags" }, { "unsigned long", "newsp" }, { "int *", "parent_tidptr" }, { "int *", "child_tidptr" }, { "unsigned long", "tls" } } },
{ 4121, "setdomainname", 2, { { "char *", "name" }, { "int", "len" } } },
{ 4122, "uname", 1, { { "struct old_utsname *", "name" } } },
{ 4123, "modify_ldt", 0, {} },
{ 4124, "adjtimex", 1, { { "struct old_timex32 *", "txc_p" } } },
{ 4125, "mprotect", 3, { { "unsigned long", "start" }, { "size_t", "len" }, { "unsigned long", "prot" } } },
{ 4126, "sigprocmask", 3, { { "int", "how" }, { "old_sigset_t *", "nset" }, { "old_sigset_t *", "oset" } } },
{ 4127, "create_module", 0, {} },
{ 4128, "init_module", 3, { { "void *", "umod" }, { "unsigned long", "len" }, { "const char *", "uargs" } } },
{ 4129, "delete_module", 2, { { "const char *", "name_user" }, { "unsigned int", "flags" } } },
{ 4130, "get_kernel_syms", 0, {} },
{ 4131, "quotactl", 4, { { "unsigned int", "cmd" }, { "const char *", "special" }, { "qid_t", "id" }, { "void *", "addr" } } },
{ 4132, "getpgid", 1, { { "pid_t", "pid" } } },
{ 4133, "fchdir", 1, { { "unsigned int", "fd" } } },
{ 4134, "bdflush", 0, {} },
{ 4135, "sysfs", 3, { { "int", "option" }, { "unsigned long", "arg1" }, { "unsigned long", "arg2" } } },
{ 4136, "personality", 1, { { "unsigned int", "personality" } } },
{ 4137, "afs_syscall", 0, {} },
{ 4138, "setfsuid", 1, { { "uid_t", "uid" } } },
{ 4139, "setfsgid", 1, { { "gid_t", "gid" } } },
{ 4140, "_llseek", 5, { { "unsigned int", "fd" }, { "unsigned long", "offset_high" }, { "unsigned long", "offset_low" }, { "loff_t *", "result" }, { "unsigned int", "whence" } } },
{ 4141, "getdents", 3, { { "unsigned int", "fd" }, { "struct linux_dirent *", "dirent" }, { "unsigned int", "count" } } },
{ 4142, "_newselect", 5, { { "int", "n" }, { "fd_set *", "inp" }, { "fd_set *", "outp" }, { "fd_set *", "exp" }, { "struct __kernel_old_timeval *", "tvp" } } },
{ 4143, "flock", 2, { { "unsigned int", "fd" }, { "unsigned int", "cmd" } } },
{ 4144, "msync", 3, { { "unsigned long", "start" }, { "size_t", "len" }, { "int", "flags" } } },
{ 4145, "readv", 3, { { "unsigned long", "fd" }, { "const struct iovec *", "vec" }, { "unsigned long", "vlen" } } },
{ 4146, "writev", 3, { { "unsigned long", "fd" }, { "const struct iovec *", "vec" }, { "unsigned long", "vlen" } } },
{ 4147, "cacheflush", 3, { { "unsigned long", "addr" }, { "unsigned long", "bytes" }, { "unsigned int", "cache" } } },
{ 4148, "cachectl", 3, { { "char *", "addr" }, { "int", "nbytes" }, { "int", "op" } } },
{ 4149, "sysmips", 3, { { "long", "cmd" }, { "long", "arg1" }, { "long", "arg2" } } },
{ 4150, "unused150", 0, {} },
{ 4151, "getsid", 1, { { "pid_t", "pid" } } },
{ 4152, "fdatasync", 1, { { "unsigned int", "fd" } } },
{ 4153, "_sysctl", 0, {} },
{ 4154, "mlock", 2, { { "unsigned long", "start" }, { "size_t", "len" } } },
{ 4155, "munlock", 2, { { "unsigned long", "start" }, { "size_t", "len" } } },
{ 4156, "mlockall", 1, { { "int", "flags" } } },
{ 4157, "munlockall", 0, {} },
{ 4158, "sched_setparam", 2, { { "pid_t", "pid" }, { "struct sched_param *", "param" } } },
{ 4159, "sched_getparam", 2, { { "pid_t", "pid" }, { "struct sched_param *", "param" } } },
{ 4160, "sched_setscheduler", 3, { { "pid_t", "pid" }, { "int", "policy" }, { "struct sched_param *", "param" } } },
{ 4161, "sched_getscheduler", 1, { { "pid_t", "pid" } } },
{ 4162, "sched_yield", 0, {} },
{ 4163, "sched_get_priority_max", 1, { { "int", "policy" } } },
{ 4164, "sched_get_priority_min", 1, { { "int", "policy" } } },
{ 4165, "sched_rr_get_interval", 2, { { "pid_t", "pid" }, { "struct __kernel_timespec *", "interval" } } },
{ 4166, "nanosleep", 2, { { "struct old_timespec32 *", "rqtp" }, { "struct old_timespec32 *", "rmtp" } } },
{ 4167, "mremap", 5, { { "unsigned long", "addr" }, { "unsigned long", "old_len" }, { "unsigned long", "new_len" }, { "unsigned long", "flags" }, { "unsigned long", "new_addr" } } },
{ 4168, "accept", 3, { { "int", "fd" }, { "struct sockaddr *", "upeer_sockaddr" }, { "int *", "upeer_addrlen" } } },
{ 4169, "bind", 3, { { "int", "fd" }, { "struct sockaddr *", "umyaddr" }, { "int", "addrlen" } } },
{ 4170, "connect", 3, { { "int", "fd" }, { "struct sockaddr *", "uservaddr" }, { "int", "addrlen" } } },
{ 4171, "getpeername", 3, { { "int", "fd" }, { "struct sockaddr *", "usockaddr" }, { "int *", "usockaddr_len" } } },
{ 4172, "getsockname", 3, { { "int", "fd" }, { "struct sockaddr *", "usockaddr" }, { "int *", "usockaddr_len" } } },
{ 4173, "getsockopt", 5, { { "int", "fd" }, { "int", "level" }, { "int", "optname" }, { "char *", "optval" }, { "int *", "optlen" } } },
{ 4174, "listen", 2, { { "int", "fd" }, { "int", "backlog" } } },
{ 4175, "recv", 4, { { "int", "fd" }, { "void *", "ubuf" }, { "size_t", "size" }, { "unsigned int", "flags" } } },
{ 4176, "recvfrom", 6, { { "int", "fd" }, { "void *", "ubuf" }, { "size_t", "size" }, { "unsigned int", "flags" }, { "struct sockaddr *", "addr" }, { "int *", "addr_len" } } },
{ 4177, "recvmsg", 3, { { "int", "fd" }, { "struct user_msghdr *", "msg" }, { "unsigned int", "flags" } } },
{ 4178, "send", 4, { { "int", "fd" }, { "void *", "buff" }, { "size_t", "len" }, { "unsigned int", "flags" } } },
{ 4179, "sendmsg", 3, { { "int", "fd" }, { "struct user_msghdr *", "msg" }, { "unsigned int", "flags" } } },
{ 4180, "sendto", 6, { { "int", "fd" }, { "void *", "buff" }, { "size_t", "len" }, { "unsigned int", "flags" }, { "struct sockaddr *", "addr" }, { "int", "addr_len" } } },
{ 4181, "setsockopt", 5, { { "int", "fd" }, { "int", "level" }, { "int", "optname" }, { "char *", "optval" }, { "int", "optlen" } } },
{ 4182, "shutdown", 2, { { "int", "fd" }, { "int", "how" } } },
{ 4183, "socket", 3, { { "int", "family" }, { "int", "type" }, { "int", "protocol" } } },
{ 4184, "socketpair", 4, { { "int", "family" }, { "int", "type" }, { "int", "protocol" }, { "int *", "usockvec" } } },
{ 4185, "setresuid", 3, { { "uid_t", "ruid" }, { "uid_t", "euid" }, { "uid_t", "suid" } } },
{ 4186, "getresuid", 3, { { "uid_t *", "ruidp" }, { "uid_t *", "euidp" }, { "uid_t *", "suidp" } } },
{ 4187, "query_module", 0, {} },
{ 4188, "poll", 3, { { "struct pollfd *", "ufds" }, { "unsigned int", "nfds" }, { "int", "timeout_msecs" } } },
{ 4189, "nfsservctl", 0, {} },
{ 4190, "setresgid", 3, { { "gid_t", "rgid" }, { "gid_t", "egid" }, { "gid_t", "sgid" } } },
{ 4191, "getresgid", 3, { { "gid_t *", "rgidp" }, { "gid_t *", "egidp" }, { "gid_t *", "sgidp" } } },
{ 4192, "prctl", 5, { { "int", "option" }, { "unsigned long", "arg2" }, { "unsigned long", "arg3" }, { "unsigned long", "arg4" }, { "unsigned long", "arg5" } } },
{ 4194, "rt_sigaction", 4, { { "int", "sig" }, { "const struct sigaction *", "act" }, { "struct sigaction *", "oact" }, { "size_t", "sigsetsize" } } },
{ 4195, "rt_sigprocmask", 4, { { "int", "how" }, { "sigset_t *", "nset" }, { "sigset_t *", "oset" }, { "size_t", "sigsetsize" } } },
{ 4196, "rt_sigpending", 2, { { "sigset_t *", "uset" }, { "size_t", "sigsetsize" } } },
{ 4197, "rt_sigtimedwait", 4, { { "const sigset_t *", "uthese" }, { "siginfo_t *", "uinfo" }, { "const struct __kernel_timespec *", "uts" }, { "size_t", "sigsetsize" } } },
{ 4198, "rt_sigqueueinfo", 3, { { "pid_t", "pid" }, { "int", "sig" }, { "siginfo_t *", "uinfo" } } },
{ 4199, "rt_sigsuspend", 2, { { "sigset_t *", "unewset" }, { "size_t", "sigsetsize" } } },
{ 4200, "pread64", 4, { { "unsigned int", "fd" }, { "char *", "buf" }, { "size_t", "count" }, { "loff_t", "pos" } } },
{ 4201, "pwrite64", 4, { { "unsigned int", "fd" }, { "const char *", "buf" }, { "size_t", "count" }, { "loff_t", "pos" } } },
{ 4202, "chown", 3, { { "const char *", "filename" }, { "uid_t", "user" }, { "gid_t", "group" } } },
{ 4203, "getcwd", 2, { { "char *", "buf" }, { "unsigned long", "size" } } },
{ 4204, "capget", 2, { { "cap_user_header_t", "header" }, { "cap_user_data_t", "dataptr" } } },
{ 4205, "capset", 2, { { "cap_user_header_t", "header" }, { "const cap_user_data_t", "data" } } },
{ 4206, "sigaltstack", 2, { { "const stack_t *", "uss" }, { "stack_t *", "uoss" } } },
{ 4207, "sendfile", 4, { { "int", "out_fd" }, { "int", "in_fd" }, { "off_t *", "offset" }, { "size_t", "count" } } },
{ 4208, "getpmsg", 0, {} },
{ 4209, "putpmsg", 0, {} },
{ 4210, "mmap2", 6, { { "unsigned long", "addr" }, { "unsigned long", "len" }, { "unsigned long", "prot" }, { "unsigned long", "flags" }, { "unsigned long", "fd" }, { "unsigned long", "pgoff" } } },
{ 4211, "truncate64", 2, { { "const char *", "path" }, { "loff_t", "length" } } },
{ 4212, "ftruncate64", 2, { { "unsigned int", "fd" }, { "loff_t", "length" } } },
{ 4213, "stat64", 2, { { "const char *", "filename" }, { "struct stat64 *", "statbuf" } } },
{ 4214, "lstat64", 2, { { "const char *", "filename" }, { "struct stat64 *", "statbuf" } } },
{ 4215, "fstat64", 2, { { "unsigned long", "fd" }, { "struct stat64 *", "statbuf" } } },
{ 4216, "pivot_root", 2, { { "const char *", "new_root" }, { "const char *", "put_old" } } },
{ 4217, "mincore", 3, { { "unsigned long", "start" }, { "size_t", "len" }, { "unsigned char *", "vec" } } },
{ 4218, "madvise", 3, { { "unsigned long", "start" }, { "size_t", "len_in" }, { "int", "behavior" } } },
{ 4219, "getdents64", 3, { { "unsigned int", "fd" }, { "struct linux_dirent64 *", "dirent" }, { "unsigned int", "count" } } },
{ 4220, "fcntl64", 3, { { "unsigned int", "fd" }, { "unsigned int", "cmd" }, { "unsigned long", "arg" } } },
{ 4221, "reserved221", 0, {} },
{ 4222, "gettid", 0, {} },
{ 4223, "readahead", 3, { { "int", "fd" }, { "loff_t", "offset" }, { "size_t", "count" } } },
{ 4224, "setxattr", 5, { { "const char *", "pathname" }, { "const char *", "name" }, { "const void *", "value" }, { "size_t", "size" }, { "int", "flags" } } },
{ 4225, "lsetxattr", 5, { { "const char *", "pathname" }, { "const char *", "name" }, { "const void *", "value" }, { "size_t", "size" }, { "int", "flags" } } },
{ 4226, "fsetxattr", 5, { { "int", "fd" }, { "const char *", "name" }, { "const void *", "value" }, { "size_t", "size" }, { "int", "flags" } } },
{ 4227, "getxattr", 4, { { "const char *", "pathname" }, { "const char *", "name" }, { "void *", "value" }, { "size_t", "size" } } },
{ 4228, "lgetxattr", 4, { { "const char *", "pathname" }, { "const char *", "name" }, { "void *", "value" }, { "size_t", "size" } } },
{ 4229, "fgetxattr", 4, { { "int", "fd" }, { "const char *", "name" }, { "void *", "value" }, { "size_t", "size" } } },
{ 4230, "listxattr", 3, { { "const char *", "pathname" }, { "char *", "list" }, { "size_t", "size" } } },
{ 4231, "llistxattr", 3, { { "const char *", "pathname" }, { "char *", "list" }, { "size_t", "size" } } },
{ 4232, "flistxattr", 3, { { "int", "fd" }, { "char *", "list" }, { "size_t", "size" } } },
{ 4233, "removexattr", 2, { { "const char *", "pathname" }, { "const char *", "name" } } },
{ 4234, "lremovexattr", 2, { { "const char *", "pathname" }, { "const char *", "name" } } },
{ 4235, "fremovexattr", 2, { { "int", "fd" }, { "const char *", "name" } } },
{ 4236, "tkill", 2, { { "pid_t", "pid" }, { "int", "sig" } } },
{ 4237, "sendfile64", 4, { { "int", "out_fd" }, { "int", "in_fd" }, { "loff_t *", "offset" }, { "size_t", "count" } } },
{ 4238, "futex", 6, { { "u32 *", "uaddr" }, { "int", "op" }, { "u32", "val" }, { "const struct __kernel_timespec *", "utime" }, { "u32 *", "uaddr2" }, { "u32", "val3" } } },
{ 4239, "sched_setaffinity", 3, { { "pid_t", "pid" }, { "unsigned int", "len" }, { "unsigned long *", "user_mask_ptr" } } },
{ 4240, "sched_getaffinity", 3, { { "pid_t", "pid" }, { "unsigned int", "len" }, { "unsigned long *", "user_mask_ptr" } } },
{ 4241, "io_setup", 2, { { "unsigned", "nr_events" }, { "aio_context_t *", "ctxp" } } },
{ 4242, "io_destroy", 1, { { "aio_context_t", "ctx" } } },
{ 4243, "io_getevents", 5, { { "__u32", "ctx_id" }, { "__s32", "min_nr" }, { "__s32", "nr" }, { "struct io_event *", "events" }, { "struct old_timespec32 *", "timeout" } } },
{ 4244, "io_submit", 3, { { "aio_context_t", "ctx_id" }, { "long", "nr" }, { "struct iocb * *", "iocbpp" } } },
{ 4245, "io_cancel", 3, { { "aio_context_t", "ctx_id" }, { "struct iocb *", "iocb" }, { "struct io_event *", "result" } } },
{ 4246, "exit_group", 1, { { "int", "error_code" } } },
{ 4247, "lookup_dcookie", 0, {} },
{ 4248, "epoll_create", 1, { { "int", "size" } } },
{ 4249, "epoll_ctl", 4, { { "int", "epfd" }, { "int", "op" }, { "int", "fd" }, { "struct epoll_event *", "event" } } },
{ 4250, "epoll_wait", 4, { { "int", "epfd" }, { "struct epoll_event *", "events" }, { "int", "maxevents" }, { "int", "timeout" } } },
{ 4251, "remap_file_pages", 5, { { "unsigned long", "start" }, { "unsigned long", "size" }, { "unsigned long", "prot" }, { "unsigned long", "pgoff" }, { "unsigned long", "flags" } } },
{ 4252, "set_tid_address", 1, { { "int *", "tidptr" } } },
{ 4253, "restart_syscall", 0, {} },
{ 4254, "fadvise64", 4, { { "int", "fd" }, { "loff_t", "offset" }, { "loff_t", "len" }, { "int", "advice" } } },
{ 4255, "statfs64", 3, { { "const char *", "pathname" }, { "size_t", "sz" }, { "struct statfs64 *", "buf" } } },
{ 4256, "fstatfs64", 3, { { "unsigned int", "fd" }, { "size_t", "sz" }, { "struct statfs64 *", "buf" } } },
{ 4257, "timer_create", 3, { { "const clockid_t", "which_clock" }, { "struct sigevent *", "timer_event_spec" }, { "timer_t *", "created_timer_id" } } },
{ 4258, "timer_settime", 4, { { "timer_t", "timer_id" }, { "int", "flags" }, { "const struct __kernel_itimerspec *", "new_setting" }, { "struct __kernel_itimerspec *", "old_setting" } } },
{ 4259, "timer_gettime", 2, { { "timer_t", "timer_id" }, { "struct __kernel_itimerspec *", "setting" } } },
{ 4260, "timer_getoverrun", 1, { { "timer_t", "timer_id" } } },
{ 4261, "timer_delete", 1, { { "timer_t", "timer_id" } } },
{ 4262, "clock_settime", 2, { { "const clockid_t", "which_clock" }, { "const struct __kernel_timespec *", "tp" } } },
{ 4263, "clock_gettime", 2, { { "const clockid_t", "which_clock" }, { "struct __kernel_timespec *", "tp" } } },
{ 4264, "clock_getres", 2, { { "const clockid_t", "which_clock" }, { "struct __kernel_timespec *", "tp" } } },
{ 4265, "clock_nanosleep", 4, { { "const clockid_t", "which_clock" }, { "int", "flags" }, { "const struct __kernel_timespec *", "rqtp" }, { "struct __kernel_timespec *", "rmtp" } } },
{ 4266, "tgkill", 3, { { "pid_t", "tgid" }, { "pid_t", "pid" }, { "int", "sig" } } },
{ 4267, "utimes", 2, { { "char *", "filename" }, { "struct __kernel_old_timeval *", "utimes" } } },
{ 4268, "mbind", 6, { { "unsigned long", "start" }, { "unsigned long", "len" }, { "unsigned long", "mode" }, { "const unsigned long *", "nmask" }, { "unsigned long", "maxnode" }, { "unsigned int", "flags" } } },
{ 4269, "get_mempolicy", 5, { { "int *", "policy" }, { "unsigned long *", "nmask" }, { "unsigned long", "maxnode" }, { "unsigned long", "addr" }, { "unsigned long", "flags" } } },
{ 4270, "set_mempolicy", 3, { { "int", "mode" }, { "const unsigned long *", "nmask" }, { "unsigned long", "maxnode" } } },
{ 4271, "mq_open", 4, { { "const char *", "u_name" }, { "int", "oflag" }, { "umode_t", "mode" }, { "struct mq_attr *", "u_attr" } } },
{ 4272, "mq_unlink", 1, { { "const char *", "u_name" } } },
{ 4273, "mq_timedsend", 5, { { "mqd_t", "mqdes" }, { "const char *", "u_msg_ptr" }, { "size_t", "msg_len" }, { "unsigned int", "msg_prio" }, { "const struct __kernel_timespec *", "u_abs_timeout" } } },
{ 4274, "mq_timedreceive", 5, { { "mqd_t", "mqdes" }, { "char *", "u_msg_ptr" }, { "size_t", "msg_len" }, { "unsigned int *", "u_msg_prio" }, { "const struct __kernel_timespec *", "u_abs_timeout" } } },
{ 4275, "mq_notify", 2, { { "mqd_t", "mqdes" }, { "const struct sigevent *", "u_notification" } } },
{ 4276, "mq_getsetattr", 3, { { "mqd_t", "mqdes" }, { "const struct mq_attr *", "u_mqstat" }, { "struct mq_attr *", "u_omqstat" } } },
{ 4277, "vserver", 0, {} },
{ 4278, "waitid", 5, { { "int", "which" }, { "pid_t", "upid" }, { "struct siginfo *", "infop" }, { "int", "options" }, { "struct rusage *", "ru" } } },
{ 4280, "add_key", 5, { { "const char *", "_type" }, { "const char *", "_description" }, { "const void *", "_payload" }, { "size_t", "plen" }, { "key_serial_t", "ringid" } } },
{ 4281, "request_key", 4, { { "const char *", "_type" }, { "const char *", "_description" }, { "const char *", "_callout_info" }, { "key_serial_t", "destringid" } } },
{ 4282, "keyctl", 5, { { "int", "option" }, { "unsigned long", "arg2" }, { "unsigned long", "arg3" }, { "unsigned long", "arg4" }, { "unsigned long", "arg5" } } },
{ 4283, "set_thread_area", 1, { { "unsigned long", "addr" } } },
{ 4284, "inotify_init", 0, {} },
{ 4285, "inotify_add_watch", 3, { { "int", "fd" }, { "const char *", "pathname" }, { "u32", "mask" } } },
{ 4286, "inotify_rm_watch", 2, { { "int", "fd" }, { "__s32", "wd" } } },
{ 4287, "migrate_pages", 4, { { "pid_t", "pid" }, { "unsigned long", "maxnode" }, { "const unsigned long *", "old_nodes" }, { "const unsigned long *", "new_nodes" } } },
{ 4288, "openat", 4, { { "int", "dfd" }, { "const char *", "filename" }, { "int", "flags" }, { "umode_t", "mode" } } },
{ 4289, "mkdirat", 3, { { "int", "dfd" }, { "const char *", "pathname" }, { "umode_t", "mode" } } },
{ 4290, "mknodat", 4, { { "int", "dfd" }, { "const char *", "filename" }, { "umode_t", "mode" }, { "unsigned int", "dev" } } },
{ 4291, "fchownat", 5, { { "int", "dfd" }, { "const char *", "filename" }, { "uid_t", "user" }, { "gid_t", "group" }, { "int", "flag" } } },
{ 4292, "futimesat", 3, { { "int", "dfd" }, { "const char *", "filename" }, { "struct __kernel_old_timeval *", "utimes" } } },
{ 4293, "fstatat64", 4, { { "int", "dfd" }, { "const char *", "filename" }, { "struct stat64 *", "statbuf" }, { "int", "flag" } } },
{ 4294, "unlinkat", 3, { { "int", "dfd" }, { "const char *", "pathname" }, { "int", "flag" } } },
{ 4295, "renameat", 4, { { "int", "olddfd" }, { "const char *", "oldname" }, { "int", "newdfd" }, { "const char *", "newname" } } },
{ 4296, "linkat", 5, { { "int", "olddfd" }, { "const char *", "oldname" }, { "int", "newdfd" }, { "const char *", "newname" }, { "int", "flags" } } },
{ 4297, "symlinkat", 3, { { "const char *", "oldname" }, { "int", "newdfd" }, { "const char *", "newname" } } },
{ 4298, "readlinkat", 4, { { "int", "dfd" }, { "const char *", "pathname" }, { "char *", "buf" }, { "int", "bufsiz" } } },
{ 4299, "fchmodat", 3, { { "int", "dfd" }, { "const char *", "filename" }, { "umode_t", "mode" } } },
{ 4300, "faccessat", 3, { { "int", "dfd" }, { "const char *", "filename" }, { "int", "mode" } } },
{ 4301, "pselect6", 6, { { "int", "n" }, { "fd_set *", "inp" }, { "fd_set *", "outp" }, { "fd_set *", "exp" }, { "struct __kernel_timespec *", "tsp" }, { "void *", "sig" } } },
{ 4302, "ppoll", 5, { { "struct pollfd *", "ufds" }, { "unsigned int", "nfds" }, { "struct __kernel_timespec *", "tsp" }, { "const sigset_t *", "sigmask" }, { "size_t", "sigsetsize" } } },
{ 4303, "unshare", 1, { { "unsigned long", "unshare_flags" } } },
{ 4304, "splice", 6, { { "int", "fd_in" }, { "loff_t *", "off_in" }, { "int", "fd_out" }, { "loff_t *", "off_out" }, { "size_t", "len" }, { "unsigned int", "flags" } } },
{ 4305, "sync_file_range", 4, { { "int", "fd" }, { "loff_t", "offset" }, { "loff_t", "nbytes" }, { "unsigned int", "flags" } } },
{ 4306, "tee", 4, { { "int", "fdin" }, { "int", "fdout" }, { "size_t", "len" }, { "unsigned int", "flags" } } },
{ 4307, "vmsplice", 4, { { "int", "fd" }, { "const struct iovec *", "uiov" }, { "unsigned long", "nr_segs" }, { "unsigned int", "flags" } } },
{ 4308, "move_pages", 6, { { "pid_t", "pid" }, { "unsigned long", "nr_pages" }, { "const void * *", "pages" }, { "const int *", "nodes" }, { "int *", "status" }, { "int", "flags" } } },
{ 4309, "set_robust_list", 2, { { "struct robust_list_head *", "head" }, { "size_t", "len" } } },
{ 4310, "get_robust_list", 3, { { "int", "pid" }, { "struct robust_list_head * *", "head_ptr" }, { "size_t *", "len_ptr" } } },
{ 4311, "kexec_load", 4, { { "unsigned long", "entry" }, { "unsigned long", "nr_segments" }, { "struct kexec_segment *", "segments" }, { "unsigned long", "flags" } } },
{ 4312, "getcpu", 3, { { "unsigned *", "cpup" }, { "unsigned *", "nodep" }, { "struct getcpu_cache *", "unused" } } },
{ 4313, "epoll_pwait", 6, { { "int", "epfd" }, { "struct epoll_event *", "events" }, { "int", "maxevents" }, { "int", "timeout" }, { "const sigset_t *", "sigmask" }, { "size_t", "sigsetsize" } } },
{ 4314, "ioprio_set", 3, { { "int", "which" }, { "int", "who" }, { "int", "ioprio" } } },
{ 4315, "ioprio_get", 2, { { "int", "which" }, { "int", "who" } } },
{ 4316, "utimensat", 4, { { "int", "dfd" }, { "const char *", "filename" }, { "struct __kernel_timespec *", "utimes" }, { "int", "flags" } } },
{ 4317, "signalfd", 3, { { "int", "ufd" }, { "sigset_t *", "user_mask" }, { "size_t", "sizemask" } } },
{ 4318, "timerfd", 0, {} },
{ 4319, "eventfd", 1, { { "unsigned int", "count" } } },
{ 4320, "fallocate", 4, { { "int", "fd" }, { "int", "mode" }, { "loff_t", "offset" }, { "loff_t", "len" } } },
{ 4321, "timerfd_create", 2, { { "int", "clockid" }, { "int", "flags" } } },
{ 4322, "timerfd_gettime", 2, { { "int", "ufd" }, { "struct __kernel_itimerspec *", "otmr" } } },
{ 4323, "timerfd_settime", 4, { { "int", "ufd" }, { "int", "flags" }, { "const struct __kernel_itimerspec *", "utmr" }, { "struct __kernel_itimerspec *", "otmr" } } },
{ 4324, "signalfd4", 4, { { "int", "ufd" }, { "sigset_t *", "user_mask" }, { "size_t", "sizemask" }, { "int", "flags" } } },
{ 4325, "eventfd2", 2, { { "unsigned int", "count" }, { "int", "flags" } } },
{ 4326, "epoll_create1", 1, { { "int", "flags" } } },
{ 4327, "dup3", 3, { { "unsigned int", "oldfd" }, { "unsigned int", "newfd" }, { "int", "flags" } } },
{ 4328, "pipe2", 2, { { "int *", "fildes" }, { "int", "flags" } } },
{ 4329, "inotify_init1", 1, { { "int", "flags" } } },
{ 4330, "preadv", 5, { { "unsigned long", "fd" }, { "const struct iovec *", "vec" }, { "unsigned long", "vlen" }, { "unsigned long", "pos_l" }, { "unsigned long", "pos_h" } } },
{ 4331, "pwritev", 5, { { "unsigned long", "fd" }, { "const struct iovec *", "vec" }, { "unsigned long", "vlen" }, { "unsigned long", "pos_l" }, { "unsigned long", "pos_h" } } },
{ 4332, "rt_tgsigqueueinfo", 4, { { "pid_t", "tgid" }, { "pid_t", "pid" }, { "int", "sig" }, { "siginfo_t *", "uinfo" } } },
{ 4333, "perf_event_open", 5, { { "struct perf_event_attr *", "attr_uptr" }, { "pid_t", "pid" }, { "int", "cpu" }, { "int", "group_fd" }, { "unsigned long", "flags" } } },
{ 4334, "accept4", 4, { { "int", "fd" }, { "struct sockaddr *", "upeer_sockaddr" }, { "int *", "upeer_addrlen" }, { "int", "flags" } } },
{ 4335, "recvmmsg", 5, { { "int", "fd" }, { "struct mmsghdr *", "mmsg" }, { "unsigned int", "vlen" }, { "unsigned int", "flags" }, { "struct __kernel_timespec *", "timeout" } } },
{ 4336, "fanotify_init", 2, { { "unsigned int", "flags" }, { "unsigned int", "event_f_flags" } } },
{ 4337, "fanotify_mark", 5, { { "int", "fanotify_fd" }, { "unsigned int", "flags" }, { "__u64", "mask" }, { "int", "dfd" }, { "const char *", "pathname" } } },
{ 4338, "prlimit64", 4, { { "pid_t", "pid" }, { "unsigned int", "resource" }, { "const struct rlimit64 *", "new_rlim" }, { "struct rlimit64 *", "old_rlim" } } },
{ 4339, "name_to_handle_at", 5, { { "int", "dfd" }, { "const char *", "name" }, { "struct file_handle *", "handle" }, { "void *", "mnt_id" }, { "int", "flag" } } },
{ 4340, "open_by_handle_at", 3, { { "int", "mountdirfd" }, { "struct file_handle *", "handle" }, { "int", "flags" } } },
{ 4341, "clock_adjtime", 2, { { "const clockid_t", "which_clock" }, { "struct __kernel_timex *", "utx" } } },
{ 4342, "syncfs", 1, { { "int", "fd" } } },
{ 4343, "sendmmsg", 4, { { "int", "fd" }, { "struct mmsghdr *", "mmsg" }, { "unsigned int", "vlen" }, { "unsigned int", "flags" } } },
{ 4344, "setns", 2, { { "int", "fd" }, { "int", "flags" } } },
{ 4345, "process_vm_readv", 6, { { "pid_t", "pid" }, { "const struct iovec *", "lvec" }, { "unsigned long", "liovcnt" }, { "const struct iovec *", "rvec" }, { "unsigned long", "riovcnt" }, { "unsigned long", "flags" } } },
{ 4346, "process_vm_writev", 6, { { "pid_t", "pid" }, { "const struct iovec *", "lvec" }, { "unsigned long", "liovcnt" }, { "const struct iovec *", "rvec" }, { "unsigned long", "riovcnt" }, { "unsigned long", "flags" } } },
{ 4347, "kcmp", 5, { { "pid_t", "pid1" }, { "pid_t", "pid2" }, { "int", "type" }, { "unsigned long", "idx1" }, { "unsigned long", "idx2" } } },
{ 4348, "finit_module", 3, { { "int", "fd" }, { "const char *", "uargs" }, { "int", "flags" } } },
{ 4349, "sched_setattr", 3, { { "pid_t", "pid" }, { "struct sched_attr *", "uattr" }, { "unsigned int", "flags" } } },
{ 4350, "sched_getattr", 4, { { "pid_t", "pid" }, { "struct sched_attr *", "uattr" }, { "unsigned int", "usize" }, { "unsigned int", "flags" } } },
{ 4351, "renameat2", 5, { { "int", "olddfd" }, { "const char *", "oldname" }, { "int", "newdfd" }, { "const char *", "newname" }, { "unsigned int", "flags" } } },
{ 4352, "seccomp", 3, { { "unsigned int", "op" }, { "unsigned int", "flags" }, { "void *", "uargs" } } },
{ 4353, "getrandom", 3, { { "char *", "ubuf" }, { "size_t", "len" }, { "unsigned int", "flags" } } },
{ 4354, "memfd_create", 2, { { "const char *", "uname" }, { "unsigned int", "flags" } } },
{ 4355, "bpf", 3, { { "int", "cmd" }, { "union bpf_attr *", "uattr" }, { "unsigned int", "size" } } },
{ 4356, "execveat", 5, { { "int", "fd" }, { "const char *", "filename" }, { "const char *const *", "argv" }, { "const char *const *", "envp" }, { "int", "flags" } } },
{ 4357, "userfaultfd", 1, { { "int", "flags" } } },
{ 4358, "membarrier", 3, { { "int", "cmd" }, { "unsigned int", "flags" }, { "int", "cpu_id" } } },
{ 4359, "mlock2", 3, { { "unsigned long", "start" }, { "size_t", "len" }, { "int", "flags" } } },
{ 4360, "copy_file_range", 6, { { "int", "fd_in" }, { "loff_t *", "off_in" }, { "int", "fd_out" }, { "loff_t *", "off_out" }, { "size_t", "len" }, { "unsigned int", "flags" } } },
{ 4361, "preadv2", 6, { { "unsigned long", "fd" }, { "const struct iovec *", "vec" }, { "unsigned long", "vlen" }, { "unsigned long", "pos_l" }, { "unsigned long", "pos_h" }, { "rwf_t", "flags" } } },
{ 4362, "pwritev2", 6, { { "unsigned long", "fd" }, { "const struct iovec *", "vec" }, { "unsigned long", "vlen" }, { "unsigned long", "pos_l" }, { "unsigned long", "pos_h" }, { "rwf_t", "flags" } } },
{ 4363, "pkey_mprotect", 4, { { "unsigned long", "start" }, { "size_t", "len" }, { "unsigned long", "prot" }, { "int", "pkey" } } },
{ 4364, "pkey_alloc", 2, { { "unsigned long", "flags" }, { "unsigned long", "init_val" } } },
{ 4365, "pkey_free", 1, { { "int", "pkey" } } },
{ 4366, "statx", 5, { { "int", "dfd" }, { "const char *", "filename" }, { "unsigned", "flags" }, { "unsigned int", "mask" }, { "struct statx *", "buffer" } } },
{ 4367, "rseq", 4, { { "struct rseq *", "rseq" }, { "u32", "rseq_len" }, { "int", "flags" }, { "u32", "sig" } } },
{ 4368, "io_pgetevents", 6, { { "aio_context_t", "ctx_id" }, { "long", "min_nr" }, { "long", "nr" }, { "struct io_event *", "events" }, { "struct __kernel_timespec *", "timeout" }, { "const struct __aio_sigset *", "usig" } } },
{ 4393, "semget", 3, { { "key_t", "key" }, { "int", "nsems" }, { "int", "semflg" } } },
{ 4394, "semctl", 4, { { "int", "semid" }, { "int", "semnum" }, { "int", "cmd" }, { "unsigned long", "arg" } } },
{ 4395, "shmget", 3, { { "key_t", "key" }, { "size_t", "size" }, { "int", "shmflg" } } },
{ 4396, "shmctl", 3, { { "int", "shmid" }, { "int", "cmd" }, { "struct shmid_ds *", "buf" } } },
{ 4397, "shmat", 3, { { "int", "shmid" }, { "char *", "shmaddr" }, { "int", "shmflg" } } },
{ 4398, "shmdt", 1, { { "char *", "shmaddr" } } },
{ 4399, "msgget", 2, { { "key_t", "key" }, { "int", "msgflg" } } },
{ 4400, "msgsnd", 4, { { "int", "msqid" }, { "struct msgbuf *", "msgp" }, { "size_t", "msgsz" }, { "int", "msgflg" } } },
{ 4401, "msgrcv", 5, { { "int", "msqid" }, { "struct msgbuf *", "msgp" }, { "size_t", "msgsz" }, { "long", "msgtyp" }, { "int", "msgflg" } } },
{ 4402, "msgctl", 3, { { "int", "msqid" }, { "int", "cmd" }, { "struct msqid_ds *", "buf" } } },
{ 4403, "clock_gettime64", 2, { { "clockid_t", "which_clock" }, { "struct __kernel_timespec *", "tp" } } },
{ 4404, "clock_settime64", 2, { { "clockid_t", "which_clock" }, { "const struct __kernel_timespec *", "tp" } } },
{ 4405, "clock_adjtime64", 2, { { "clockid_t", "which_clock" }, { "struct __kernel_timex *", "tx" } } },
{ 4406, "clock_getres_time64", 2, { { "clockid_t", "which_clock" }, { "struct __kernel_timespec *", "tp" } } },
{ 4407, "clock_nanosleep_time64", 4, { { "clockid_t", "which_clock" }, { "int", "flags" }, { "const struct __kernel_timespec *", "rqtp" }, { "struct __kernel_timespec *", "rmtp" } } },
{ 4408, "timer_gettime64", 2, { { "timer_t", "timer_id" }, { "struct __kernel_itimerspec *", "setting" } } },
{ 4409, "timer_settime64", 4, { { "timer_t", "timer_id" }, { "int", "flags" }, { "const struct __kernel_itimerspec *", "new_setting" }, { "struct __kernel_itimerspec *", "old_setting" } } },
{ 4410, "timerfd_gettime64", 2, { { "int", "ufd" }, { "struct __kernel_itimerspec *", "otmr" } } },
{ 4411, "timerfd_settime64", 4, { { "int", "ufd" }, { "int", "flags" }, { "const struct __kernel_itimerspec *", "utmr" }, { "struct __kernel_itimerspec *", "otmr" } } },
{ 4412, "utimensat_time64", 4, { { "int", "dfd" }, { "const char *", "filename" }, { "struct __kernel_timespec *", "utimes" }, { "int", "flags" } } },
{ 4413, "pselect6_time64", 6, { { "int", "arg0" }, { "fd_set *", "arg1" }, { "fd_set *", "arg2" }, { "fd_set *", "arg3" }, { "struct __kernel_timespec *", "arg4" }, { "void *", "arg5" } } },
{ 4414, "ppoll_time64", 5, { { "struct pollfd *", "arg0" }, { "unsigned", "int" }, { "struct __kernel_timespec *", "arg2" }, { "const sigset_t *", "arg3" }, { "size_t", "arg4" } } },
{ 4416, "io_pgetevents_time64", 6, { { "aio_context_t", "ctx_id" }, { "long", "min_nr" }, { "long", "nr" }, { "struct io_event *", "events" }, { "struct __kernel_timespec *", "timeout" }, { "const struct __aio_sigset *", "sig" } } },
{ 4417, "recvmmsg_time64", 5, { { "int", "fd" }, { "struct compat_mmsghdr *", "mmsg" }, { "unsigned int", "vlen" }, { "unsigned int", "flags" }, { "struct __kernel_timespec *", "timeout" } } },
{ 4418, "mq_timedsend_time64", 5, { { "mqd_t", "mqdes" }, { "const char *", "msg_ptr" }, { "size_t", "msg_len" }, { "unsigned int", "msg_prio" }, { "const struct __kernel_timespec *", "abs_timeout" } } },
{ 4419, "mq_timedreceive_time64", 5, { { "mqd_t", "mqdes" }, { "char *", "msg_ptr" }, { "size_t", "msg_len" }, { "unsigned int *", "msg_prio" }, { "const struct __kernel_timespec *", "abs_timeout" } } },
{ 4420, "semtimedop_time64", 4, { { "int", "semid" }, { "struct sembuf *", "sops" }, { "unsigned", "nsops" }, { "const struct __kernel_timespec *", "timeout" } } },
{ 4421, "rt_sigtimedwait_time64", 4, { { "const sigset_t *", "uthese" }, { "siginfo_t *", "uinfo" }, { "const struct __kernel_timespec *", "uts" }, { "size_t", "sigsetsize" } } },
{ 4422, "futex_time64", 6, { { "u32 *", "uaddr" }, { "int", "op" }, { "u32", "val" }, { "const struct __kernel_timespec *", "utime" }, { "u32 *", "uaddr2" }, { "u32", "val3" } } },
{ 4423, "sched_rr_get_interval_time64", 2, { { "pid_t", "pid" }, { "struct __kernel_timespec *", "interval" } } },
{ 4424, "pidfd_send_signal", 4, { { "int", "pidfd" }, { "int", "sig" }, { "siginfo_t *", "info" }, { "unsigned int", "flags" } } },
{ 4425, "io_uring_setup", 2, { { "u32", "entries" }, { "struct io_uring_params *", "params" } } },
{ 4426, "io_uring_enter", 6, { { "unsigned int", "fd" }, { "u32", "to_submit" }, { "u32", "min_complete" }, { "u32", "flags" }, { "const void *", "argp" }, { "size_t", "argsz" } } },
{ 4427, "io_uring_register", 4, { { "unsigned int", "fd" }, { "unsigned int", "opcode" }, { "void *", "arg" }, { "unsigned int", "nr_args" } } },
{ 4428, "open_tree", 3, { { "int", "dfd" }, { "const char *", "filename" }, { "unsigned", "flags" } } },
{ 4429, "move_mount", 5, { { "int", "from_dfd" }, { "const char *", "from_pathname" }, { "int", "to_dfd" }, { "const char *", "to_pathname" }, { "unsigned int", "flags" } } },
{ 4430, "fsopen", 2, { { "const char *", "_fs_name" }, { "unsigned int", "flags" } } },
{ 4431, "fsconfig", 5, { { "int", "fd" }, { "unsigned int", "cmd" }, { "const char *", "_key" }, { "const void *", "_value" }, { "int", "aux" } } },
{ 4432, "fsmount", 3, { { "int", "fs_fd" }, { "unsigned int", "flags" }, { "unsigned int", "attr_flags" } } },
{ 4433, "fspick", 3, { { "int", "dfd" }, { "const char *", "path" }, { "unsigned int", "flags" } } },
{ 4434, "pidfd_open", 2, { { "pid_t", "pid" }, { "unsigned int", "flags" } } },
{ 4435, "clone3", 2, { { "struct clone_args *", "uargs" }, { "size_t", "size" } } },
{ 4436, "close_range", 3, { { "unsigned int", "fd" }, { "unsigned int", "max_fd" }, { "unsigned int", "flags" } } },
{ 4437, "openat2", 4, { { "int", "dfd" }, { "const char *", "filename" }, { "struct open_how *", "how" }, { "size_t", "usize" } } },
{ 4438, "pidfd_getfd", 3, { { "int", "pidfd" }, { "int", "fd" }, { "unsigned int", "flags" } } },
{ 4439, "faccessat2", 4, { { "int", "dfd" }, { "const char *", "filename" }, { "int", "mode" }, { "int", "flags" } } },
{ 4440, "process_madvise", 5, { { "int", "pidfd" }, { "const struct iovec *", "vec" }, { "size_t", "vlen" }, { "int", "behavior" }, { "unsigned int", "flags" } } },
{ 4441, "epoll_pwait2", 6, { { "int", "epfd" }, { "struct epoll_event *", "events" }, { "int", "maxevents" }, { "const struct __kernel_timespec *", "timeout" }, { "const sigset_t *", "sigmask" }, { "size_t", "sigsetsize" } } },
{ 4442, "mount_setattr", 5, { { "int", "dfd" }, { "const char *", "path" }, { "unsigned int", "flags" }, { "struct mount_attr *", "uattr" }, { "size_t", "usize" } } },
{ 4443, "quotactl_fd", 4, { { "unsigned int", "fd" }, { "unsigned int", "cmd" }, { "qid_t", "id" }, { "void *", "addr" } } },
{ 4444, "landlock_create_ruleset", 3, { { "const struct landlock_ruleset_attr *const", "attr" }, { "const size_t", "size" }, { "const __u32", "flags" } } },
{ 4445, "landlock_add_rule", 4, { { "const int", "ruleset_fd" }, { "const enum landlock_rule_type", "rule_type" }, { "const void *const", "rule_attr" }, { "const __u32", "flags" } } },
{ 4446, "landlock_restrict_self", 2, { { "const int", "ruleset_fd" }, { "const __u32", "flags" } } },
{ 4448, "process_mrelease", 2, { { "int", "pidfd" }, { "unsigned int", "flags" } } },
{ 4449, "futex_waitv", 5, { { "struct futex_waitv *", "waiters" }, { "unsigned int", "nr_futexes" }, { "unsigned int", "flags" }, { "struct __kernel_timespec *", "timeout" }, { "clockid_t", "clockid" } } },
{ 4450, "set_mempolicy_home_node", 4, { { "unsigned long", "start" }, { "unsigned long", "len" }, { "unsigned long", "home_node" }, { "unsigned long", "flags" } } },
{ 4451, "cachestat", 4, { { "unsigned int", "fd" }, { "struct cachestat_range *", "cstat_range" }, { "struct cachestat *", "cstat" }, { "unsigned int", "flags" } } },
{ 4452, "fchmodat2", 4, { { "int", "dfd" }, { "const char *", "filename" }, { "umode_t", "mode" }, { "unsigned int", "flags" } } },
{ 4453, "map_shadow_stack", 3, { { "unsigned long", "addr" }, { "unsigned long", "size" }, { "unsigned int", "flags" } } },
{ 4454, "futex_wake", 4, { { "void *", "uaddr" }, { "unsigned long", "mask" }, { "int", "nr" }, { "unsigned int", "flags" } } },
{ 4455, "futex_wait", 6, { { "void *", "uaddr" }, { "unsigned long", "val" }, { "unsigned long", "mask" }, { "unsigned int", "flags" }, { "struct __kernel_timespec *", "timeout" }, { "clockid_t", "clockid" } } },
{ 4456, "futex_requeue", 4, { { "struct futex_waitv *", "waiters" }, { "unsigned int", "flags" }, { "int", "nr_wake" }, { "int", "nr_requeue" } } },
{ 4457, "statmount", 4, { { "const struct mnt_id_req *", "req" }, { "struct statmount *", "buf" }, { "size_t", "bufsize" }, { "unsigned int", "flags" } } },
{ 4458, "listmount", 4, { { "const struct mnt_id_req *", "req" }, { "u64 *", "mnt_ids" }, { "size_t", "nr_mnt_ids" }, { "unsigned int", "flags" } } },
{ 4459, "lsm_get_self_attr", 4, { { "unsigned int", "attr" }, { "struct lsm_ctx *", "ctx" }, { "u32 *", "size" }, { "u32", "flags" } } },
{ 4460, "lsm_set_self_attr", 4, { { "unsigned int", "attr" }, { "struct lsm_ctx *", "ctx" }, { "u32", "size" }, { "u32", "flags" } } },
{ 4461, "lsm_list_modules", 3, { { "u64 *", "ids" }, { "u32 *", "size" }, { "u32", "flags" } } },
{ 4462, "mseal", 3, { { "unsigned long", "start" }, { "size_t", "len" }, { "unsigned long", "flags" } } },
{ 4463, "setxattrat", 6, { { "int", "dfd" }, { "const char *", "pathname" }, { "unsigned int", "at_flags" }, { "const char *", "name" }, { "const struct xattr_args *", "uargs" }, { "size_t", "usize" } } },
{ 4464, "getxattrat", 6, { { "int", "dfd" }, { "const char *", "pathname" }, { "unsigned int", "at_flags" }, { "const char *", "name" }, { "struct xattr_args *", "uargs" }, { "size_t", "usize" } } },
{ 4465, "listxattrat", 5, { { "int", "dfd" }, { "const char *", "pathname" }, { "unsigned int", "at_flags" }, { "char *", "list" }, { "size_t", "size" } } },
{ 4466, "removexattrat", 4, { { "int", "dfd" }, { "const char *", "pathname" }, { "unsigned int", "at_flags" }, { "const char *", "name" } } },
{ 4467, "open_tree_attr", 5, { { "int", "dfd" }, { "const char *", "filename" }, { "unsigned", "flags" }, { "struct mount_attr *", "uattr" }, { "size_t", "usize" } } },
{ 4468, "file_getattr", 5, { { "int", "dfd" }, { "const char *", "filename" }, { "struct file_attr *", "ufattr" }, { "size_t", "usize" }, { "unsigned int", "at_flags" } } },
{ 4469, "file_setattr", 5, { { "int", "dfd" }, { "const char *", "filename" }, { "struct file_attr *", "ufattr" }, { "size_t", "usize" }, { "unsigned int", "at_flags" } } },
{ 4470, "listns", 4, { { "const struct ns_id_req *", "req" }, { "u64 *", "ns_ids" }, { "size_t", "nr_ns_ids" }, { "unsigned int", "flags" } } },
};
FridaLinuxSyscallSignature *
frida_get_syscall_signatures (int * len)
{
if (len != NULL)
*len = G_N_ELEMENTS (frida_syscall_signatures);
return (FridaLinuxSyscallSignature *) frida_syscall_signatures;
}
FridaLinuxSyscallSignature *
frida_get_compat32_syscall_signatures (int * len)
{
if (len != NULL)
*len = 0;
return NULL;
}
+445
View File
@@ -0,0 +1,445 @@
// AUTO-GENERATED FILE. DO NOT EDIT.
namespace Frida {
public enum LinuxSyscall {
EXIT = 4001,
FORK = 4002,
READ = 4003,
WRITE = 4004,
OPEN = 4005,
CLOSE = 4006,
WAITPID = 4007,
CREAT = 4008,
LINK = 4009,
UNLINK = 4010,
EXECVE = 4011,
CHDIR = 4012,
TIME = 4013,
MKNOD = 4014,
CHMOD = 4015,
LCHOWN = 4016,
BREAK = 4017,
UNUSED18 = 4018,
LSEEK = 4019,
GETPID = 4020,
MOUNT = 4021,
UMOUNT = 4022,
SETUID = 4023,
GETUID = 4024,
STIME = 4025,
PTRACE = 4026,
ALARM = 4027,
UNUSED28 = 4028,
PAUSE = 4029,
UTIME = 4030,
STTY = 4031,
GTTY = 4032,
ACCESS = 4033,
NICE = 4034,
FTIME = 4035,
SYNC = 4036,
KILL = 4037,
RENAME = 4038,
MKDIR = 4039,
RMDIR = 4040,
DUP = 4041,
PIPE = 4042,
TIMES = 4043,
PROF = 4044,
BRK = 4045,
SETGID = 4046,
GETGID = 4047,
SIGNAL = 4048,
GETEUID = 4049,
GETEGID = 4050,
ACCT = 4051,
UMOUNT2 = 4052,
LOCK = 4053,
IOCTL = 4054,
FCNTL = 4055,
MPX = 4056,
SETPGID = 4057,
ULIMIT = 4058,
UNUSED59 = 4059,
UMASK = 4060,
CHROOT = 4061,
USTAT = 4062,
DUP2 = 4063,
GETPPID = 4064,
GETPGRP = 4065,
SETSID = 4066,
SGETMASK = 4068,
SSETMASK = 4069,
SETREUID = 4070,
SETREGID = 4071,
SIGPENDING = 4073,
SETHOSTNAME = 4074,
SETRLIMIT = 4075,
GETRLIMIT = 4076,
GETRUSAGE = 4077,
GETTIMEOFDAY = 4078,
SETTIMEOFDAY = 4079,
GETGROUPS = 4080,
SETGROUPS = 4081,
RESERVED82 = 4082,
SYMLINK = 4083,
UNUSED84 = 4084,
READLINK = 4085,
USELIB = 4086,
SWAPON = 4087,
REBOOT = 4088,
READDIR = 4089,
MMAP = 4090,
MUNMAP = 4091,
TRUNCATE = 4092,
FTRUNCATE = 4093,
FCHMOD = 4094,
FCHOWN = 4095,
GETPRIORITY = 4096,
SETPRIORITY = 4097,
PROFIL = 4098,
STATFS = 4099,
FSTATFS = 4100,
IOPERM = 4101,
SOCKETCALL = 4102,
SYSLOG = 4103,
SETITIMER = 4104,
GETITIMER = 4105,
STAT = 4106,
LSTAT = 4107,
FSTAT = 4108,
UNUSED109 = 4109,
IOPL = 4110,
VHANGUP = 4111,
IDLE = 4112,
VM86 = 4113,
WAIT4 = 4114,
SWAPOFF = 4115,
SYSINFO = 4116,
IPC = 4117,
FSYNC = 4118,
CLONE = 4120,
SETDOMAINNAME = 4121,
UNAME = 4122,
MODIFY_LDT = 4123,
ADJTIMEX = 4124,
MPROTECT = 4125,
SIGPROCMASK = 4126,
CREATE_MODULE = 4127,
INIT_MODULE = 4128,
DELETE_MODULE = 4129,
GET_KERNEL_SYMS = 4130,
QUOTACTL = 4131,
GETPGID = 4132,
FCHDIR = 4133,
BDFLUSH = 4134,
SYSFS = 4135,
PERSONALITY = 4136,
AFS_SYSCALL = 4137,
SETFSUID = 4138,
SETFSGID = 4139,
_LLSEEK = 4140,
GETDENTS = 4141,
_NEWSELECT = 4142,
FLOCK = 4143,
MSYNC = 4144,
READV = 4145,
WRITEV = 4146,
CACHEFLUSH = 4147,
CACHECTL = 4148,
SYSMIPS = 4149,
UNUSED150 = 4150,
GETSID = 4151,
FDATASYNC = 4152,
_SYSCTL = 4153,
MLOCK = 4154,
MUNLOCK = 4155,
MLOCKALL = 4156,
MUNLOCKALL = 4157,
SCHED_SETPARAM = 4158,
SCHED_GETPARAM = 4159,
SCHED_SETSCHEDULER = 4160,
SCHED_GETSCHEDULER = 4161,
SCHED_YIELD = 4162,
SCHED_GET_PRIORITY_MAX = 4163,
SCHED_GET_PRIORITY_MIN = 4164,
SCHED_RR_GET_INTERVAL = 4165,
NANOSLEEP = 4166,
MREMAP = 4167,
ACCEPT = 4168,
BIND = 4169,
CONNECT = 4170,
GETPEERNAME = 4171,
GETSOCKNAME = 4172,
GETSOCKOPT = 4173,
LISTEN = 4174,
RECV = 4175,
RECVFROM = 4176,
RECVMSG = 4177,
SEND = 4178,
SENDMSG = 4179,
SENDTO = 4180,
SETSOCKOPT = 4181,
SHUTDOWN = 4182,
SOCKET = 4183,
SOCKETPAIR = 4184,
SETRESUID = 4185,
GETRESUID = 4186,
QUERY_MODULE = 4187,
POLL = 4188,
NFSSERVCTL = 4189,
SETRESGID = 4190,
GETRESGID = 4191,
PRCTL = 4192,
RT_SIGACTION = 4194,
RT_SIGPROCMASK = 4195,
RT_SIGPENDING = 4196,
RT_SIGTIMEDWAIT = 4197,
RT_SIGQUEUEINFO = 4198,
RT_SIGSUSPEND = 4199,
PREAD64 = 4200,
PWRITE64 = 4201,
CHOWN = 4202,
GETCWD = 4203,
CAPGET = 4204,
CAPSET = 4205,
SIGALTSTACK = 4206,
SENDFILE = 4207,
GETPMSG = 4208,
PUTPMSG = 4209,
MMAP2 = 4210,
TRUNCATE64 = 4211,
FTRUNCATE64 = 4212,
STAT64 = 4213,
LSTAT64 = 4214,
FSTAT64 = 4215,
PIVOT_ROOT = 4216,
MINCORE = 4217,
MADVISE = 4218,
GETDENTS64 = 4219,
FCNTL64 = 4220,
RESERVED221 = 4221,
GETTID = 4222,
READAHEAD = 4223,
SETXATTR = 4224,
LSETXATTR = 4225,
FSETXATTR = 4226,
GETXATTR = 4227,
LGETXATTR = 4228,
FGETXATTR = 4229,
LISTXATTR = 4230,
LLISTXATTR = 4231,
FLISTXATTR = 4232,
REMOVEXATTR = 4233,
LREMOVEXATTR = 4234,
FREMOVEXATTR = 4235,
TKILL = 4236,
SENDFILE64 = 4237,
FUTEX = 4238,
SCHED_SETAFFINITY = 4239,
SCHED_GETAFFINITY = 4240,
IO_SETUP = 4241,
IO_DESTROY = 4242,
IO_GETEVENTS = 4243,
IO_SUBMIT = 4244,
IO_CANCEL = 4245,
EXIT_GROUP = 4246,
LOOKUP_DCOOKIE = 4247,
EPOLL_CREATE = 4248,
EPOLL_CTL = 4249,
EPOLL_WAIT = 4250,
REMAP_FILE_PAGES = 4251,
SET_TID_ADDRESS = 4252,
RESTART_SYSCALL = 4253,
FADVISE64 = 4254,
STATFS64 = 4255,
FSTATFS64 = 4256,
TIMER_CREATE = 4257,
TIMER_SETTIME = 4258,
TIMER_GETTIME = 4259,
TIMER_GETOVERRUN = 4260,
TIMER_DELETE = 4261,
CLOCK_SETTIME = 4262,
CLOCK_GETTIME = 4263,
CLOCK_GETRES = 4264,
CLOCK_NANOSLEEP = 4265,
TGKILL = 4266,
UTIMES = 4267,
MBIND = 4268,
GET_MEMPOLICY = 4269,
SET_MEMPOLICY = 4270,
MQ_OPEN = 4271,
MQ_UNLINK = 4272,
MQ_TIMEDSEND = 4273,
MQ_TIMEDRECEIVE = 4274,
MQ_NOTIFY = 4275,
MQ_GETSETATTR = 4276,
VSERVER = 4277,
WAITID = 4278,
ADD_KEY = 4280,
REQUEST_KEY = 4281,
KEYCTL = 4282,
SET_THREAD_AREA = 4283,
INOTIFY_INIT = 4284,
INOTIFY_ADD_WATCH = 4285,
INOTIFY_RM_WATCH = 4286,
MIGRATE_PAGES = 4287,
OPENAT = 4288,
MKDIRAT = 4289,
MKNODAT = 4290,
FCHOWNAT = 4291,
FUTIMESAT = 4292,
FSTATAT64 = 4293,
UNLINKAT = 4294,
RENAMEAT = 4295,
LINKAT = 4296,
SYMLINKAT = 4297,
READLINKAT = 4298,
FCHMODAT = 4299,
FACCESSAT = 4300,
PSELECT6 = 4301,
PPOLL = 4302,
UNSHARE = 4303,
SPLICE = 4304,
SYNC_FILE_RANGE = 4305,
TEE = 4306,
VMSPLICE = 4307,
MOVE_PAGES = 4308,
SET_ROBUST_LIST = 4309,
GET_ROBUST_LIST = 4310,
KEXEC_LOAD = 4311,
GETCPU = 4312,
EPOLL_PWAIT = 4313,
IOPRIO_SET = 4314,
IOPRIO_GET = 4315,
UTIMENSAT = 4316,
SIGNALFD = 4317,
TIMERFD = 4318,
EVENTFD = 4319,
FALLOCATE = 4320,
TIMERFD_CREATE = 4321,
TIMERFD_GETTIME = 4322,
TIMERFD_SETTIME = 4323,
SIGNALFD4 = 4324,
EVENTFD2 = 4325,
EPOLL_CREATE1 = 4326,
DUP3 = 4327,
PIPE2 = 4328,
INOTIFY_INIT1 = 4329,
PREADV = 4330,
PWRITEV = 4331,
RT_TGSIGQUEUEINFO = 4332,
PERF_EVENT_OPEN = 4333,
ACCEPT4 = 4334,
RECVMMSG = 4335,
FANOTIFY_INIT = 4336,
FANOTIFY_MARK = 4337,
PRLIMIT64 = 4338,
NAME_TO_HANDLE_AT = 4339,
OPEN_BY_HANDLE_AT = 4340,
CLOCK_ADJTIME = 4341,
SYNCFS = 4342,
SENDMMSG = 4343,
SETNS = 4344,
PROCESS_VM_READV = 4345,
PROCESS_VM_WRITEV = 4346,
KCMP = 4347,
FINIT_MODULE = 4348,
SCHED_SETATTR = 4349,
SCHED_GETATTR = 4350,
RENAMEAT2 = 4351,
SECCOMP = 4352,
GETRANDOM = 4353,
MEMFD_CREATE = 4354,
BPF = 4355,
EXECVEAT = 4356,
USERFAULTFD = 4357,
MEMBARRIER = 4358,
MLOCK2 = 4359,
COPY_FILE_RANGE = 4360,
PREADV2 = 4361,
PWRITEV2 = 4362,
PKEY_MPROTECT = 4363,
PKEY_ALLOC = 4364,
PKEY_FREE = 4365,
STATX = 4366,
RSEQ = 4367,
IO_PGETEVENTS = 4368,
SEMGET = 4393,
SEMCTL = 4394,
SHMGET = 4395,
SHMCTL = 4396,
SHMAT = 4397,
SHMDT = 4398,
MSGGET = 4399,
MSGSND = 4400,
MSGRCV = 4401,
MSGCTL = 4402,
CLOCK_GETTIME64 = 4403,
CLOCK_SETTIME64 = 4404,
CLOCK_ADJTIME64 = 4405,
CLOCK_GETRES_TIME64 = 4406,
CLOCK_NANOSLEEP_TIME64 = 4407,
TIMER_GETTIME64 = 4408,
TIMER_SETTIME64 = 4409,
TIMERFD_GETTIME64 = 4410,
TIMERFD_SETTIME64 = 4411,
UTIMENSAT_TIME64 = 4412,
PSELECT6_TIME64 = 4413,
PPOLL_TIME64 = 4414,
IO_PGETEVENTS_TIME64 = 4416,
RECVMMSG_TIME64 = 4417,
MQ_TIMEDSEND_TIME64 = 4418,
MQ_TIMEDRECEIVE_TIME64 = 4419,
SEMTIMEDOP_TIME64 = 4420,
RT_SIGTIMEDWAIT_TIME64 = 4421,
FUTEX_TIME64 = 4422,
SCHED_RR_GET_INTERVAL_TIME64 = 4423,
PIDFD_SEND_SIGNAL = 4424,
IO_URING_SETUP = 4425,
IO_URING_ENTER = 4426,
IO_URING_REGISTER = 4427,
OPEN_TREE = 4428,
MOVE_MOUNT = 4429,
FSOPEN = 4430,
FSCONFIG = 4431,
FSMOUNT = 4432,
FSPICK = 4433,
PIDFD_OPEN = 4434,
CLONE3 = 4435,
CLOSE_RANGE = 4436,
OPENAT2 = 4437,
PIDFD_GETFD = 4438,
FACCESSAT2 = 4439,
PROCESS_MADVISE = 4440,
EPOLL_PWAIT2 = 4441,
MOUNT_SETATTR = 4442,
QUOTACTL_FD = 4443,
LANDLOCK_CREATE_RULESET = 4444,
LANDLOCK_ADD_RULE = 4445,
LANDLOCK_RESTRICT_SELF = 4446,
PROCESS_MRELEASE = 4448,
FUTEX_WAITV = 4449,
SET_MEMPOLICY_HOME_NODE = 4450,
CACHESTAT = 4451,
FCHMODAT2 = 4452,
MAP_SHADOW_STACK = 4453,
FUTEX_WAKE = 4454,
FUTEX_WAIT = 4455,
FUTEX_REQUEUE = 4456,
STATMOUNT = 4457,
LISTMOUNT = 4458,
LSM_GET_SELF_ATTR = 4459,
LSM_SET_SELF_ATTR = 4460,
LSM_LIST_MODULES = 4461,
MSEAL = 4462,
SETXATTRAT = 4463,
GETXATTRAT = 4464,
LISTXATTRAT = 4465,
REMOVEXATTRAT = 4466,
OPEN_TREE_ATTR = 4467,
FILE_GETATTR = 4468,
FILE_SETATTR = 4469,
LISTNS = 4470,
}
}
+396
View File
@@ -0,0 +1,396 @@
/* AUTO-GENERATED FILE. DO NOT EDIT. */
#include "frida-base.h"
static const FridaLinuxSyscallSignature frida_syscall_signatures[] =
{
{ 5000, "read", 3, { { "unsigned int", "fd" }, { "char *", "buf" }, { "size_t", "count" } } },
{ 5001, "write", 3, { { "unsigned int", "fd" }, { "const char *", "buf" }, { "size_t", "count" } } },
{ 5002, "open", 3, { { "const char *", "filename" }, { "int", "flags" }, { "umode_t", "mode" } } },
{ 5003, "close", 1, { { "unsigned int", "fd" } } },
{ 5004, "stat", 2, { { "const char *", "filename" }, { "struct stat *", "statbuf" } } },
{ 5005, "fstat", 2, { { "unsigned int", "fd" }, { "struct stat *", "statbuf" } } },
{ 5006, "lstat", 2, { { "const char *", "filename" }, { "struct stat *", "statbuf" } } },
{ 5007, "poll", 3, { { "struct pollfd *", "ufds" }, { "unsigned int", "nfds" }, { "int", "timeout_msecs" } } },
{ 5008, "lseek", 3, { { "unsigned int", "fd" }, { "off_t", "offset" }, { "unsigned int", "whence" } } },
{ 5009, "mmap", 6, { { "unsigned long", "addr" }, { "unsigned long", "len" }, { "unsigned long", "prot" }, { "unsigned long", "flags" }, { "unsigned long", "fd" }, { "off_t", "offset" } } },
{ 5010, "mprotect", 3, { { "unsigned long", "start" }, { "size_t", "len" }, { "unsigned long", "prot" } } },
{ 5011, "munmap", 2, { { "unsigned long", "addr" }, { "size_t", "len" } } },
{ 5012, "brk", 1, { { "unsigned long", "brk" } } },
{ 5013, "rt_sigaction", 4, { { "int", "sig" }, { "const struct sigaction *", "act" }, { "struct sigaction *", "oact" }, { "size_t", "sigsetsize" } } },
{ 5014, "rt_sigprocmask", 4, { { "int", "how" }, { "sigset_t *", "nset" }, { "sigset_t *", "oset" }, { "size_t", "sigsetsize" } } },
{ 5015, "ioctl", 3, { { "unsigned int", "fd" }, { "unsigned int", "cmd" }, { "unsigned long", "arg" } } },
{ 5016, "pread64", 4, { { "unsigned int", "fd" }, { "char *", "buf" }, { "size_t", "count" }, { "loff_t", "pos" } } },
{ 5017, "pwrite64", 4, { { "unsigned int", "fd" }, { "const char *", "buf" }, { "size_t", "count" }, { "loff_t", "pos" } } },
{ 5018, "readv", 3, { { "unsigned long", "fd" }, { "const struct iovec *", "vec" }, { "unsigned long", "vlen" } } },
{ 5019, "writev", 3, { { "unsigned long", "fd" }, { "const struct iovec *", "vec" }, { "unsigned long", "vlen" } } },
{ 5020, "access", 2, { { "const char *", "filename" }, { "int", "mode" } } },
{ 5021, "pipe", 1, { { "int *", "fildes" } } },
{ 5022, "_newselect", 5, { { "int", "n" }, { "fd_set *", "inp" }, { "fd_set *", "outp" }, { "fd_set *", "exp" }, { "struct __kernel_old_timeval *", "tvp" } } },
{ 5023, "sched_yield", 0, {} },
{ 5024, "mremap", 5, { { "unsigned long", "addr" }, { "unsigned long", "old_len" }, { "unsigned long", "new_len" }, { "unsigned long", "flags" }, { "unsigned long", "new_addr" } } },
{ 5025, "msync", 3, { { "unsigned long", "start" }, { "size_t", "len" }, { "int", "flags" } } },
{ 5026, "mincore", 3, { { "unsigned long", "start" }, { "size_t", "len" }, { "unsigned char *", "vec" } } },
{ 5027, "madvise", 3, { { "unsigned long", "start" }, { "size_t", "len_in" }, { "int", "behavior" } } },
{ 5028, "shmget", 3, { { "key_t", "key" }, { "size_t", "size" }, { "int", "shmflg" } } },
{ 5029, "shmat", 3, { { "int", "shmid" }, { "char *", "shmaddr" }, { "int", "shmflg" } } },
{ 5030, "shmctl", 3, { { "int", "shmid" }, { "int", "cmd" }, { "struct shmid_ds *", "buf" } } },
{ 5031, "dup", 1, { { "unsigned int", "fildes" } } },
{ 5032, "dup2", 2, { { "unsigned int", "oldfd" }, { "unsigned int", "newfd" } } },
{ 5033, "pause", 0, {} },
{ 5034, "nanosleep", 2, { { "struct __kernel_timespec *", "rqtp" }, { "struct __kernel_timespec *", "rmtp" } } },
{ 5035, "getitimer", 2, { { "int", "which" }, { "struct __kernel_old_itimerval *", "value" } } },
{ 5036, "setitimer", 3, { { "int", "which" }, { "struct __kernel_old_itimerval *", "value" }, { "struct __kernel_old_itimerval *", "ovalue" } } },
{ 5037, "alarm", 1, { { "unsigned int", "seconds" } } },
{ 5038, "getpid", 0, {} },
{ 5039, "sendfile", 4, { { "int", "out_fd" }, { "int", "in_fd" }, { "off_t *", "offset" }, { "size_t", "count" } } },
{ 5040, "socket", 3, { { "int", "family" }, { "int", "type" }, { "int", "protocol" } } },
{ 5041, "connect", 3, { { "int", "fd" }, { "struct sockaddr *", "uservaddr" }, { "int", "addrlen" } } },
{ 5042, "accept", 3, { { "int", "fd" }, { "struct sockaddr *", "upeer_sockaddr" }, { "int *", "upeer_addrlen" } } },
{ 5043, "sendto", 6, { { "int", "fd" }, { "void *", "buff" }, { "size_t", "len" }, { "unsigned int", "flags" }, { "struct sockaddr *", "addr" }, { "int", "addr_len" } } },
{ 5044, "recvfrom", 6, { { "int", "fd" }, { "void *", "ubuf" }, { "size_t", "size" }, { "unsigned int", "flags" }, { "struct sockaddr *", "addr" }, { "int *", "addr_len" } } },
{ 5045, "sendmsg", 3, { { "int", "fd" }, { "struct user_msghdr *", "msg" }, { "unsigned int", "flags" } } },
{ 5046, "recvmsg", 3, { { "int", "fd" }, { "struct user_msghdr *", "msg" }, { "unsigned int", "flags" } } },
{ 5047, "shutdown", 2, { { "int", "fd" }, { "int", "how" } } },
{ 5048, "bind", 3, { { "int", "fd" }, { "struct sockaddr *", "umyaddr" }, { "int", "addrlen" } } },
{ 5049, "listen", 2, { { "int", "fd" }, { "int", "backlog" } } },
{ 5050, "getsockname", 3, { { "int", "fd" }, { "struct sockaddr *", "usockaddr" }, { "int *", "usockaddr_len" } } },
{ 5051, "getpeername", 3, { { "int", "fd" }, { "struct sockaddr *", "usockaddr" }, { "int *", "usockaddr_len" } } },
{ 5052, "socketpair", 4, { { "int", "family" }, { "int", "type" }, { "int", "protocol" }, { "int *", "usockvec" } } },
{ 5053, "setsockopt", 5, { { "int", "fd" }, { "int", "level" }, { "int", "optname" }, { "char *", "optval" }, { "int", "optlen" } } },
{ 5054, "getsockopt", 5, { { "int", "fd" }, { "int", "level" }, { "int", "optname" }, { "char *", "optval" }, { "int *", "optlen" } } },
{ 5055, "clone", 5, { { "unsigned long", "clone_flags" }, { "unsigned long", "newsp" }, { "int *", "parent_tidptr" }, { "int *", "child_tidptr" }, { "unsigned long", "tls" } } },
{ 5056, "fork", 0, {} },
{ 5057, "execve", 3, { { "const char *", "filename" }, { "const char *const *", "argv" }, { "const char *const *", "envp" } } },
{ 5058, "exit", 1, { { "int", "error_code" } } },
{ 5059, "wait4", 4, { { "pid_t", "upid" }, { "int *", "stat_addr" }, { "int", "options" }, { "struct rusage *", "ru" } } },
{ 5060, "kill", 2, { { "pid_t", "pid" }, { "int", "sig" } } },
{ 5061, "uname", 1, { { "struct old_utsname *", "name" } } },
{ 5062, "semget", 3, { { "key_t", "key" }, { "int", "nsems" }, { "int", "semflg" } } },
{ 5063, "semop", 3, { { "int", "semid" }, { "struct sembuf *", "tsops" }, { "unsigned", "nsops" } } },
{ 5064, "semctl", 4, { { "int", "semid" }, { "int", "semnum" }, { "int", "cmd" }, { "unsigned long", "arg" } } },
{ 5065, "shmdt", 1, { { "char *", "shmaddr" } } },
{ 5066, "msgget", 2, { { "key_t", "key" }, { "int", "msgflg" } } },
{ 5067, "msgsnd", 4, { { "int", "msqid" }, { "struct msgbuf *", "msgp" }, { "size_t", "msgsz" }, { "int", "msgflg" } } },
{ 5068, "msgrcv", 5, { { "int", "msqid" }, { "struct msgbuf *", "msgp" }, { "size_t", "msgsz" }, { "long", "msgtyp" }, { "int", "msgflg" } } },
{ 5069, "msgctl", 3, { { "int", "msqid" }, { "int", "cmd" }, { "struct msqid_ds *", "buf" } } },
{ 5070, "fcntl", 3, { { "unsigned int", "fd" }, { "unsigned int", "cmd" }, { "unsigned long", "arg" } } },
{ 5071, "flock", 2, { { "unsigned int", "fd" }, { "unsigned int", "cmd" } } },
{ 5072, "fsync", 1, { { "unsigned int", "fd" } } },
{ 5073, "fdatasync", 1, { { "unsigned int", "fd" } } },
{ 5074, "truncate", 2, { { "const char *", "path" }, { "long", "length" } } },
{ 5075, "ftruncate", 2, { { "unsigned int", "fd" }, { "off_t", "length" } } },
{ 5076, "getdents", 3, { { "unsigned int", "fd" }, { "struct linux_dirent *", "dirent" }, { "unsigned int", "count" } } },
{ 5077, "getcwd", 2, { { "char *", "buf" }, { "unsigned long", "size" } } },
{ 5078, "chdir", 1, { { "const char *", "filename" } } },
{ 5079, "fchdir", 1, { { "unsigned int", "fd" } } },
{ 5080, "rename", 2, { { "const char *", "oldname" }, { "const char *", "newname" } } },
{ 5081, "mkdir", 2, { { "const char *", "pathname" }, { "umode_t", "mode" } } },
{ 5082, "rmdir", 1, { { "const char *", "pathname" } } },
{ 5083, "creat", 2, { { "const char *", "pathname" }, { "umode_t", "mode" } } },
{ 5084, "link", 2, { { "const char *", "oldname" }, { "const char *", "newname" } } },
{ 5085, "unlink", 1, { { "const char *", "pathname" } } },
{ 5086, "symlink", 2, { { "const char *", "oldname" }, { "const char *", "newname" } } },
{ 5087, "readlink", 3, { { "const char *", "path" }, { "char *", "buf" }, { "int", "bufsiz" } } },
{ 5088, "chmod", 2, { { "const char *", "filename" }, { "umode_t", "mode" } } },
{ 5089, "fchmod", 2, { { "unsigned int", "fd" }, { "umode_t", "mode" } } },
{ 5090, "chown", 3, { { "const char *", "filename" }, { "uid_t", "user" }, { "gid_t", "group" } } },
{ 5091, "fchown", 3, { { "unsigned int", "fd" }, { "uid_t", "user" }, { "gid_t", "group" } } },
{ 5092, "lchown", 3, { { "const char *", "filename" }, { "uid_t", "user" }, { "gid_t", "group" } } },
{ 5093, "umask", 1, { { "int", "mask" } } },
{ 5094, "gettimeofday", 2, { { "struct __kernel_old_timeval *", "tv" }, { "struct timezone *", "tz" } } },
{ 5095, "getrlimit", 2, { { "unsigned int", "resource" }, { "struct rlimit *", "rlim" } } },
{ 5096, "getrusage", 2, { { "int", "who" }, { "struct rusage *", "ru" } } },
{ 5097, "sysinfo", 1, { { "struct sysinfo *", "info" } } },
{ 5098, "times", 1, { { "struct tms *", "tbuf" } } },
{ 5099, "ptrace", 4, { { "long", "request" }, { "long", "pid" }, { "unsigned long", "addr" }, { "unsigned long", "data" } } },
{ 5100, "getuid", 0, {} },
{ 5101, "syslog", 3, { { "int", "type" }, { "char *", "buf" }, { "int", "len" } } },
{ 5102, "getgid", 0, {} },
{ 5103, "setuid", 1, { { "uid_t", "uid" } } },
{ 5104, "setgid", 1, { { "gid_t", "gid" } } },
{ 5105, "geteuid", 0, {} },
{ 5106, "getegid", 0, {} },
{ 5107, "setpgid", 2, { { "pid_t", "pid" }, { "pid_t", "pgid" } } },
{ 5108, "getppid", 0, {} },
{ 5109, "getpgrp", 0, {} },
{ 5110, "setsid", 0, {} },
{ 5111, "setreuid", 2, { { "uid_t", "ruid" }, { "uid_t", "euid" } } },
{ 5112, "setregid", 2, { { "gid_t", "rgid" }, { "gid_t", "egid" } } },
{ 5113, "getgroups", 2, { { "int", "gidsetsize" }, { "gid_t *", "grouplist" } } },
{ 5114, "setgroups", 2, { { "int", "gidsetsize" }, { "gid_t *", "grouplist" } } },
{ 5115, "setresuid", 3, { { "uid_t", "ruid" }, { "uid_t", "euid" }, { "uid_t", "suid" } } },
{ 5116, "getresuid", 3, { { "uid_t *", "ruidp" }, { "uid_t *", "euidp" }, { "uid_t *", "suidp" } } },
{ 5117, "setresgid", 3, { { "gid_t", "rgid" }, { "gid_t", "egid" }, { "gid_t", "sgid" } } },
{ 5118, "getresgid", 3, { { "gid_t *", "rgidp" }, { "gid_t *", "egidp" }, { "gid_t *", "sgidp" } } },
{ 5119, "getpgid", 1, { { "pid_t", "pid" } } },
{ 5120, "setfsuid", 1, { { "uid_t", "uid" } } },
{ 5121, "setfsgid", 1, { { "gid_t", "gid" } } },
{ 5122, "getsid", 1, { { "pid_t", "pid" } } },
{ 5123, "capget", 2, { { "cap_user_header_t", "header" }, { "cap_user_data_t", "dataptr" } } },
{ 5124, "capset", 2, { { "cap_user_header_t", "header" }, { "const cap_user_data_t", "data" } } },
{ 5125, "rt_sigpending", 2, { { "sigset_t *", "uset" }, { "size_t", "sigsetsize" } } },
{ 5126, "rt_sigtimedwait", 4, { { "const sigset_t *", "uthese" }, { "siginfo_t *", "uinfo" }, { "const struct __kernel_timespec *", "uts" }, { "size_t", "sigsetsize" } } },
{ 5127, "rt_sigqueueinfo", 3, { { "pid_t", "pid" }, { "int", "sig" }, { "siginfo_t *", "uinfo" } } },
{ 5128, "rt_sigsuspend", 2, { { "sigset_t *", "unewset" }, { "size_t", "sigsetsize" } } },
{ 5129, "sigaltstack", 2, { { "const stack_t *", "uss" }, { "stack_t *", "uoss" } } },
{ 5130, "utime", 2, { { "char *", "filename" }, { "struct utimbuf *", "times" } } },
{ 5131, "mknod", 3, { { "const char *", "filename" }, { "umode_t", "mode" }, { "unsigned", "dev" } } },
{ 5132, "personality", 1, { { "unsigned int", "personality" } } },
{ 5133, "ustat", 2, { { "unsigned", "dev" }, { "struct ustat *", "ubuf" } } },
{ 5134, "statfs", 2, { { "const char *", "pathname" }, { "struct statfs *", "buf" } } },
{ 5135, "fstatfs", 2, { { "unsigned int", "fd" }, { "struct statfs *", "buf" } } },
{ 5136, "sysfs", 3, { { "int", "option" }, { "unsigned long", "arg1" }, { "unsigned long", "arg2" } } },
{ 5137, "getpriority", 2, { { "int", "which" }, { "int", "who" } } },
{ 5138, "setpriority", 3, { { "int", "which" }, { "int", "who" }, { "int", "niceval" } } },
{ 5139, "sched_setparam", 2, { { "pid_t", "pid" }, { "struct sched_param *", "param" } } },
{ 5140, "sched_getparam", 2, { { "pid_t", "pid" }, { "struct sched_param *", "param" } } },
{ 5141, "sched_setscheduler", 3, { { "pid_t", "pid" }, { "int", "policy" }, { "struct sched_param *", "param" } } },
{ 5142, "sched_getscheduler", 1, { { "pid_t", "pid" } } },
{ 5143, "sched_get_priority_max", 1, { { "int", "policy" } } },
{ 5144, "sched_get_priority_min", 1, { { "int", "policy" } } },
{ 5145, "sched_rr_get_interval", 2, { { "pid_t", "pid" }, { "struct __kernel_timespec *", "interval" } } },
{ 5146, "mlock", 2, { { "unsigned long", "start" }, { "size_t", "len" } } },
{ 5147, "munlock", 2, { { "unsigned long", "start" }, { "size_t", "len" } } },
{ 5148, "mlockall", 1, { { "int", "flags" } } },
{ 5149, "munlockall", 0, {} },
{ 5150, "vhangup", 0, {} },
{ 5151, "pivot_root", 2, { { "const char *", "new_root" }, { "const char *", "put_old" } } },
{ 5152, "_sysctl", 0, {} },
{ 5153, "prctl", 5, { { "int", "option" }, { "unsigned long", "arg2" }, { "unsigned long", "arg3" }, { "unsigned long", "arg4" }, { "unsigned long", "arg5" } } },
{ 5154, "adjtimex", 1, { { "struct __kernel_timex *", "txc_p" } } },
{ 5155, "setrlimit", 2, { { "unsigned int", "resource" }, { "struct rlimit *", "rlim" } } },
{ 5156, "chroot", 1, { { "const char *", "filename" } } },
{ 5157, "sync", 0, {} },
{ 5158, "acct", 1, { { "const char *", "name" } } },
{ 5159, "settimeofday", 2, { { "struct __kernel_old_timeval *", "tv" }, { "struct timezone *", "tz" } } },
{ 5160, "mount", 5, { { "char *", "dev_name" }, { "char *", "dir_name" }, { "char *", "type" }, { "unsigned long", "flags" }, { "void *", "data" } } },
{ 5161, "umount2", 2, { { "char *", "name" }, { "int", "flags" } } },
{ 5162, "swapon", 2, { { "const char *", "specialfile" }, { "int", "swap_flags" } } },
{ 5163, "swapoff", 1, { { "const char *", "specialfile" } } },
{ 5164, "reboot", 4, { { "int", "magic1" }, { "int", "magic2" }, { "unsigned int", "cmd" }, { "void *", "arg" } } },
{ 5165, "sethostname", 2, { { "char *", "name" }, { "int", "len" } } },
{ 5166, "setdomainname", 2, { { "char *", "name" }, { "int", "len" } } },
{ 5167, "create_module", 0, {} },
{ 5168, "init_module", 3, { { "void *", "umod" }, { "unsigned long", "len" }, { "const char *", "uargs" } } },
{ 5169, "delete_module", 2, { { "const char *", "name_user" }, { "unsigned int", "flags" } } },
{ 5170, "get_kernel_syms", 0, {} },
{ 5171, "query_module", 0, {} },
{ 5172, "quotactl", 4, { { "unsigned int", "cmd" }, { "const char *", "special" }, { "qid_t", "id" }, { "void *", "addr" } } },
{ 5173, "nfsservctl", 0, {} },
{ 5174, "getpmsg", 0, {} },
{ 5175, "putpmsg", 0, {} },
{ 5176, "afs_syscall", 0, {} },
{ 5177, "reserved177", 0, {} },
{ 5178, "gettid", 0, {} },
{ 5179, "readahead", 3, { { "int", "fd" }, { "loff_t", "offset" }, { "size_t", "count" } } },
{ 5180, "setxattr", 5, { { "const char *", "pathname" }, { "const char *", "name" }, { "const void *", "value" }, { "size_t", "size" }, { "int", "flags" } } },
{ 5181, "lsetxattr", 5, { { "const char *", "pathname" }, { "const char *", "name" }, { "const void *", "value" }, { "size_t", "size" }, { "int", "flags" } } },
{ 5182, "fsetxattr", 5, { { "int", "fd" }, { "const char *", "name" }, { "const void *", "value" }, { "size_t", "size" }, { "int", "flags" } } },
{ 5183, "getxattr", 4, { { "const char *", "pathname" }, { "const char *", "name" }, { "void *", "value" }, { "size_t", "size" } } },
{ 5184, "lgetxattr", 4, { { "const char *", "pathname" }, { "const char *", "name" }, { "void *", "value" }, { "size_t", "size" } } },
{ 5185, "fgetxattr", 4, { { "int", "fd" }, { "const char *", "name" }, { "void *", "value" }, { "size_t", "size" } } },
{ 5186, "listxattr", 3, { { "const char *", "pathname" }, { "char *", "list" }, { "size_t", "size" } } },
{ 5187, "llistxattr", 3, { { "const char *", "pathname" }, { "char *", "list" }, { "size_t", "size" } } },
{ 5188, "flistxattr", 3, { { "int", "fd" }, { "char *", "list" }, { "size_t", "size" } } },
{ 5189, "removexattr", 2, { { "const char *", "pathname" }, { "const char *", "name" } } },
{ 5190, "lremovexattr", 2, { { "const char *", "pathname" }, { "const char *", "name" } } },
{ 5191, "fremovexattr", 2, { { "int", "fd" }, { "const char *", "name" } } },
{ 5192, "tkill", 2, { { "pid_t", "pid" }, { "int", "sig" } } },
{ 5193, "reserved193", 0, {} },
{ 5194, "futex", 6, { { "u32 *", "uaddr" }, { "int", "op" }, { "u32", "val" }, { "const struct __kernel_timespec *", "utime" }, { "u32 *", "uaddr2" }, { "u32", "val3" } } },
{ 5195, "sched_setaffinity", 3, { { "pid_t", "pid" }, { "unsigned int", "len" }, { "unsigned long *", "user_mask_ptr" } } },
{ 5196, "sched_getaffinity", 3, { { "pid_t", "pid" }, { "unsigned int", "len" }, { "unsigned long *", "user_mask_ptr" } } },
{ 5197, "cacheflush", 3, { { "unsigned long", "addr" }, { "unsigned long", "bytes" }, { "unsigned int", "cache" } } },
{ 5198, "cachectl", 3, { { "char *", "addr" }, { "int", "nbytes" }, { "int", "op" } } },
{ 5199, "sysmips", 3, { { "long", "cmd" }, { "long", "arg1" }, { "long", "arg2" } } },
{ 5200, "io_setup", 2, { { "unsigned", "nr_events" }, { "aio_context_t *", "ctxp" } } },
{ 5201, "io_destroy", 1, { { "aio_context_t", "ctx" } } },
{ 5202, "io_getevents", 5, { { "aio_context_t", "ctx_id" }, { "long", "min_nr" }, { "long", "nr" }, { "struct io_event *", "events" }, { "struct __kernel_timespec *", "timeout" } } },
{ 5203, "io_submit", 3, { { "aio_context_t", "ctx_id" }, { "long", "nr" }, { "struct iocb * *", "iocbpp" } } },
{ 5204, "io_cancel", 3, { { "aio_context_t", "ctx_id" }, { "struct iocb *", "iocb" }, { "struct io_event *", "result" } } },
{ 5205, "exit_group", 1, { { "int", "error_code" } } },
{ 5206, "lookup_dcookie", 0, {} },
{ 5207, "epoll_create", 1, { { "int", "size" } } },
{ 5208, "epoll_ctl", 4, { { "int", "epfd" }, { "int", "op" }, { "int", "fd" }, { "struct epoll_event *", "event" } } },
{ 5209, "epoll_wait", 4, { { "int", "epfd" }, { "struct epoll_event *", "events" }, { "int", "maxevents" }, { "int", "timeout" } } },
{ 5210, "remap_file_pages", 5, { { "unsigned long", "start" }, { "unsigned long", "size" }, { "unsigned long", "prot" }, { "unsigned long", "pgoff" }, { "unsigned long", "flags" } } },
{ 5212, "set_tid_address", 1, { { "int *", "tidptr" } } },
{ 5213, "restart_syscall", 0, {} },
{ 5214, "semtimedop", 4, { { "int", "semid" }, { "struct sembuf *", "tsops" }, { "unsigned int", "nsops" }, { "const struct __kernel_timespec *", "timeout" } } },
{ 5215, "fadvise64", 4, { { "int", "fd" }, { "loff_t", "offset" }, { "loff_t", "len" }, { "int", "advice" } } },
{ 5216, "timer_create", 3, { { "const clockid_t", "which_clock" }, { "struct sigevent *", "timer_event_spec" }, { "timer_t *", "created_timer_id" } } },
{ 5217, "timer_settime", 4, { { "timer_t", "timer_id" }, { "int", "flags" }, { "const struct __kernel_itimerspec *", "new_setting" }, { "struct __kernel_itimerspec *", "old_setting" } } },
{ 5218, "timer_gettime", 2, { { "timer_t", "timer_id" }, { "struct __kernel_itimerspec *", "setting" } } },
{ 5219, "timer_getoverrun", 1, { { "timer_t", "timer_id" } } },
{ 5220, "timer_delete", 1, { { "timer_t", "timer_id" } } },
{ 5221, "clock_settime", 2, { { "const clockid_t", "which_clock" }, { "const struct __kernel_timespec *", "tp" } } },
{ 5222, "clock_gettime", 2, { { "const clockid_t", "which_clock" }, { "struct __kernel_timespec *", "tp" } } },
{ 5223, "clock_getres", 2, { { "const clockid_t", "which_clock" }, { "struct __kernel_timespec *", "tp" } } },
{ 5224, "clock_nanosleep", 4, { { "const clockid_t", "which_clock" }, { "int", "flags" }, { "const struct __kernel_timespec *", "rqtp" }, { "struct __kernel_timespec *", "rmtp" } } },
{ 5225, "tgkill", 3, { { "pid_t", "tgid" }, { "pid_t", "pid" }, { "int", "sig" } } },
{ 5226, "utimes", 2, { { "char *", "filename" }, { "struct __kernel_old_timeval *", "utimes" } } },
{ 5227, "mbind", 6, { { "unsigned long", "start" }, { "unsigned long", "len" }, { "unsigned long", "mode" }, { "const unsigned long *", "nmask" }, { "unsigned long", "maxnode" }, { "unsigned int", "flags" } } },
{ 5228, "get_mempolicy", 5, { { "int *", "policy" }, { "unsigned long *", "nmask" }, { "unsigned long", "maxnode" }, { "unsigned long", "addr" }, { "unsigned long", "flags" } } },
{ 5229, "set_mempolicy", 3, { { "int", "mode" }, { "const unsigned long *", "nmask" }, { "unsigned long", "maxnode" } } },
{ 5230, "mq_open", 4, { { "const char *", "u_name" }, { "int", "oflag" }, { "umode_t", "mode" }, { "struct mq_attr *", "u_attr" } } },
{ 5231, "mq_unlink", 1, { { "const char *", "u_name" } } },
{ 5232, "mq_timedsend", 5, { { "mqd_t", "mqdes" }, { "const char *", "u_msg_ptr" }, { "size_t", "msg_len" }, { "unsigned int", "msg_prio" }, { "const struct __kernel_timespec *", "u_abs_timeout" } } },
{ 5233, "mq_timedreceive", 5, { { "mqd_t", "mqdes" }, { "char *", "u_msg_ptr" }, { "size_t", "msg_len" }, { "unsigned int *", "u_msg_prio" }, { "const struct __kernel_timespec *", "u_abs_timeout" } } },
{ 5234, "mq_notify", 2, { { "mqd_t", "mqdes" }, { "const struct sigevent *", "u_notification" } } },
{ 5235, "mq_getsetattr", 3, { { "mqd_t", "mqdes" }, { "const struct mq_attr *", "u_mqstat" }, { "struct mq_attr *", "u_omqstat" } } },
{ 5236, "vserver", 0, {} },
{ 5237, "waitid", 5, { { "int", "which" }, { "pid_t", "upid" }, { "struct siginfo *", "infop" }, { "int", "options" }, { "struct rusage *", "ru" } } },
{ 5239, "add_key", 5, { { "const char *", "_type" }, { "const char *", "_description" }, { "const void *", "_payload" }, { "size_t", "plen" }, { "key_serial_t", "ringid" } } },
{ 5240, "request_key", 4, { { "const char *", "_type" }, { "const char *", "_description" }, { "const char *", "_callout_info" }, { "key_serial_t", "destringid" } } },
{ 5241, "keyctl", 5, { { "int", "option" }, { "unsigned long", "arg2" }, { "unsigned long", "arg3" }, { "unsigned long", "arg4" }, { "unsigned long", "arg5" } } },
{ 5242, "set_thread_area", 1, { { "unsigned long", "addr" } } },
{ 5243, "inotify_init", 0, {} },
{ 5244, "inotify_add_watch", 3, { { "int", "fd" }, { "const char *", "pathname" }, { "u32", "mask" } } },
{ 5245, "inotify_rm_watch", 2, { { "int", "fd" }, { "__s32", "wd" } } },
{ 5246, "migrate_pages", 4, { { "pid_t", "pid" }, { "unsigned long", "maxnode" }, { "const unsigned long *", "old_nodes" }, { "const unsigned long *", "new_nodes" } } },
{ 5247, "openat", 4, { { "int", "dfd" }, { "const char *", "filename" }, { "int", "flags" }, { "umode_t", "mode" } } },
{ 5248, "mkdirat", 3, { { "int", "dfd" }, { "const char *", "pathname" }, { "umode_t", "mode" } } },
{ 5249, "mknodat", 4, { { "int", "dfd" }, { "const char *", "filename" }, { "umode_t", "mode" }, { "unsigned int", "dev" } } },
{ 5250, "fchownat", 5, { { "int", "dfd" }, { "const char *", "filename" }, { "uid_t", "user" }, { "gid_t", "group" }, { "int", "flag" } } },
{ 5251, "futimesat", 3, { { "int", "dfd" }, { "const char *", "filename" }, { "struct __kernel_old_timeval *", "utimes" } } },
{ 5252, "newfstatat", 4, { { "int", "dfd" }, { "const char *", "filename" }, { "struct stat *", "statbuf" }, { "int", "flag" } } },
{ 5253, "unlinkat", 3, { { "int", "dfd" }, { "const char *", "pathname" }, { "int", "flag" } } },
{ 5254, "renameat", 4, { { "int", "olddfd" }, { "const char *", "oldname" }, { "int", "newdfd" }, { "const char *", "newname" } } },
{ 5255, "linkat", 5, { { "int", "olddfd" }, { "const char *", "oldname" }, { "int", "newdfd" }, { "const char *", "newname" }, { "int", "flags" } } },
{ 5256, "symlinkat", 3, { { "const char *", "oldname" }, { "int", "newdfd" }, { "const char *", "newname" } } },
{ 5257, "readlinkat", 4, { { "int", "dfd" }, { "const char *", "pathname" }, { "char *", "buf" }, { "int", "bufsiz" } } },
{ 5258, "fchmodat", 3, { { "int", "dfd" }, { "const char *", "filename" }, { "umode_t", "mode" } } },
{ 5259, "faccessat", 3, { { "int", "dfd" }, { "const char *", "filename" }, { "int", "mode" } } },
{ 5260, "pselect6", 6, { { "int", "n" }, { "fd_set *", "inp" }, { "fd_set *", "outp" }, { "fd_set *", "exp" }, { "struct __kernel_timespec *", "tsp" }, { "void *", "sig" } } },
{ 5261, "ppoll", 5, { { "struct pollfd *", "ufds" }, { "unsigned int", "nfds" }, { "struct __kernel_timespec *", "tsp" }, { "const sigset_t *", "sigmask" }, { "size_t", "sigsetsize" } } },
{ 5262, "unshare", 1, { { "unsigned long", "unshare_flags" } } },
{ 5263, "splice", 6, { { "int", "fd_in" }, { "loff_t *", "off_in" }, { "int", "fd_out" }, { "loff_t *", "off_out" }, { "size_t", "len" }, { "unsigned int", "flags" } } },
{ 5264, "sync_file_range", 4, { { "int", "fd" }, { "loff_t", "offset" }, { "loff_t", "nbytes" }, { "unsigned int", "flags" } } },
{ 5265, "tee", 4, { { "int", "fdin" }, { "int", "fdout" }, { "size_t", "len" }, { "unsigned int", "flags" } } },
{ 5266, "vmsplice", 4, { { "int", "fd" }, { "const struct iovec *", "uiov" }, { "unsigned long", "nr_segs" }, { "unsigned int", "flags" } } },
{ 5267, "move_pages", 6, { { "pid_t", "pid" }, { "unsigned long", "nr_pages" }, { "const void * *", "pages" }, { "const int *", "nodes" }, { "int *", "status" }, { "int", "flags" } } },
{ 5268, "set_robust_list", 2, { { "struct robust_list_head *", "head" }, { "size_t", "len" } } },
{ 5269, "get_robust_list", 3, { { "int", "pid" }, { "struct robust_list_head * *", "head_ptr" }, { "size_t *", "len_ptr" } } },
{ 5270, "kexec_load", 4, { { "unsigned long", "entry" }, { "unsigned long", "nr_segments" }, { "struct kexec_segment *", "segments" }, { "unsigned long", "flags" } } },
{ 5271, "getcpu", 3, { { "unsigned *", "cpup" }, { "unsigned *", "nodep" }, { "struct getcpu_cache *", "unused" } } },
{ 5272, "epoll_pwait", 6, { { "int", "epfd" }, { "struct epoll_event *", "events" }, { "int", "maxevents" }, { "int", "timeout" }, { "const sigset_t *", "sigmask" }, { "size_t", "sigsetsize" } } },
{ 5273, "ioprio_set", 3, { { "int", "which" }, { "int", "who" }, { "int", "ioprio" } } },
{ 5274, "ioprio_get", 2, { { "int", "which" }, { "int", "who" } } },
{ 5275, "utimensat", 4, { { "int", "dfd" }, { "const char *", "filename" }, { "struct __kernel_timespec *", "utimes" }, { "int", "flags" } } },
{ 5276, "signalfd", 3, { { "int", "ufd" }, { "sigset_t *", "user_mask" }, { "size_t", "sizemask" } } },
{ 5277, "timerfd", 0, {} },
{ 5278, "eventfd", 1, { { "unsigned int", "count" } } },
{ 5279, "fallocate", 4, { { "int", "fd" }, { "int", "mode" }, { "loff_t", "offset" }, { "loff_t", "len" } } },
{ 5280, "timerfd_create", 2, { { "int", "clockid" }, { "int", "flags" } } },
{ 5281, "timerfd_gettime", 2, { { "int", "ufd" }, { "struct __kernel_itimerspec *", "otmr" } } },
{ 5282, "timerfd_settime", 4, { { "int", "ufd" }, { "int", "flags" }, { "const struct __kernel_itimerspec *", "utmr" }, { "struct __kernel_itimerspec *", "otmr" } } },
{ 5283, "signalfd4", 4, { { "int", "ufd" }, { "sigset_t *", "user_mask" }, { "size_t", "sizemask" }, { "int", "flags" } } },
{ 5284, "eventfd2", 2, { { "unsigned int", "count" }, { "int", "flags" } } },
{ 5285, "epoll_create1", 1, { { "int", "flags" } } },
{ 5286, "dup3", 3, { { "unsigned int", "oldfd" }, { "unsigned int", "newfd" }, { "int", "flags" } } },
{ 5287, "pipe2", 2, { { "int *", "fildes" }, { "int", "flags" } } },
{ 5288, "inotify_init1", 1, { { "int", "flags" } } },
{ 5289, "preadv", 5, { { "unsigned long", "fd" }, { "const struct iovec *", "vec" }, { "unsigned long", "vlen" }, { "unsigned long", "pos_l" }, { "unsigned long", "pos_h" } } },
{ 5290, "pwritev", 5, { { "unsigned long", "fd" }, { "const struct iovec *", "vec" }, { "unsigned long", "vlen" }, { "unsigned long", "pos_l" }, { "unsigned long", "pos_h" } } },
{ 5291, "rt_tgsigqueueinfo", 4, { { "pid_t", "tgid" }, { "pid_t", "pid" }, { "int", "sig" }, { "siginfo_t *", "uinfo" } } },
{ 5292, "perf_event_open", 5, { { "struct perf_event_attr *", "attr_uptr" }, { "pid_t", "pid" }, { "int", "cpu" }, { "int", "group_fd" }, { "unsigned long", "flags" } } },
{ 5293, "accept4", 4, { { "int", "fd" }, { "struct sockaddr *", "upeer_sockaddr" }, { "int *", "upeer_addrlen" }, { "int", "flags" } } },
{ 5294, "recvmmsg", 5, { { "int", "fd" }, { "struct mmsghdr *", "mmsg" }, { "unsigned int", "vlen" }, { "unsigned int", "flags" }, { "struct __kernel_timespec *", "timeout" } } },
{ 5295, "fanotify_init", 2, { { "unsigned int", "flags" }, { "unsigned int", "event_f_flags" } } },
{ 5296, "fanotify_mark", 5, { { "int", "fanotify_fd" }, { "unsigned int", "flags" }, { "__u64", "mask" }, { "int", "dfd" }, { "const char *", "pathname" } } },
{ 5297, "prlimit64", 4, { { "pid_t", "pid" }, { "unsigned int", "resource" }, { "const struct rlimit64 *", "new_rlim" }, { "struct rlimit64 *", "old_rlim" } } },
{ 5298, "name_to_handle_at", 5, { { "int", "dfd" }, { "const char *", "name" }, { "struct file_handle *", "handle" }, { "void *", "mnt_id" }, { "int", "flag" } } },
{ 5299, "open_by_handle_at", 3, { { "int", "mountdirfd" }, { "struct file_handle *", "handle" }, { "int", "flags" } } },
{ 5300, "clock_adjtime", 2, { { "const clockid_t", "which_clock" }, { "struct __kernel_timex *", "utx" } } },
{ 5301, "syncfs", 1, { { "int", "fd" } } },
{ 5302, "sendmmsg", 4, { { "int", "fd" }, { "struct mmsghdr *", "mmsg" }, { "unsigned int", "vlen" }, { "unsigned int", "flags" } } },
{ 5303, "setns", 2, { { "int", "fd" }, { "int", "flags" } } },
{ 5304, "process_vm_readv", 6, { { "pid_t", "pid" }, { "const struct iovec *", "lvec" }, { "unsigned long", "liovcnt" }, { "const struct iovec *", "rvec" }, { "unsigned long", "riovcnt" }, { "unsigned long", "flags" } } },
{ 5305, "process_vm_writev", 6, { { "pid_t", "pid" }, { "const struct iovec *", "lvec" }, { "unsigned long", "liovcnt" }, { "const struct iovec *", "rvec" }, { "unsigned long", "riovcnt" }, { "unsigned long", "flags" } } },
{ 5306, "kcmp", 5, { { "pid_t", "pid1" }, { "pid_t", "pid2" }, { "int", "type" }, { "unsigned long", "idx1" }, { "unsigned long", "idx2" } } },
{ 5307, "finit_module", 3, { { "int", "fd" }, { "const char *", "uargs" }, { "int", "flags" } } },
{ 5308, "getdents64", 3, { { "unsigned int", "fd" }, { "struct linux_dirent64 *", "dirent" }, { "unsigned int", "count" } } },
{ 5309, "sched_setattr", 3, { { "pid_t", "pid" }, { "struct sched_attr *", "uattr" }, { "unsigned int", "flags" } } },
{ 5310, "sched_getattr", 4, { { "pid_t", "pid" }, { "struct sched_attr *", "uattr" }, { "unsigned int", "usize" }, { "unsigned int", "flags" } } },
{ 5311, "renameat2", 5, { { "int", "olddfd" }, { "const char *", "oldname" }, { "int", "newdfd" }, { "const char *", "newname" }, { "unsigned int", "flags" } } },
{ 5312, "seccomp", 3, { { "unsigned int", "op" }, { "unsigned int", "flags" }, { "void *", "uargs" } } },
{ 5313, "getrandom", 3, { { "char *", "ubuf" }, { "size_t", "len" }, { "unsigned int", "flags" } } },
{ 5314, "memfd_create", 2, { { "const char *", "uname" }, { "unsigned int", "flags" } } },
{ 5315, "bpf", 3, { { "int", "cmd" }, { "union bpf_attr *", "uattr" }, { "unsigned int", "size" } } },
{ 5316, "execveat", 5, { { "int", "fd" }, { "const char *", "filename" }, { "const char *const *", "argv" }, { "const char *const *", "envp" }, { "int", "flags" } } },
{ 5317, "userfaultfd", 1, { { "int", "flags" } } },
{ 5318, "membarrier", 3, { { "int", "cmd" }, { "unsigned int", "flags" }, { "int", "cpu_id" } } },
{ 5319, "mlock2", 3, { { "unsigned long", "start" }, { "size_t", "len" }, { "int", "flags" } } },
{ 5320, "copy_file_range", 6, { { "int", "fd_in" }, { "loff_t *", "off_in" }, { "int", "fd_out" }, { "loff_t *", "off_out" }, { "size_t", "len" }, { "unsigned int", "flags" } } },
{ 5321, "preadv2", 6, { { "unsigned long", "fd" }, { "const struct iovec *", "vec" }, { "unsigned long", "vlen" }, { "unsigned long", "pos_l" }, { "unsigned long", "pos_h" }, { "rwf_t", "flags" } } },
{ 5322, "pwritev2", 6, { { "unsigned long", "fd" }, { "const struct iovec *", "vec" }, { "unsigned long", "vlen" }, { "unsigned long", "pos_l" }, { "unsigned long", "pos_h" }, { "rwf_t", "flags" } } },
{ 5323, "pkey_mprotect", 4, { { "unsigned long", "start" }, { "size_t", "len" }, { "unsigned long", "prot" }, { "int", "pkey" } } },
{ 5324, "pkey_alloc", 2, { { "unsigned long", "flags" }, { "unsigned long", "init_val" } } },
{ 5325, "pkey_free", 1, { { "int", "pkey" } } },
{ 5326, "statx", 5, { { "int", "dfd" }, { "const char *", "filename" }, { "unsigned", "flags" }, { "unsigned int", "mask" }, { "struct statx *", "buffer" } } },
{ 5327, "rseq", 4, { { "struct rseq *", "rseq" }, { "u32", "rseq_len" }, { "int", "flags" }, { "u32", "sig" } } },
{ 5328, "io_pgetevents", 6, { { "aio_context_t", "ctx_id" }, { "long", "min_nr" }, { "long", "nr" }, { "struct io_event *", "events" }, { "struct __kernel_timespec *", "timeout" }, { "const struct __aio_sigset *", "usig" } } },
{ 5424, "pidfd_send_signal", 4, { { "int", "pidfd" }, { "int", "sig" }, { "siginfo_t *", "info" }, { "unsigned int", "flags" } } },
{ 5425, "io_uring_setup", 2, { { "u32", "entries" }, { "struct io_uring_params *", "params" } } },
{ 5426, "io_uring_enter", 6, { { "unsigned int", "fd" }, { "u32", "to_submit" }, { "u32", "min_complete" }, { "u32", "flags" }, { "const void *", "argp" }, { "size_t", "argsz" } } },
{ 5427, "io_uring_register", 4, { { "unsigned int", "fd" }, { "unsigned int", "opcode" }, { "void *", "arg" }, { "unsigned int", "nr_args" } } },
{ 5428, "open_tree", 3, { { "int", "dfd" }, { "const char *", "filename" }, { "unsigned", "flags" } } },
{ 5429, "move_mount", 5, { { "int", "from_dfd" }, { "const char *", "from_pathname" }, { "int", "to_dfd" }, { "const char *", "to_pathname" }, { "unsigned int", "flags" } } },
{ 5430, "fsopen", 2, { { "const char *", "_fs_name" }, { "unsigned int", "flags" } } },
{ 5431, "fsconfig", 5, { { "int", "fd" }, { "unsigned int", "cmd" }, { "const char *", "_key" }, { "const void *", "_value" }, { "int", "aux" } } },
{ 5432, "fsmount", 3, { { "int", "fs_fd" }, { "unsigned int", "flags" }, { "unsigned int", "attr_flags" } } },
{ 5433, "fspick", 3, { { "int", "dfd" }, { "const char *", "path" }, { "unsigned int", "flags" } } },
{ 5434, "pidfd_open", 2, { { "pid_t", "pid" }, { "unsigned int", "flags" } } },
{ 5435, "clone3", 2, { { "struct clone_args *", "uargs" }, { "size_t", "size" } } },
{ 5436, "close_range", 3, { { "unsigned int", "fd" }, { "unsigned int", "max_fd" }, { "unsigned int", "flags" } } },
{ 5437, "openat2", 4, { { "int", "dfd" }, { "const char *", "filename" }, { "struct open_how *", "how" }, { "size_t", "usize" } } },
{ 5438, "pidfd_getfd", 3, { { "int", "pidfd" }, { "int", "fd" }, { "unsigned int", "flags" } } },
{ 5439, "faccessat2", 4, { { "int", "dfd" }, { "const char *", "filename" }, { "int", "mode" }, { "int", "flags" } } },
{ 5440, "process_madvise", 5, { { "int", "pidfd" }, { "const struct iovec *", "vec" }, { "size_t", "vlen" }, { "int", "behavior" }, { "unsigned int", "flags" } } },
{ 5441, "epoll_pwait2", 6, { { "int", "epfd" }, { "struct epoll_event *", "events" }, { "int", "maxevents" }, { "const struct __kernel_timespec *", "timeout" }, { "const sigset_t *", "sigmask" }, { "size_t", "sigsetsize" } } },
{ 5442, "mount_setattr", 5, { { "int", "dfd" }, { "const char *", "path" }, { "unsigned int", "flags" }, { "struct mount_attr *", "uattr" }, { "size_t", "usize" } } },
{ 5443, "quotactl_fd", 4, { { "unsigned int", "fd" }, { "unsigned int", "cmd" }, { "qid_t", "id" }, { "void *", "addr" } } },
{ 5444, "landlock_create_ruleset", 3, { { "const struct landlock_ruleset_attr *const", "attr" }, { "const size_t", "size" }, { "const __u32", "flags" } } },
{ 5445, "landlock_add_rule", 4, { { "const int", "ruleset_fd" }, { "const enum landlock_rule_type", "rule_type" }, { "const void *const", "rule_attr" }, { "const __u32", "flags" } } },
{ 5446, "landlock_restrict_self", 2, { { "const int", "ruleset_fd" }, { "const __u32", "flags" } } },
{ 5448, "process_mrelease", 2, { { "int", "pidfd" }, { "unsigned int", "flags" } } },
{ 5449, "futex_waitv", 5, { { "struct futex_waitv *", "waiters" }, { "unsigned int", "nr_futexes" }, { "unsigned int", "flags" }, { "struct __kernel_timespec *", "timeout" }, { "clockid_t", "clockid" } } },
{ 5450, "set_mempolicy_home_node", 4, { { "unsigned long", "start" }, { "unsigned long", "len" }, { "unsigned long", "home_node" }, { "unsigned long", "flags" } } },
{ 5451, "cachestat", 4, { { "unsigned int", "fd" }, { "struct cachestat_range *", "cstat_range" }, { "struct cachestat *", "cstat" }, { "unsigned int", "flags" } } },
{ 5452, "fchmodat2", 4, { { "int", "dfd" }, { "const char *", "filename" }, { "umode_t", "mode" }, { "unsigned int", "flags" } } },
{ 5453, "map_shadow_stack", 3, { { "unsigned long", "addr" }, { "unsigned long", "size" }, { "unsigned int", "flags" } } },
{ 5454, "futex_wake", 4, { { "void *", "uaddr" }, { "unsigned long", "mask" }, { "int", "nr" }, { "unsigned int", "flags" } } },
{ 5455, "futex_wait", 6, { { "void *", "uaddr" }, { "unsigned long", "val" }, { "unsigned long", "mask" }, { "unsigned int", "flags" }, { "struct __kernel_timespec *", "timeout" }, { "clockid_t", "clockid" } } },
{ 5456, "futex_requeue", 4, { { "struct futex_waitv *", "waiters" }, { "unsigned int", "flags" }, { "int", "nr_wake" }, { "int", "nr_requeue" } } },
{ 5457, "statmount", 4, { { "const struct mnt_id_req *", "req" }, { "struct statmount *", "buf" }, { "size_t", "bufsize" }, { "unsigned int", "flags" } } },
{ 5458, "listmount", 4, { { "const struct mnt_id_req *", "req" }, { "u64 *", "mnt_ids" }, { "size_t", "nr_mnt_ids" }, { "unsigned int", "flags" } } },
{ 5459, "lsm_get_self_attr", 4, { { "unsigned int", "attr" }, { "struct lsm_ctx *", "ctx" }, { "u32 *", "size" }, { "u32", "flags" } } },
{ 5460, "lsm_set_self_attr", 4, { { "unsigned int", "attr" }, { "struct lsm_ctx *", "ctx" }, { "u32", "size" }, { "u32", "flags" } } },
{ 5461, "lsm_list_modules", 3, { { "u64 *", "ids" }, { "u32 *", "size" }, { "u32", "flags" } } },
{ 5462, "mseal", 3, { { "unsigned long", "start" }, { "size_t", "len" }, { "unsigned long", "flags" } } },
{ 5463, "setxattrat", 6, { { "int", "dfd" }, { "const char *", "pathname" }, { "unsigned int", "at_flags" }, { "const char *", "name" }, { "const struct xattr_args *", "uargs" }, { "size_t", "usize" } } },
{ 5464, "getxattrat", 6, { { "int", "dfd" }, { "const char *", "pathname" }, { "unsigned int", "at_flags" }, { "const char *", "name" }, { "struct xattr_args *", "uargs" }, { "size_t", "usize" } } },
{ 5465, "listxattrat", 5, { { "int", "dfd" }, { "const char *", "pathname" }, { "unsigned int", "at_flags" }, { "char *", "list" }, { "size_t", "size" } } },
{ 5466, "removexattrat", 4, { { "int", "dfd" }, { "const char *", "pathname" }, { "unsigned int", "at_flags" }, { "const char *", "name" } } },
{ 5467, "open_tree_attr", 5, { { "int", "dfd" }, { "const char *", "filename" }, { "unsigned", "flags" }, { "struct mount_attr *", "uattr" }, { "size_t", "usize" } } },
{ 5468, "file_getattr", 5, { { "int", "dfd" }, { "const char *", "filename" }, { "struct file_attr *", "ufattr" }, { "size_t", "usize" }, { "unsigned int", "at_flags" } } },
{ 5469, "file_setattr", 5, { { "int", "dfd" }, { "const char *", "filename" }, { "struct file_attr *", "ufattr" }, { "size_t", "usize" }, { "unsigned int", "at_flags" } } },
{ 5470, "listns", 4, { { "const struct ns_id_req *", "req" }, { "u64 *", "ns_ids" }, { "size_t", "nr_ns_ids" }, { "unsigned int", "flags" } } },
};
FridaLinuxSyscallSignature *
frida_get_syscall_signatures (int * len)
{
if (len != NULL)
*len = G_N_ELEMENTS (frida_syscall_signatures);
return (FridaLinuxSyscallSignature *) frida_syscall_signatures;
}
FridaLinuxSyscallSignature *
frida_get_compat32_syscall_signatures (int * len)
{
if (len != NULL)
*len = 0;
return NULL;
}
+379
View File
@@ -0,0 +1,379 @@
// AUTO-GENERATED FILE. DO NOT EDIT.
namespace Frida {
public enum LinuxSyscall {
READ = 5000,
WRITE = 5001,
OPEN = 5002,
CLOSE = 5003,
STAT = 5004,
FSTAT = 5005,
LSTAT = 5006,
POLL = 5007,
LSEEK = 5008,
MMAP = 5009,
MPROTECT = 5010,
MUNMAP = 5011,
BRK = 5012,
RT_SIGACTION = 5013,
RT_SIGPROCMASK = 5014,
IOCTL = 5015,
PREAD64 = 5016,
PWRITE64 = 5017,
READV = 5018,
WRITEV = 5019,
ACCESS = 5020,
PIPE = 5021,
_NEWSELECT = 5022,
SCHED_YIELD = 5023,
MREMAP = 5024,
MSYNC = 5025,
MINCORE = 5026,
MADVISE = 5027,
SHMGET = 5028,
SHMAT = 5029,
SHMCTL = 5030,
DUP = 5031,
DUP2 = 5032,
PAUSE = 5033,
NANOSLEEP = 5034,
GETITIMER = 5035,
SETITIMER = 5036,
ALARM = 5037,
GETPID = 5038,
SENDFILE = 5039,
SOCKET = 5040,
CONNECT = 5041,
ACCEPT = 5042,
SENDTO = 5043,
RECVFROM = 5044,
SENDMSG = 5045,
RECVMSG = 5046,
SHUTDOWN = 5047,
BIND = 5048,
LISTEN = 5049,
GETSOCKNAME = 5050,
GETPEERNAME = 5051,
SOCKETPAIR = 5052,
SETSOCKOPT = 5053,
GETSOCKOPT = 5054,
CLONE = 5055,
FORK = 5056,
EXECVE = 5057,
EXIT = 5058,
WAIT4 = 5059,
KILL = 5060,
UNAME = 5061,
SEMGET = 5062,
SEMOP = 5063,
SEMCTL = 5064,
SHMDT = 5065,
MSGGET = 5066,
MSGSND = 5067,
MSGRCV = 5068,
MSGCTL = 5069,
FCNTL = 5070,
FLOCK = 5071,
FSYNC = 5072,
FDATASYNC = 5073,
TRUNCATE = 5074,
FTRUNCATE = 5075,
GETDENTS = 5076,
GETCWD = 5077,
CHDIR = 5078,
FCHDIR = 5079,
RENAME = 5080,
MKDIR = 5081,
RMDIR = 5082,
CREAT = 5083,
LINK = 5084,
UNLINK = 5085,
SYMLINK = 5086,
READLINK = 5087,
CHMOD = 5088,
FCHMOD = 5089,
CHOWN = 5090,
FCHOWN = 5091,
LCHOWN = 5092,
UMASK = 5093,
GETTIMEOFDAY = 5094,
GETRLIMIT = 5095,
GETRUSAGE = 5096,
SYSINFO = 5097,
TIMES = 5098,
PTRACE = 5099,
GETUID = 5100,
SYSLOG = 5101,
GETGID = 5102,
SETUID = 5103,
SETGID = 5104,
GETEUID = 5105,
GETEGID = 5106,
SETPGID = 5107,
GETPPID = 5108,
GETPGRP = 5109,
SETSID = 5110,
SETREUID = 5111,
SETREGID = 5112,
GETGROUPS = 5113,
SETGROUPS = 5114,
SETRESUID = 5115,
GETRESUID = 5116,
SETRESGID = 5117,
GETRESGID = 5118,
GETPGID = 5119,
SETFSUID = 5120,
SETFSGID = 5121,
GETSID = 5122,
CAPGET = 5123,
CAPSET = 5124,
RT_SIGPENDING = 5125,
RT_SIGTIMEDWAIT = 5126,
RT_SIGQUEUEINFO = 5127,
RT_SIGSUSPEND = 5128,
SIGALTSTACK = 5129,
UTIME = 5130,
MKNOD = 5131,
PERSONALITY = 5132,
USTAT = 5133,
STATFS = 5134,
FSTATFS = 5135,
SYSFS = 5136,
GETPRIORITY = 5137,
SETPRIORITY = 5138,
SCHED_SETPARAM = 5139,
SCHED_GETPARAM = 5140,
SCHED_SETSCHEDULER = 5141,
SCHED_GETSCHEDULER = 5142,
SCHED_GET_PRIORITY_MAX = 5143,
SCHED_GET_PRIORITY_MIN = 5144,
SCHED_RR_GET_INTERVAL = 5145,
MLOCK = 5146,
MUNLOCK = 5147,
MLOCKALL = 5148,
MUNLOCKALL = 5149,
VHANGUP = 5150,
PIVOT_ROOT = 5151,
_SYSCTL = 5152,
PRCTL = 5153,
ADJTIMEX = 5154,
SETRLIMIT = 5155,
CHROOT = 5156,
SYNC = 5157,
ACCT = 5158,
SETTIMEOFDAY = 5159,
MOUNT = 5160,
UMOUNT2 = 5161,
SWAPON = 5162,
SWAPOFF = 5163,
REBOOT = 5164,
SETHOSTNAME = 5165,
SETDOMAINNAME = 5166,
CREATE_MODULE = 5167,
INIT_MODULE = 5168,
DELETE_MODULE = 5169,
GET_KERNEL_SYMS = 5170,
QUERY_MODULE = 5171,
QUOTACTL = 5172,
NFSSERVCTL = 5173,
GETPMSG = 5174,
PUTPMSG = 5175,
AFS_SYSCALL = 5176,
RESERVED177 = 5177,
GETTID = 5178,
READAHEAD = 5179,
SETXATTR = 5180,
LSETXATTR = 5181,
FSETXATTR = 5182,
GETXATTR = 5183,
LGETXATTR = 5184,
FGETXATTR = 5185,
LISTXATTR = 5186,
LLISTXATTR = 5187,
FLISTXATTR = 5188,
REMOVEXATTR = 5189,
LREMOVEXATTR = 5190,
FREMOVEXATTR = 5191,
TKILL = 5192,
RESERVED193 = 5193,
FUTEX = 5194,
SCHED_SETAFFINITY = 5195,
SCHED_GETAFFINITY = 5196,
CACHEFLUSH = 5197,
CACHECTL = 5198,
SYSMIPS = 5199,
IO_SETUP = 5200,
IO_DESTROY = 5201,
IO_GETEVENTS = 5202,
IO_SUBMIT = 5203,
IO_CANCEL = 5204,
EXIT_GROUP = 5205,
LOOKUP_DCOOKIE = 5206,
EPOLL_CREATE = 5207,
EPOLL_CTL = 5208,
EPOLL_WAIT = 5209,
REMAP_FILE_PAGES = 5210,
SET_TID_ADDRESS = 5212,
RESTART_SYSCALL = 5213,
SEMTIMEDOP = 5214,
FADVISE64 = 5215,
TIMER_CREATE = 5216,
TIMER_SETTIME = 5217,
TIMER_GETTIME = 5218,
TIMER_GETOVERRUN = 5219,
TIMER_DELETE = 5220,
CLOCK_SETTIME = 5221,
CLOCK_GETTIME = 5222,
CLOCK_GETRES = 5223,
CLOCK_NANOSLEEP = 5224,
TGKILL = 5225,
UTIMES = 5226,
MBIND = 5227,
GET_MEMPOLICY = 5228,
SET_MEMPOLICY = 5229,
MQ_OPEN = 5230,
MQ_UNLINK = 5231,
MQ_TIMEDSEND = 5232,
MQ_TIMEDRECEIVE = 5233,
MQ_NOTIFY = 5234,
MQ_GETSETATTR = 5235,
VSERVER = 5236,
WAITID = 5237,
ADD_KEY = 5239,
REQUEST_KEY = 5240,
KEYCTL = 5241,
SET_THREAD_AREA = 5242,
INOTIFY_INIT = 5243,
INOTIFY_ADD_WATCH = 5244,
INOTIFY_RM_WATCH = 5245,
MIGRATE_PAGES = 5246,
OPENAT = 5247,
MKDIRAT = 5248,
MKNODAT = 5249,
FCHOWNAT = 5250,
FUTIMESAT = 5251,
NEWFSTATAT = 5252,
UNLINKAT = 5253,
RENAMEAT = 5254,
LINKAT = 5255,
SYMLINKAT = 5256,
READLINKAT = 5257,
FCHMODAT = 5258,
FACCESSAT = 5259,
PSELECT6 = 5260,
PPOLL = 5261,
UNSHARE = 5262,
SPLICE = 5263,
SYNC_FILE_RANGE = 5264,
TEE = 5265,
VMSPLICE = 5266,
MOVE_PAGES = 5267,
SET_ROBUST_LIST = 5268,
GET_ROBUST_LIST = 5269,
KEXEC_LOAD = 5270,
GETCPU = 5271,
EPOLL_PWAIT = 5272,
IOPRIO_SET = 5273,
IOPRIO_GET = 5274,
UTIMENSAT = 5275,
SIGNALFD = 5276,
TIMERFD = 5277,
EVENTFD = 5278,
FALLOCATE = 5279,
TIMERFD_CREATE = 5280,
TIMERFD_GETTIME = 5281,
TIMERFD_SETTIME = 5282,
SIGNALFD4 = 5283,
EVENTFD2 = 5284,
EPOLL_CREATE1 = 5285,
DUP3 = 5286,
PIPE2 = 5287,
INOTIFY_INIT1 = 5288,
PREADV = 5289,
PWRITEV = 5290,
RT_TGSIGQUEUEINFO = 5291,
PERF_EVENT_OPEN = 5292,
ACCEPT4 = 5293,
RECVMMSG = 5294,
FANOTIFY_INIT = 5295,
FANOTIFY_MARK = 5296,
PRLIMIT64 = 5297,
NAME_TO_HANDLE_AT = 5298,
OPEN_BY_HANDLE_AT = 5299,
CLOCK_ADJTIME = 5300,
SYNCFS = 5301,
SENDMMSG = 5302,
SETNS = 5303,
PROCESS_VM_READV = 5304,
PROCESS_VM_WRITEV = 5305,
KCMP = 5306,
FINIT_MODULE = 5307,
GETDENTS64 = 5308,
SCHED_SETATTR = 5309,
SCHED_GETATTR = 5310,
RENAMEAT2 = 5311,
SECCOMP = 5312,
GETRANDOM = 5313,
MEMFD_CREATE = 5314,
BPF = 5315,
EXECVEAT = 5316,
USERFAULTFD = 5317,
MEMBARRIER = 5318,
MLOCK2 = 5319,
COPY_FILE_RANGE = 5320,
PREADV2 = 5321,
PWRITEV2 = 5322,
PKEY_MPROTECT = 5323,
PKEY_ALLOC = 5324,
PKEY_FREE = 5325,
STATX = 5326,
RSEQ = 5327,
IO_PGETEVENTS = 5328,
PIDFD_SEND_SIGNAL = 5424,
IO_URING_SETUP = 5425,
IO_URING_ENTER = 5426,
IO_URING_REGISTER = 5427,
OPEN_TREE = 5428,
MOVE_MOUNT = 5429,
FSOPEN = 5430,
FSCONFIG = 5431,
FSMOUNT = 5432,
FSPICK = 5433,
PIDFD_OPEN = 5434,
CLONE3 = 5435,
CLOSE_RANGE = 5436,
OPENAT2 = 5437,
PIDFD_GETFD = 5438,
FACCESSAT2 = 5439,
PROCESS_MADVISE = 5440,
EPOLL_PWAIT2 = 5441,
MOUNT_SETATTR = 5442,
QUOTACTL_FD = 5443,
LANDLOCK_CREATE_RULESET = 5444,
LANDLOCK_ADD_RULE = 5445,
LANDLOCK_RESTRICT_SELF = 5446,
PROCESS_MRELEASE = 5448,
FUTEX_WAITV = 5449,
SET_MEMPOLICY_HOME_NODE = 5450,
CACHESTAT = 5451,
FCHMODAT2 = 5452,
MAP_SHADOW_STACK = 5453,
FUTEX_WAKE = 5454,
FUTEX_WAIT = 5455,
FUTEX_REQUEUE = 5456,
STATMOUNT = 5457,
LISTMOUNT = 5458,
LSM_GET_SELF_ATTR = 5459,
LSM_SET_SELF_ATTR = 5460,
LSM_LIST_MODULES = 5461,
MSEAL = 5462,
SETXATTRAT = 5463,
GETXATTRAT = 5464,
LISTXATTRAT = 5465,
REMOVEXATTRAT = 5466,
OPEN_TREE_ATTR = 5467,
FILE_GETATTR = 5468,
FILE_SETATTR = 5469,
LISTNS = 5470,
}
}
+410
View File
@@ -0,0 +1,410 @@
/* AUTO-GENERATED FILE. DO NOT EDIT. */
#include "frida-base.h"
static const FridaLinuxSyscallSignature frida_syscall_signatures[] =
{
{ 1, "exit", 1, { { "int", "error_code" } } },
{ 2, "fork", 0, {} },
{ 3, "read", 3, { { "unsigned int", "fd" }, { "char *", "buf" }, { "size_t", "count" } } },
{ 4, "write", 3, { { "unsigned int", "fd" }, { "const char *", "buf" }, { "size_t", "count" } } },
{ 5, "open", 3, { { "const char *", "filename" }, { "int", "flags" }, { "umode_t", "mode" } } },
{ 6, "close", 1, { { "unsigned int", "fd" } } },
{ 7, "restart_syscall", 0, {} },
{ 8, "creat", 2, { { "const char *", "pathname" }, { "umode_t", "mode" } } },
{ 9, "link", 2, { { "const char *", "oldname" }, { "const char *", "newname" } } },
{ 10, "unlink", 1, { { "const char *", "pathname" } } },
{ 11, "execve", 3, { { "const char *", "filename" }, { "const char *const *", "argv" }, { "const char *const *", "envp" } } },
{ 12, "chdir", 1, { { "const char *", "filename" } } },
{ 14, "mknod", 3, { { "const char *", "filename" }, { "umode_t", "mode" }, { "unsigned", "dev" } } },
{ 15, "chmod", 2, { { "const char *", "filename" }, { "umode_t", "mode" } } },
{ 19, "lseek", 3, { { "unsigned int", "fd" }, { "off_t", "offset" }, { "unsigned int", "whence" } } },
{ 20, "getpid", 0, {} },
{ 21, "mount", 5, { { "char *", "dev_name" }, { "char *", "dir_name" }, { "char *", "type" }, { "unsigned long", "flags" }, { "void *", "data" } } },
{ 22, "umount", 2, { { "char *", "name" }, { "int", "flags" } } },
{ 26, "ptrace", 4, { { "long", "request" }, { "long", "pid" }, { "unsigned long", "addr" }, { "unsigned long", "data" } } },
{ 27, "alarm", 1, { { "unsigned int", "seconds" } } },
{ 29, "pause", 0, {} },
{ 30, "utime", 2, { { "char *", "filename" }, { "struct utimbuf *", "times" } } },
{ 33, "access", 2, { { "const char *", "filename" }, { "int", "mode" } } },
{ 34, "nice", 1, { { "int", "increment" } } },
{ 36, "sync", 0, {} },
{ 37, "kill", 2, { { "pid_t", "pid" }, { "int", "sig" } } },
{ 38, "rename", 2, { { "const char *", "oldname" }, { "const char *", "newname" } } },
{ 39, "mkdir", 2, { { "const char *", "pathname" }, { "umode_t", "mode" } } },
{ 40, "rmdir", 1, { { "const char *", "pathname" } } },
{ 41, "dup", 1, { { "unsigned int", "fildes" } } },
{ 42, "pipe", 1, { { "int *", "fildes" } } },
{ 43, "times", 1, { { "struct tms *", "tbuf" } } },
{ 45, "brk", 1, { { "unsigned long", "brk" } } },
{ 48, "signal", 2, { { "int", "sig" }, { "__sighandler_t", "handler" } } },
{ 51, "acct", 1, { { "const char *", "name" } } },
{ 52, "umount2", 2, { { "char *", "name" }, { "int", "flags" } } },
{ 54, "ioctl", 3, { { "unsigned int", "fd" }, { "unsigned int", "cmd" }, { "unsigned long", "arg" } } },
{ 55, "fcntl", 3, { { "unsigned int", "fd" }, { "unsigned int", "cmd" }, { "unsigned long", "arg" } } },
{ 57, "setpgid", 2, { { "pid_t", "pid" }, { "pid_t", "pgid" } } },
{ 60, "umask", 1, { { "int", "mask" } } },
{ 61, "chroot", 1, { { "const char *", "filename" } } },
{ 62, "ustat", 2, { { "unsigned", "dev" }, { "struct ustat *", "ubuf" } } },
{ 63, "dup2", 2, { { "unsigned int", "oldfd" }, { "unsigned int", "newfd" } } },
{ 64, "getppid", 0, {} },
{ 65, "getpgrp", 0, {} },
{ 66, "setsid", 0, {} },
{ 73, "sigpending", 1, { { "old_sigset_t *", "uset" } } },
{ 74, "sethostname", 2, { { "char *", "name" }, { "int", "len" } } },
{ 75, "setrlimit", 2, { { "unsigned int", "resource" }, { "struct rlimit *", "rlim" } } },
{ 77, "getrusage", 2, { { "int", "who" }, { "struct rusage *", "ru" } } },
{ 78, "gettimeofday", 2, { { "struct __kernel_old_timeval *", "tv" }, { "struct timezone *", "tz" } } },
{ 79, "settimeofday", 2, { { "struct __kernel_old_timeval *", "tv" }, { "struct timezone *", "tz" } } },
{ 83, "symlink", 2, { { "const char *", "oldname" }, { "const char *", "newname" } } },
{ 85, "readlink", 3, { { "const char *", "path" }, { "char *", "buf" }, { "int", "bufsiz" } } },
{ 86, "uselib", 1, { { "const char *", "library" } } },
{ 87, "swapon", 2, { { "const char *", "specialfile" }, { "int", "swap_flags" } } },
{ 88, "reboot", 4, { { "int", "magic1" }, { "int", "magic2" }, { "unsigned int", "cmd" }, { "void *", "arg" } } },
{ 89, "readdir", 0, {} },
{ 90, "mmap", 1, { { "struct mmap_arg_struct *", "arg" } } },
{ 91, "munmap", 2, { { "unsigned long", "addr" }, { "size_t", "len" } } },
{ 92, "truncate", 2, { { "const char *", "path" }, { "long", "length" } } },
{ 93, "ftruncate", 2, { { "unsigned int", "fd" }, { "off_t", "length" } } },
{ 94, "fchmod", 2, { { "unsigned int", "fd" }, { "umode_t", "mode" } } },
{ 96, "getpriority", 2, { { "int", "which" }, { "int", "who" } } },
{ 97, "setpriority", 3, { { "int", "which" }, { "int", "who" }, { "int", "niceval" } } },
{ 99, "statfs", 2, { { "const char *", "pathname" }, { "struct statfs *", "buf" } } },
{ 100, "fstatfs", 2, { { "unsigned int", "fd" }, { "struct statfs *", "buf" } } },
{ 102, "socketcall", 2, { { "int", "call" }, { "unsigned long *", "args" } } },
{ 103, "syslog", 3, { { "int", "type" }, { "char *", "buf" }, { "int", "len" } } },
{ 104, "setitimer", 3, { { "int", "which" }, { "struct __kernel_old_itimerval *", "value" }, { "struct __kernel_old_itimerval *", "ovalue" } } },
{ 105, "getitimer", 2, { { "int", "which" }, { "struct __kernel_old_itimerval *", "value" } } },
{ 106, "stat", 2, { { "const char *", "filename" }, { "struct stat *", "statbuf" } } },
{ 107, "lstat", 2, { { "const char *", "filename" }, { "struct stat *", "statbuf" } } },
{ 108, "fstat", 2, { { "unsigned int", "fd" }, { "struct stat *", "statbuf" } } },
{ 110, "lookup_dcookie", 0, {} },
{ 111, "vhangup", 0, {} },
{ 112, "idle", 0, {} },
{ 114, "wait4", 4, { { "pid_t", "upid" }, { "int *", "stat_addr" }, { "int", "options" }, { "struct rusage *", "ru" } } },
{ 115, "swapoff", 1, { { "const char *", "specialfile" } } },
{ 116, "sysinfo", 1, { { "struct sysinfo *", "info" } } },
{ 117, "ipc", 6, { { "unsigned int", "call" }, { "int", "first" }, { "unsigned long", "second" }, { "unsigned long", "third" }, { "void *", "ptr" }, { "long", "fifth" } } },
{ 118, "fsync", 1, { { "unsigned int", "fd" } } },
{ 119, "sigreturn", 0, {} },
{ 120, "clone", 5, { { "unsigned long", "clone_flags" }, { "unsigned long", "newsp" }, { "int *", "parent_tidptr" }, { "int *", "child_tidptr" }, { "unsigned long", "tls" } } },
{ 121, "setdomainname", 2, { { "char *", "name" }, { "int", "len" } } },
{ 122, "uname", 1, { { "struct new_utsname *", "name" } } },
{ 124, "adjtimex", 1, { { "struct __kernel_timex *", "txc_p" } } },
{ 125, "mprotect", 3, { { "unsigned long", "start" }, { "size_t", "len" }, { "unsigned long", "prot" } } },
{ 126, "sigprocmask", 3, { { "int", "how" }, { "old_sigset_t *", "nset" }, { "old_sigset_t *", "oset" } } },
{ 127, "create_module", 0, {} },
{ 128, "init_module", 3, { { "void *", "umod" }, { "unsigned long", "len" }, { "const char *", "uargs" } } },
{ 129, "delete_module", 2, { { "const char *", "name_user" }, { "unsigned int", "flags" } } },
{ 130, "get_kernel_syms", 0, {} },
{ 131, "quotactl", 4, { { "unsigned int", "cmd" }, { "const char *", "special" }, { "qid_t", "id" }, { "void *", "addr" } } },
{ 132, "getpgid", 1, { { "pid_t", "pid" } } },
{ 133, "fchdir", 1, { { "unsigned int", "fd" } } },
{ 134, "bdflush", 0, {} },
{ 135, "sysfs", 3, { { "int", "option" }, { "unsigned long", "arg1" }, { "unsigned long", "arg2" } } },
{ 136, "personality", 1, { { "unsigned int", "personality" } } },
{ 137, "afs_syscall", 0, {} },
{ 141, "getdents", 3, { { "unsigned int", "fd" }, { "struct linux_dirent *", "dirent" }, { "unsigned int", "count" } } },
{ 142, "select", 5, { { "int", "n" }, { "fd_set *", "inp" }, { "fd_set *", "outp" }, { "fd_set *", "exp" }, { "struct __kernel_old_timeval *", "tvp" } } },
{ 143, "flock", 2, { { "unsigned int", "fd" }, { "unsigned int", "cmd" } } },
{ 144, "msync", 3, { { "unsigned long", "start" }, { "size_t", "len" }, { "int", "flags" } } },
{ 145, "readv", 3, { { "unsigned long", "fd" }, { "const struct iovec *", "vec" }, { "unsigned long", "vlen" } } },
{ 146, "writev", 3, { { "unsigned long", "fd" }, { "const struct iovec *", "vec" }, { "unsigned long", "vlen" } } },
{ 147, "getsid", 1, { { "pid_t", "pid" } } },
{ 148, "fdatasync", 1, { { "unsigned int", "fd" } } },
{ 149, "_sysctl", 0, {} },
{ 150, "mlock", 2, { { "unsigned long", "start" }, { "size_t", "len" } } },
{ 151, "munlock", 2, { { "unsigned long", "start" }, { "size_t", "len" } } },
{ 152, "mlockall", 1, { { "int", "flags" } } },
{ 153, "munlockall", 0, {} },
{ 154, "sched_setparam", 2, { { "pid_t", "pid" }, { "struct sched_param *", "param" } } },
{ 155, "sched_getparam", 2, { { "pid_t", "pid" }, { "struct sched_param *", "param" } } },
{ 156, "sched_setscheduler", 3, { { "pid_t", "pid" }, { "int", "policy" }, { "struct sched_param *", "param" } } },
{ 157, "sched_getscheduler", 1, { { "pid_t", "pid" } } },
{ 158, "sched_yield", 0, {} },
{ 159, "sched_get_priority_max", 1, { { "int", "policy" } } },
{ 160, "sched_get_priority_min", 1, { { "int", "policy" } } },
{ 161, "sched_rr_get_interval", 2, { { "pid_t", "pid" }, { "struct __kernel_timespec *", "interval" } } },
{ 162, "nanosleep", 2, { { "struct __kernel_timespec *", "rqtp" }, { "struct __kernel_timespec *", "rmtp" } } },
{ 163, "mremap", 5, { { "unsigned long", "addr" }, { "unsigned long", "old_len" }, { "unsigned long", "new_len" }, { "unsigned long", "flags" }, { "unsigned long", "new_addr" } } },
{ 167, "query_module", 0, {} },
{ 168, "poll", 3, { { "struct pollfd *", "ufds" }, { "unsigned int", "nfds" }, { "int", "timeout_msecs" } } },
{ 169, "nfsservctl", 0, {} },
{ 172, "prctl", 5, { { "int", "option" }, { "unsigned long", "arg2" }, { "unsigned long", "arg3" }, { "unsigned long", "arg4" }, { "unsigned long", "arg5" } } },
{ 173, "rt_sigreturn", 0, {} },
{ 174, "rt_sigaction", 4, { { "int", "sig" }, { "const struct sigaction *", "act" }, { "struct sigaction *", "oact" }, { "size_t", "sigsetsize" } } },
{ 175, "rt_sigprocmask", 4, { { "int", "how" }, { "sigset_t *", "nset" }, { "sigset_t *", "oset" }, { "size_t", "sigsetsize" } } },
{ 176, "rt_sigpending", 2, { { "sigset_t *", "uset" }, { "size_t", "sigsetsize" } } },
{ 177, "rt_sigtimedwait", 4, { { "const sigset_t *", "uthese" }, { "siginfo_t *", "uinfo" }, { "const struct __kernel_timespec *", "uts" }, { "size_t", "sigsetsize" } } },
{ 178, "rt_sigqueueinfo", 3, { { "pid_t", "pid" }, { "int", "sig" }, { "siginfo_t *", "uinfo" } } },
{ 179, "rt_sigsuspend", 2, { { "sigset_t *", "unewset" }, { "size_t", "sigsetsize" } } },
{ 180, "pread64", 4, { { "unsigned int", "fd" }, { "char *", "buf" }, { "size_t", "count" }, { "loff_t", "pos" } } },
{ 181, "pwrite64", 4, { { "unsigned int", "fd" }, { "const char *", "buf" }, { "size_t", "count" }, { "loff_t", "pos" } } },
{ 183, "getcwd", 2, { { "char *", "buf" }, { "unsigned long", "size" } } },
{ 184, "capget", 2, { { "cap_user_header_t", "header" }, { "cap_user_data_t", "dataptr" } } },
{ 185, "capset", 2, { { "cap_user_header_t", "header" }, { "const cap_user_data_t", "data" } } },
{ 186, "sigaltstack", 2, { { "const stack_t *", "uss" }, { "stack_t *", "uoss" } } },
{ 187, "sendfile", 4, { { "int", "out_fd" }, { "int", "in_fd" }, { "off_t *", "offset" }, { "size_t", "count" } } },
{ 188, "getpmsg", 0, {} },
{ 189, "putpmsg", 0, {} },
{ 190, "vfork", 0, {} },
{ 191, "getrlimit", 2, { { "unsigned int", "resource" }, { "struct rlimit *", "rlim" } } },
{ 198, "lchown", 3, { { "const char *", "filename" }, { "uid_t", "user" }, { "gid_t", "group" } } },
{ 199, "getuid", 0, {} },
{ 200, "getgid", 0, {} },
{ 201, "geteuid", 0, {} },
{ 202, "getegid", 0, {} },
{ 203, "setreuid", 2, { { "uid_t", "ruid" }, { "uid_t", "euid" } } },
{ 204, "setregid", 2, { { "gid_t", "rgid" }, { "gid_t", "egid" } } },
{ 205, "getgroups", 2, { { "int", "gidsetsize" }, { "gid_t *", "grouplist" } } },
{ 206, "setgroups", 2, { { "int", "gidsetsize" }, { "gid_t *", "grouplist" } } },
{ 207, "fchown", 3, { { "unsigned int", "fd" }, { "uid_t", "user" }, { "gid_t", "group" } } },
{ 208, "setresuid", 3, { { "uid_t", "ruid" }, { "uid_t", "euid" }, { "uid_t", "suid" } } },
{ 209, "getresuid", 3, { { "uid_t *", "ruidp" }, { "uid_t *", "euidp" }, { "uid_t *", "suidp" } } },
{ 210, "setresgid", 3, { { "gid_t", "rgid" }, { "gid_t", "egid" }, { "gid_t", "sgid" } } },
{ 211, "getresgid", 3, { { "gid_t *", "rgidp" }, { "gid_t *", "egidp" }, { "gid_t *", "sgidp" } } },
{ 212, "chown", 3, { { "const char *", "filename" }, { "uid_t", "user" }, { "gid_t", "group" } } },
{ 213, "setuid", 1, { { "uid_t", "uid" } } },
{ 214, "setgid", 1, { { "gid_t", "gid" } } },
{ 215, "setfsuid", 1, { { "uid_t", "uid" } } },
{ 216, "setfsgid", 1, { { "gid_t", "gid" } } },
{ 217, "pivot_root", 2, { { "const char *", "new_root" }, { "const char *", "put_old" } } },
{ 218, "mincore", 3, { { "unsigned long", "start" }, { "size_t", "len" }, { "unsigned char *", "vec" } } },
{ 219, "madvise", 3, { { "unsigned long", "start" }, { "size_t", "len_in" }, { "int", "behavior" } } },
{ 220, "getdents64", 3, { { "unsigned int", "fd" }, { "struct linux_dirent64 *", "dirent" }, { "unsigned int", "count" } } },
{ 222, "readahead", 3, { { "int", "fd" }, { "loff_t", "offset" }, { "size_t", "count" } } },
{ 224, "setxattr", 5, { { "const char *", "pathname" }, { "const char *", "name" }, { "const void *", "value" }, { "size_t", "size" }, { "int", "flags" } } },
{ 225, "lsetxattr", 5, { { "const char *", "pathname" }, { "const char *", "name" }, { "const void *", "value" }, { "size_t", "size" }, { "int", "flags" } } },
{ 226, "fsetxattr", 5, { { "int", "fd" }, { "const char *", "name" }, { "const void *", "value" }, { "size_t", "size" }, { "int", "flags" } } },
{ 227, "getxattr", 4, { { "const char *", "pathname" }, { "const char *", "name" }, { "void *", "value" }, { "size_t", "size" } } },
{ 228, "lgetxattr", 4, { { "const char *", "pathname" }, { "const char *", "name" }, { "void *", "value" }, { "size_t", "size" } } },
{ 229, "fgetxattr", 4, { { "int", "fd" }, { "const char *", "name" }, { "void *", "value" }, { "size_t", "size" } } },
{ 230, "listxattr", 3, { { "const char *", "pathname" }, { "char *", "list" }, { "size_t", "size" } } },
{ 231, "llistxattr", 3, { { "const char *", "pathname" }, { "char *", "list" }, { "size_t", "size" } } },
{ 232, "flistxattr", 3, { { "int", "fd" }, { "char *", "list" }, { "size_t", "size" } } },
{ 233, "removexattr", 2, { { "const char *", "pathname" }, { "const char *", "name" } } },
{ 234, "lremovexattr", 2, { { "const char *", "pathname" }, { "const char *", "name" } } },
{ 235, "fremovexattr", 2, { { "int", "fd" }, { "const char *", "name" } } },
{ 236, "gettid", 0, {} },
{ 237, "tkill", 2, { { "pid_t", "pid" }, { "int", "sig" } } },
{ 238, "futex", 6, { { "u32 *", "uaddr" }, { "int", "op" }, { "u32", "val" }, { "const struct __kernel_timespec *", "utime" }, { "u32 *", "uaddr2" }, { "u32", "val3" } } },
{ 239, "sched_setaffinity", 3, { { "pid_t", "pid" }, { "unsigned int", "len" }, { "unsigned long *", "user_mask_ptr" } } },
{ 240, "sched_getaffinity", 3, { { "pid_t", "pid" }, { "unsigned int", "len" }, { "unsigned long *", "user_mask_ptr" } } },
{ 241, "tgkill", 3, { { "pid_t", "tgid" }, { "pid_t", "pid" }, { "int", "sig" } } },
{ 243, "io_setup", 2, { { "unsigned", "nr_events" }, { "aio_context_t *", "ctxp" } } },
{ 244, "io_destroy", 1, { { "aio_context_t", "ctx" } } },
{ 245, "io_getevents", 5, { { "aio_context_t", "ctx_id" }, { "long", "min_nr" }, { "long", "nr" }, { "struct io_event *", "events" }, { "struct __kernel_timespec *", "timeout" } } },
{ 246, "io_submit", 3, { { "aio_context_t", "ctx_id" }, { "long", "nr" }, { "struct iocb * *", "iocbpp" } } },
{ 247, "io_cancel", 3, { { "aio_context_t", "ctx_id" }, { "struct iocb *", "iocb" }, { "struct io_event *", "result" } } },
{ 248, "exit_group", 1, { { "int", "error_code" } } },
{ 249, "epoll_create", 1, { { "int", "size" } } },
{ 250, "epoll_ctl", 4, { { "int", "epfd" }, { "int", "op" }, { "int", "fd" }, { "struct epoll_event *", "event" } } },
{ 251, "epoll_wait", 4, { { "int", "epfd" }, { "struct epoll_event *", "events" }, { "int", "maxevents" }, { "int", "timeout" } } },
{ 252, "set_tid_address", 1, { { "int *", "tidptr" } } },
{ 253, "fadvise64", 4, { { "int", "fd" }, { "loff_t", "offset" }, { "loff_t", "len" }, { "int", "advice" } } },
{ 254, "timer_create", 3, { { "const clockid_t", "which_clock" }, { "struct sigevent *", "timer_event_spec" }, { "timer_t *", "created_timer_id" } } },
{ 255, "timer_settime", 4, { { "timer_t", "timer_id" }, { "int", "flags" }, { "const struct __kernel_itimerspec *", "new_setting" }, { "struct __kernel_itimerspec *", "old_setting" } } },
{ 256, "timer_gettime", 2, { { "timer_t", "timer_id" }, { "struct __kernel_itimerspec *", "setting" } } },
{ 257, "timer_getoverrun", 1, { { "timer_t", "timer_id" } } },
{ 258, "timer_delete", 1, { { "timer_t", "timer_id" } } },
{ 259, "clock_settime", 2, { { "const clockid_t", "which_clock" }, { "const struct __kernel_timespec *", "tp" } } },
{ 260, "clock_gettime", 2, { { "const clockid_t", "which_clock" }, { "struct __kernel_timespec *", "tp" } } },
{ 261, "clock_getres", 2, { { "const clockid_t", "which_clock" }, { "struct __kernel_timespec *", "tp" } } },
{ 262, "clock_nanosleep", 4, { { "const clockid_t", "which_clock" }, { "int", "flags" }, { "const struct __kernel_timespec *", "rqtp" }, { "struct __kernel_timespec *", "rmtp" } } },
{ 265, "statfs64", 3, { { "const char *", "pathname" }, { "size_t", "sz" }, { "struct statfs64 *", "buf" } } },
{ 266, "fstatfs64", 3, { { "unsigned int", "fd" }, { "size_t", "sz" }, { "struct statfs64 *", "buf" } } },
{ 267, "remap_file_pages", 5, { { "unsigned long", "start" }, { "unsigned long", "size" }, { "unsigned long", "prot" }, { "unsigned long", "pgoff" }, { "unsigned long", "flags" } } },
{ 268, "mbind", 6, { { "unsigned long", "start" }, { "unsigned long", "len" }, { "unsigned long", "mode" }, { "const unsigned long *", "nmask" }, { "unsigned long", "maxnode" }, { "unsigned int", "flags" } } },
{ 269, "get_mempolicy", 5, { { "int *", "policy" }, { "unsigned long *", "nmask" }, { "unsigned long", "maxnode" }, { "unsigned long", "addr" }, { "unsigned long", "flags" } } },
{ 270, "set_mempolicy", 3, { { "int", "mode" }, { "const unsigned long *", "nmask" }, { "unsigned long", "maxnode" } } },
{ 271, "mq_open", 4, { { "const char *", "u_name" }, { "int", "oflag" }, { "umode_t", "mode" }, { "struct mq_attr *", "u_attr" } } },
{ 272, "mq_unlink", 1, { { "const char *", "u_name" } } },
{ 273, "mq_timedsend", 5, { { "mqd_t", "mqdes" }, { "const char *", "u_msg_ptr" }, { "size_t", "msg_len" }, { "unsigned int", "msg_prio" }, { "const struct __kernel_timespec *", "u_abs_timeout" } } },
{ 274, "mq_timedreceive", 5, { { "mqd_t", "mqdes" }, { "char *", "u_msg_ptr" }, { "size_t", "msg_len" }, { "unsigned int *", "u_msg_prio" }, { "const struct __kernel_timespec *", "u_abs_timeout" } } },
{ 275, "mq_notify", 2, { { "mqd_t", "mqdes" }, { "const struct sigevent *", "u_notification" } } },
{ 276, "mq_getsetattr", 3, { { "mqd_t", "mqdes" }, { "const struct mq_attr *", "u_mqstat" }, { "struct mq_attr *", "u_omqstat" } } },
{ 277, "kexec_load", 4, { { "unsigned long", "entry" }, { "unsigned long", "nr_segments" }, { "struct kexec_segment *", "segments" }, { "unsigned long", "flags" } } },
{ 278, "add_key", 5, { { "const char *", "_type" }, { "const char *", "_description" }, { "const void *", "_payload" }, { "size_t", "plen" }, { "key_serial_t", "ringid" } } },
{ 279, "request_key", 4, { { "const char *", "_type" }, { "const char *", "_description" }, { "const char *", "_callout_info" }, { "key_serial_t", "destringid" } } },
{ 280, "keyctl", 5, { { "int", "option" }, { "unsigned long", "arg2" }, { "unsigned long", "arg3" }, { "unsigned long", "arg4" }, { "unsigned long", "arg5" } } },
{ 281, "waitid", 5, { { "int", "which" }, { "pid_t", "upid" }, { "struct siginfo *", "infop" }, { "int", "options" }, { "struct rusage *", "ru" } } },
{ 282, "ioprio_set", 3, { { "int", "which" }, { "int", "who" }, { "int", "ioprio" } } },
{ 283, "ioprio_get", 2, { { "int", "which" }, { "int", "who" } } },
{ 284, "inotify_init", 0, {} },
{ 285, "inotify_add_watch", 3, { { "int", "fd" }, { "const char *", "pathname" }, { "u32", "mask" } } },
{ 286, "inotify_rm_watch", 2, { { "int", "fd" }, { "__s32", "wd" } } },
{ 287, "migrate_pages", 4, { { "pid_t", "pid" }, { "unsigned long", "maxnode" }, { "const unsigned long *", "old_nodes" }, { "const unsigned long *", "new_nodes" } } },
{ 288, "openat", 4, { { "int", "dfd" }, { "const char *", "filename" }, { "int", "flags" }, { "umode_t", "mode" } } },
{ 289, "mkdirat", 3, { { "int", "dfd" }, { "const char *", "pathname" }, { "umode_t", "mode" } } },
{ 290, "mknodat", 4, { { "int", "dfd" }, { "const char *", "filename" }, { "umode_t", "mode" }, { "unsigned int", "dev" } } },
{ 291, "fchownat", 5, { { "int", "dfd" }, { "const char *", "filename" }, { "uid_t", "user" }, { "gid_t", "group" }, { "int", "flag" } } },
{ 292, "futimesat", 3, { { "int", "dfd" }, { "const char *", "filename" }, { "struct __kernel_old_timeval *", "utimes" } } },
{ 293, "newfstatat", 4, { { "int", "dfd" }, { "const char *", "filename" }, { "struct stat *", "statbuf" }, { "int", "flag" } } },
{ 294, "unlinkat", 3, { { "int", "dfd" }, { "const char *", "pathname" }, { "int", "flag" } } },
{ 295, "renameat", 4, { { "int", "olddfd" }, { "const char *", "oldname" }, { "int", "newdfd" }, { "const char *", "newname" } } },
{ 296, "linkat", 5, { { "int", "olddfd" }, { "const char *", "oldname" }, { "int", "newdfd" }, { "const char *", "newname" }, { "int", "flags" } } },
{ 297, "symlinkat", 3, { { "const char *", "oldname" }, { "int", "newdfd" }, { "const char *", "newname" } } },
{ 298, "readlinkat", 4, { { "int", "dfd" }, { "const char *", "pathname" }, { "char *", "buf" }, { "int", "bufsiz" } } },
{ 299, "fchmodat", 3, { { "int", "dfd" }, { "const char *", "filename" }, { "umode_t", "mode" } } },
{ 300, "faccessat", 3, { { "int", "dfd" }, { "const char *", "filename" }, { "int", "mode" } } },
{ 301, "pselect6", 6, { { "int", "n" }, { "fd_set *", "inp" }, { "fd_set *", "outp" }, { "fd_set *", "exp" }, { "struct __kernel_timespec *", "tsp" }, { "void *", "sig" } } },
{ 302, "ppoll", 5, { { "struct pollfd *", "ufds" }, { "unsigned int", "nfds" }, { "struct __kernel_timespec *", "tsp" }, { "const sigset_t *", "sigmask" }, { "size_t", "sigsetsize" } } },
{ 303, "unshare", 1, { { "unsigned long", "unshare_flags" } } },
{ 304, "set_robust_list", 2, { { "struct robust_list_head *", "head" }, { "size_t", "len" } } },
{ 305, "get_robust_list", 3, { { "int", "pid" }, { "struct robust_list_head * *", "head_ptr" }, { "size_t *", "len_ptr" } } },
{ 306, "splice", 6, { { "int", "fd_in" }, { "loff_t *", "off_in" }, { "int", "fd_out" }, { "loff_t *", "off_out" }, { "size_t", "len" }, { "unsigned int", "flags" } } },
{ 307, "sync_file_range", 4, { { "int", "fd" }, { "loff_t", "offset" }, { "loff_t", "nbytes" }, { "unsigned int", "flags" } } },
{ 308, "tee", 4, { { "int", "fdin" }, { "int", "fdout" }, { "size_t", "len" }, { "unsigned int", "flags" } } },
{ 309, "vmsplice", 4, { { "int", "fd" }, { "const struct iovec *", "uiov" }, { "unsigned long", "nr_segs" }, { "unsigned int", "flags" } } },
{ 310, "move_pages", 6, { { "pid_t", "pid" }, { "unsigned long", "nr_pages" }, { "const void * *", "pages" }, { "const int *", "nodes" }, { "int *", "status" }, { "int", "flags" } } },
{ 311, "getcpu", 3, { { "unsigned *", "cpup" }, { "unsigned *", "nodep" }, { "struct getcpu_cache *", "unused" } } },
{ 312, "epoll_pwait", 6, { { "int", "epfd" }, { "struct epoll_event *", "events" }, { "int", "maxevents" }, { "int", "timeout" }, { "const sigset_t *", "sigmask" }, { "size_t", "sigsetsize" } } },
{ 313, "utimes", 2, { { "char *", "filename" }, { "struct __kernel_old_timeval *", "utimes" } } },
{ 314, "fallocate", 4, { { "int", "fd" }, { "int", "mode" }, { "loff_t", "offset" }, { "loff_t", "len" } } },
{ 315, "utimensat", 4, { { "int", "dfd" }, { "const char *", "filename" }, { "struct __kernel_timespec *", "utimes" }, { "int", "flags" } } },
{ 316, "signalfd", 3, { { "int", "ufd" }, { "sigset_t *", "user_mask" }, { "size_t", "sizemask" } } },
{ 317, "timerfd", 0, {} },
{ 318, "eventfd", 1, { { "unsigned int", "count" } } },
{ 319, "timerfd_create", 2, { { "int", "clockid" }, { "int", "flags" } } },
{ 320, "timerfd_settime", 4, { { "int", "ufd" }, { "int", "flags" }, { "const struct __kernel_itimerspec *", "utmr" }, { "struct __kernel_itimerspec *", "otmr" } } },
{ 321, "timerfd_gettime", 2, { { "int", "ufd" }, { "struct __kernel_itimerspec *", "otmr" } } },
{ 322, "signalfd4", 4, { { "int", "ufd" }, { "sigset_t *", "user_mask" }, { "size_t", "sizemask" }, { "int", "flags" } } },
{ 323, "eventfd2", 2, { { "unsigned int", "count" }, { "int", "flags" } } },
{ 324, "inotify_init1", 1, { { "int", "flags" } } },
{ 325, "pipe2", 2, { { "int *", "fildes" }, { "int", "flags" } } },
{ 326, "dup3", 3, { { "unsigned int", "oldfd" }, { "unsigned int", "newfd" }, { "int", "flags" } } },
{ 327, "epoll_create1", 1, { { "int", "flags" } } },
{ 328, "preadv", 5, { { "unsigned long", "fd" }, { "const struct iovec *", "vec" }, { "unsigned long", "vlen" }, { "unsigned long", "pos_l" }, { "unsigned long", "pos_h" } } },
{ 329, "pwritev", 5, { { "unsigned long", "fd" }, { "const struct iovec *", "vec" }, { "unsigned long", "vlen" }, { "unsigned long", "pos_l" }, { "unsigned long", "pos_h" } } },
{ 330, "rt_tgsigqueueinfo", 4, { { "pid_t", "tgid" }, { "pid_t", "pid" }, { "int", "sig" }, { "siginfo_t *", "uinfo" } } },
{ 331, "perf_event_open", 5, { { "struct perf_event_attr *", "attr_uptr" }, { "pid_t", "pid" }, { "int", "cpu" }, { "int", "group_fd" }, { "unsigned long", "flags" } } },
{ 332, "fanotify_init", 2, { { "unsigned int", "flags" }, { "unsigned int", "event_f_flags" } } },
{ 333, "fanotify_mark", 5, { { "int", "fanotify_fd" }, { "unsigned int", "flags" }, { "__u64", "mask" }, { "int", "dfd" }, { "const char *", "pathname" } } },
{ 334, "prlimit64", 4, { { "pid_t", "pid" }, { "unsigned int", "resource" }, { "const struct rlimit64 *", "new_rlim" }, { "struct rlimit64 *", "old_rlim" } } },
{ 335, "name_to_handle_at", 5, { { "int", "dfd" }, { "const char *", "name" }, { "struct file_handle *", "handle" }, { "void *", "mnt_id" }, { "int", "flag" } } },
{ 336, "open_by_handle_at", 3, { { "int", "mountdirfd" }, { "struct file_handle *", "handle" }, { "int", "flags" } } },
{ 337, "clock_adjtime", 2, { { "const clockid_t", "which_clock" }, { "struct __kernel_timex *", "utx" } } },
{ 338, "syncfs", 1, { { "int", "fd" } } },
{ 339, "setns", 2, { { "int", "fd" }, { "int", "flags" } } },
{ 340, "process_vm_readv", 6, { { "pid_t", "pid" }, { "const struct iovec *", "lvec" }, { "unsigned long", "liovcnt" }, { "const struct iovec *", "rvec" }, { "unsigned long", "riovcnt" }, { "unsigned long", "flags" } } },
{ 341, "process_vm_writev", 6, { { "pid_t", "pid" }, { "const struct iovec *", "lvec" }, { "unsigned long", "liovcnt" }, { "const struct iovec *", "rvec" }, { "unsigned long", "riovcnt" }, { "unsigned long", "flags" } } },
{ 342, "s390_runtime_instr", 2, { { "int", "command" }, { "int", "signum" } } },
{ 343, "kcmp", 5, { { "pid_t", "pid1" }, { "pid_t", "pid2" }, { "int", "type" }, { "unsigned long", "idx1" }, { "unsigned long", "idx2" } } },
{ 344, "finit_module", 3, { { "int", "fd" }, { "const char *", "uargs" }, { "int", "flags" } } },
{ 345, "sched_setattr", 3, { { "pid_t", "pid" }, { "struct sched_attr *", "uattr" }, { "unsigned int", "flags" } } },
{ 346, "sched_getattr", 4, { { "pid_t", "pid" }, { "struct sched_attr *", "uattr" }, { "unsigned int", "usize" }, { "unsigned int", "flags" } } },
{ 347, "renameat2", 5, { { "int", "olddfd" }, { "const char *", "oldname" }, { "int", "newdfd" }, { "const char *", "newname" }, { "unsigned int", "flags" } } },
{ 348, "seccomp", 3, { { "unsigned int", "op" }, { "unsigned int", "flags" }, { "void *", "uargs" } } },
{ 349, "getrandom", 3, { { "char *", "ubuf" }, { "size_t", "len" }, { "unsigned int", "flags" } } },
{ 350, "memfd_create", 2, { { "const char *", "uname" }, { "unsigned int", "flags" } } },
{ 351, "bpf", 3, { { "int", "cmd" }, { "union bpf_attr *", "uattr" }, { "unsigned int", "size" } } },
{ 352, "s390_pci_mmio_write", 3, { { "unsigned long", "mmio_addr" }, { "const void *", "user_buffer" }, { "size_t", "length" } } },
{ 353, "s390_pci_mmio_read", 3, { { "unsigned long", "mmio_addr" }, { "void *", "user_buffer" }, { "size_t", "length" } } },
{ 354, "execveat", 5, { { "int", "fd" }, { "const char *", "filename" }, { "const char *const *", "argv" }, { "const char *const *", "envp" }, { "int", "flags" } } },
{ 355, "userfaultfd", 1, { { "int", "flags" } } },
{ 356, "membarrier", 3, { { "int", "cmd" }, { "unsigned int", "flags" }, { "int", "cpu_id" } } },
{ 357, "recvmmsg", 5, { { "int", "fd" }, { "struct mmsghdr *", "mmsg" }, { "unsigned int", "vlen" }, { "unsigned int", "flags" }, { "struct __kernel_timespec *", "timeout" } } },
{ 358, "sendmmsg", 4, { { "int", "fd" }, { "struct mmsghdr *", "mmsg" }, { "unsigned int", "vlen" }, { "unsigned int", "flags" } } },
{ 359, "socket", 3, { { "int", "family" }, { "int", "type" }, { "int", "protocol" } } },
{ 360, "socketpair", 4, { { "int", "family" }, { "int", "type" }, { "int", "protocol" }, { "int *", "usockvec" } } },
{ 361, "bind", 3, { { "int", "fd" }, { "struct sockaddr *", "umyaddr" }, { "int", "addrlen" } } },
{ 362, "connect", 3, { { "int", "fd" }, { "struct sockaddr *", "uservaddr" }, { "int", "addrlen" } } },
{ 363, "listen", 2, { { "int", "fd" }, { "int", "backlog" } } },
{ 364, "accept4", 4, { { "int", "fd" }, { "struct sockaddr *", "upeer_sockaddr" }, { "int *", "upeer_addrlen" }, { "int", "flags" } } },
{ 365, "getsockopt", 5, { { "int", "fd" }, { "int", "level" }, { "int", "optname" }, { "char *", "optval" }, { "int *", "optlen" } } },
{ 366, "setsockopt", 5, { { "int", "fd" }, { "int", "level" }, { "int", "optname" }, { "char *", "optval" }, { "int", "optlen" } } },
{ 367, "getsockname", 3, { { "int", "fd" }, { "struct sockaddr *", "usockaddr" }, { "int *", "usockaddr_len" } } },
{ 368, "getpeername", 3, { { "int", "fd" }, { "struct sockaddr *", "usockaddr" }, { "int *", "usockaddr_len" } } },
{ 369, "sendto", 6, { { "int", "fd" }, { "void *", "buff" }, { "size_t", "len" }, { "unsigned int", "flags" }, { "struct sockaddr *", "addr" }, { "int", "addr_len" } } },
{ 370, "sendmsg", 3, { { "int", "fd" }, { "struct user_msghdr *", "msg" }, { "unsigned int", "flags" } } },
{ 371, "recvfrom", 6, { { "int", "fd" }, { "void *", "ubuf" }, { "size_t", "size" }, { "unsigned int", "flags" }, { "struct sockaddr *", "addr" }, { "int *", "addr_len" } } },
{ 372, "recvmsg", 3, { { "int", "fd" }, { "struct user_msghdr *", "msg" }, { "unsigned int", "flags" } } },
{ 373, "shutdown", 2, { { "int", "fd" }, { "int", "how" } } },
{ 374, "mlock2", 3, { { "unsigned long", "start" }, { "size_t", "len" }, { "int", "flags" } } },
{ 375, "copy_file_range", 6, { { "int", "fd_in" }, { "loff_t *", "off_in" }, { "int", "fd_out" }, { "loff_t *", "off_out" }, { "size_t", "len" }, { "unsigned int", "flags" } } },
{ 376, "preadv2", 6, { { "unsigned long", "fd" }, { "const struct iovec *", "vec" }, { "unsigned long", "vlen" }, { "unsigned long", "pos_l" }, { "unsigned long", "pos_h" }, { "rwf_t", "flags" } } },
{ 377, "pwritev2", 6, { { "unsigned long", "fd" }, { "const struct iovec *", "vec" }, { "unsigned long", "vlen" }, { "unsigned long", "pos_l" }, { "unsigned long", "pos_h" }, { "rwf_t", "flags" } } },
{ 378, "s390_guarded_storage", 2, { { "int", "command" }, { "struct gs_cb *", "gs_cb" } } },
{ 379, "statx", 5, { { "int", "dfd" }, { "const char *", "filename" }, { "unsigned", "flags" }, { "unsigned int", "mask" }, { "struct statx *", "buffer" } } },
{ 380, "s390_sthyi", 4, { { "unsigned long", "function_code" }, { "void *", "buffer" }, { "u64 *", "return_code" }, { "unsigned long", "flags" } } },
{ 381, "kexec_file_load", 5, { { "int", "kernel_fd" }, { "int", "initrd_fd" }, { "unsigned long", "cmdline_len" }, { "const char *", "cmdline_ptr" }, { "unsigned long", "flags" } } },
{ 382, "io_pgetevents", 6, { { "aio_context_t", "ctx_id" }, { "long", "min_nr" }, { "long", "nr" }, { "struct io_event *", "events" }, { "struct __kernel_timespec *", "timeout" }, { "const struct __aio_sigset *", "usig" } } },
{ 383, "rseq", 4, { { "struct rseq *", "rseq" }, { "u32", "rseq_len" }, { "int", "flags" }, { "u32", "sig" } } },
{ 384, "pkey_mprotect", 4, { { "unsigned long", "start" }, { "size_t", "len" }, { "unsigned long", "prot" }, { "int", "pkey" } } },
{ 385, "pkey_alloc", 2, { { "unsigned long", "flags" }, { "unsigned long", "init_val" } } },
{ 386, "pkey_free", 1, { { "int", "pkey" } } },
{ 392, "semtimedop", 4, { { "int", "semid" }, { "struct sembuf *", "tsops" }, { "unsigned int", "nsops" }, { "const struct __kernel_timespec *", "timeout" } } },
{ 393, "semget", 3, { { "key_t", "key" }, { "int", "nsems" }, { "int", "semflg" } } },
{ 394, "semctl", 4, { { "int", "semid" }, { "int", "semnum" }, { "int", "cmd" }, { "unsigned long", "arg" } } },
{ 395, "shmget", 3, { { "key_t", "key" }, { "size_t", "size" }, { "int", "shmflg" } } },
{ 396, "shmctl", 3, { { "int", "shmid" }, { "int", "cmd" }, { "struct shmid_ds *", "buf" } } },
{ 397, "shmat", 3, { { "int", "shmid" }, { "char *", "shmaddr" }, { "int", "shmflg" } } },
{ 398, "shmdt", 1, { { "char *", "shmaddr" } } },
{ 399, "msgget", 2, { { "key_t", "key" }, { "int", "msgflg" } } },
{ 400, "msgsnd", 4, { { "int", "msqid" }, { "struct msgbuf *", "msgp" }, { "size_t", "msgsz" }, { "int", "msgflg" } } },
{ 401, "msgrcv", 5, { { "int", "msqid" }, { "struct msgbuf *", "msgp" }, { "size_t", "msgsz" }, { "long", "msgtyp" }, { "int", "msgflg" } } },
{ 402, "msgctl", 3, { { "int", "msqid" }, { "int", "cmd" }, { "struct msqid_ds *", "buf" } } },
{ 424, "pidfd_send_signal", 4, { { "int", "pidfd" }, { "int", "sig" }, { "siginfo_t *", "info" }, { "unsigned int", "flags" } } },
{ 425, "io_uring_setup", 2, { { "u32", "entries" }, { "struct io_uring_params *", "params" } } },
{ 426, "io_uring_enter", 6, { { "unsigned int", "fd" }, { "u32", "to_submit" }, { "u32", "min_complete" }, { "u32", "flags" }, { "const void *", "argp" }, { "size_t", "argsz" } } },
{ 427, "io_uring_register", 4, { { "unsigned int", "fd" }, { "unsigned int", "opcode" }, { "void *", "arg" }, { "unsigned int", "nr_args" } } },
{ 428, "open_tree", 3, { { "int", "dfd" }, { "const char *", "filename" }, { "unsigned", "flags" } } },
{ 429, "move_mount", 5, { { "int", "from_dfd" }, { "const char *", "from_pathname" }, { "int", "to_dfd" }, { "const char *", "to_pathname" }, { "unsigned int", "flags" } } },
{ 430, "fsopen", 2, { { "const char *", "_fs_name" }, { "unsigned int", "flags" } } },
{ 431, "fsconfig", 5, { { "int", "fd" }, { "unsigned int", "cmd" }, { "const char *", "_key" }, { "const void *", "_value" }, { "int", "aux" } } },
{ 432, "fsmount", 3, { { "int", "fs_fd" }, { "unsigned int", "flags" }, { "unsigned int", "attr_flags" } } },
{ 433, "fspick", 3, { { "int", "dfd" }, { "const char *", "path" }, { "unsigned int", "flags" } } },
{ 434, "pidfd_open", 2, { { "pid_t", "pid" }, { "unsigned int", "flags" } } },
{ 435, "clone3", 2, { { "struct clone_args *", "uargs" }, { "size_t", "size" } } },
{ 436, "close_range", 3, { { "unsigned int", "fd" }, { "unsigned int", "max_fd" }, { "unsigned int", "flags" } } },
{ 437, "openat2", 4, { { "int", "dfd" }, { "const char *", "filename" }, { "struct open_how *", "how" }, { "size_t", "usize" } } },
{ 438, "pidfd_getfd", 3, { { "int", "pidfd" }, { "int", "fd" }, { "unsigned int", "flags" } } },
{ 439, "faccessat2", 4, { { "int", "dfd" }, { "const char *", "filename" }, { "int", "mode" }, { "int", "flags" } } },
{ 440, "process_madvise", 5, { { "int", "pidfd" }, { "const struct iovec *", "vec" }, { "size_t", "vlen" }, { "int", "behavior" }, { "unsigned int", "flags" } } },
{ 441, "epoll_pwait2", 6, { { "int", "epfd" }, { "struct epoll_event *", "events" }, { "int", "maxevents" }, { "const struct __kernel_timespec *", "timeout" }, { "const sigset_t *", "sigmask" }, { "size_t", "sigsetsize" } } },
{ 442, "mount_setattr", 5, { { "int", "dfd" }, { "const char *", "path" }, { "unsigned int", "flags" }, { "struct mount_attr *", "uattr" }, { "size_t", "usize" } } },
{ 443, "quotactl_fd", 4, { { "unsigned int", "fd" }, { "unsigned int", "cmd" }, { "qid_t", "id" }, { "void *", "addr" } } },
{ 444, "landlock_create_ruleset", 3, { { "const struct landlock_ruleset_attr *const", "attr" }, { "const size_t", "size" }, { "const __u32", "flags" } } },
{ 445, "landlock_add_rule", 4, { { "const int", "ruleset_fd" }, { "const enum landlock_rule_type", "rule_type" }, { "const void *const", "rule_attr" }, { "const __u32", "flags" } } },
{ 446, "landlock_restrict_self", 2, { { "const int", "ruleset_fd" }, { "const __u32", "flags" } } },
{ 447, "memfd_secret", 1, { { "unsigned int", "flags" } } },
{ 448, "process_mrelease", 2, { { "int", "pidfd" }, { "unsigned int", "flags" } } },
{ 449, "futex_waitv", 5, { { "struct futex_waitv *", "waiters" }, { "unsigned int", "nr_futexes" }, { "unsigned int", "flags" }, { "struct __kernel_timespec *", "timeout" }, { "clockid_t", "clockid" } } },
{ 450, "set_mempolicy_home_node", 4, { { "unsigned long", "start" }, { "unsigned long", "len" }, { "unsigned long", "home_node" }, { "unsigned long", "flags" } } },
{ 451, "cachestat", 4, { { "unsigned int", "fd" }, { "struct cachestat_range *", "cstat_range" }, { "struct cachestat *", "cstat" }, { "unsigned int", "flags" } } },
{ 452, "fchmodat2", 4, { { "int", "dfd" }, { "const char *", "filename" }, { "umode_t", "mode" }, { "unsigned int", "flags" } } },
{ 453, "map_shadow_stack", 3, { { "unsigned long", "addr" }, { "unsigned long", "size" }, { "unsigned int", "flags" } } },
{ 454, "futex_wake", 4, { { "void *", "uaddr" }, { "unsigned long", "mask" }, { "int", "nr" }, { "unsigned int", "flags" } } },
{ 455, "futex_wait", 6, { { "void *", "uaddr" }, { "unsigned long", "val" }, { "unsigned long", "mask" }, { "unsigned int", "flags" }, { "struct __kernel_timespec *", "timeout" }, { "clockid_t", "clockid" } } },
{ 456, "futex_requeue", 4, { { "struct futex_waitv *", "waiters" }, { "unsigned int", "flags" }, { "int", "nr_wake" }, { "int", "nr_requeue" } } },
{ 457, "statmount", 4, { { "const struct mnt_id_req *", "req" }, { "struct statmount *", "buf" }, { "size_t", "bufsize" }, { "unsigned int", "flags" } } },
{ 458, "listmount", 4, { { "const struct mnt_id_req *", "req" }, { "u64 *", "mnt_ids" }, { "size_t", "nr_mnt_ids" }, { "unsigned int", "flags" } } },
{ 459, "lsm_get_self_attr", 4, { { "unsigned int", "attr" }, { "struct lsm_ctx *", "ctx" }, { "u32 *", "size" }, { "u32", "flags" } } },
{ 460, "lsm_set_self_attr", 4, { { "unsigned int", "attr" }, { "struct lsm_ctx *", "ctx" }, { "u32", "size" }, { "u32", "flags" } } },
{ 461, "lsm_list_modules", 3, { { "u64 *", "ids" }, { "u32 *", "size" }, { "u32", "flags" } } },
{ 462, "mseal", 3, { { "unsigned long", "start" }, { "size_t", "len" }, { "unsigned long", "flags" } } },
{ 463, "setxattrat", 6, { { "int", "dfd" }, { "const char *", "pathname" }, { "unsigned int", "at_flags" }, { "const char *", "name" }, { "const struct xattr_args *", "uargs" }, { "size_t", "usize" } } },
{ 464, "getxattrat", 6, { { "int", "dfd" }, { "const char *", "pathname" }, { "unsigned int", "at_flags" }, { "const char *", "name" }, { "struct xattr_args *", "uargs" }, { "size_t", "usize" } } },
{ 465, "listxattrat", 5, { { "int", "dfd" }, { "const char *", "pathname" }, { "unsigned int", "at_flags" }, { "char *", "list" }, { "size_t", "size" } } },
{ 466, "removexattrat", 4, { { "int", "dfd" }, { "const char *", "pathname" }, { "unsigned int", "at_flags" }, { "const char *", "name" } } },
{ 467, "open_tree_attr", 5, { { "int", "dfd" }, { "const char *", "filename" }, { "unsigned", "flags" }, { "struct mount_attr *", "uattr" }, { "size_t", "usize" } } },
{ 468, "file_getattr", 5, { { "int", "dfd" }, { "const char *", "filename" }, { "struct file_attr *", "ufattr" }, { "size_t", "usize" }, { "unsigned int", "at_flags" } } },
{ 469, "file_setattr", 5, { { "int", "dfd" }, { "const char *", "filename" }, { "struct file_attr *", "ufattr" }, { "size_t", "usize" }, { "unsigned int", "at_flags" } } },
{ 470, "listns", 4, { { "const struct ns_id_req *", "req" }, { "u64 *", "ns_ids" }, { "size_t", "nr_ns_ids" }, { "unsigned int", "flags" } } },
};
FridaLinuxSyscallSignature *
frida_get_syscall_signatures (int * len)
{
if (len != NULL)
*len = G_N_ELEMENTS (frida_syscall_signatures);
return (FridaLinuxSyscallSignature *) frida_syscall_signatures;
}
FridaLinuxSyscallSignature *
frida_get_compat32_syscall_signatures (int * len)
{
if (len != NULL)
*len = 0;
return NULL;
}
+393
View File
@@ -0,0 +1,393 @@
// AUTO-GENERATED FILE. DO NOT EDIT.
namespace Frida {
public enum LinuxSyscall {
EXIT = 1,
FORK = 2,
READ = 3,
WRITE = 4,
OPEN = 5,
CLOSE = 6,
RESTART_SYSCALL = 7,
CREAT = 8,
LINK = 9,
UNLINK = 10,
EXECVE = 11,
CHDIR = 12,
MKNOD = 14,
CHMOD = 15,
LSEEK = 19,
GETPID = 20,
MOUNT = 21,
UMOUNT = 22,
PTRACE = 26,
ALARM = 27,
PAUSE = 29,
UTIME = 30,
ACCESS = 33,
NICE = 34,
SYNC = 36,
KILL = 37,
RENAME = 38,
MKDIR = 39,
RMDIR = 40,
DUP = 41,
PIPE = 42,
TIMES = 43,
BRK = 45,
SIGNAL = 48,
ACCT = 51,
UMOUNT2 = 52,
IOCTL = 54,
FCNTL = 55,
SETPGID = 57,
UMASK = 60,
CHROOT = 61,
USTAT = 62,
DUP2 = 63,
GETPPID = 64,
GETPGRP = 65,
SETSID = 66,
SIGPENDING = 73,
SETHOSTNAME = 74,
SETRLIMIT = 75,
GETRUSAGE = 77,
GETTIMEOFDAY = 78,
SETTIMEOFDAY = 79,
SYMLINK = 83,
READLINK = 85,
USELIB = 86,
SWAPON = 87,
REBOOT = 88,
READDIR = 89,
MMAP = 90,
MUNMAP = 91,
TRUNCATE = 92,
FTRUNCATE = 93,
FCHMOD = 94,
GETPRIORITY = 96,
SETPRIORITY = 97,
STATFS = 99,
FSTATFS = 100,
SOCKETCALL = 102,
SYSLOG = 103,
SETITIMER = 104,
GETITIMER = 105,
STAT = 106,
LSTAT = 107,
FSTAT = 108,
LOOKUP_DCOOKIE = 110,
VHANGUP = 111,
IDLE = 112,
WAIT4 = 114,
SWAPOFF = 115,
SYSINFO = 116,
IPC = 117,
FSYNC = 118,
SIGRETURN = 119,
CLONE = 120,
SETDOMAINNAME = 121,
UNAME = 122,
ADJTIMEX = 124,
MPROTECT = 125,
SIGPROCMASK = 126,
CREATE_MODULE = 127,
INIT_MODULE = 128,
DELETE_MODULE = 129,
GET_KERNEL_SYMS = 130,
QUOTACTL = 131,
GETPGID = 132,
FCHDIR = 133,
BDFLUSH = 134,
SYSFS = 135,
PERSONALITY = 136,
AFS_SYSCALL = 137,
GETDENTS = 141,
SELECT = 142,
FLOCK = 143,
MSYNC = 144,
READV = 145,
WRITEV = 146,
GETSID = 147,
FDATASYNC = 148,
_SYSCTL = 149,
MLOCK = 150,
MUNLOCK = 151,
MLOCKALL = 152,
MUNLOCKALL = 153,
SCHED_SETPARAM = 154,
SCHED_GETPARAM = 155,
SCHED_SETSCHEDULER = 156,
SCHED_GETSCHEDULER = 157,
SCHED_YIELD = 158,
SCHED_GET_PRIORITY_MAX = 159,
SCHED_GET_PRIORITY_MIN = 160,
SCHED_RR_GET_INTERVAL = 161,
NANOSLEEP = 162,
MREMAP = 163,
QUERY_MODULE = 167,
POLL = 168,
NFSSERVCTL = 169,
PRCTL = 172,
RT_SIGRETURN = 173,
RT_SIGACTION = 174,
RT_SIGPROCMASK = 175,
RT_SIGPENDING = 176,
RT_SIGTIMEDWAIT = 177,
RT_SIGQUEUEINFO = 178,
RT_SIGSUSPEND = 179,
PREAD64 = 180,
PWRITE64 = 181,
GETCWD = 183,
CAPGET = 184,
CAPSET = 185,
SIGALTSTACK = 186,
SENDFILE = 187,
GETPMSG = 188,
PUTPMSG = 189,
VFORK = 190,
GETRLIMIT = 191,
LCHOWN = 198,
GETUID = 199,
GETGID = 200,
GETEUID = 201,
GETEGID = 202,
SETREUID = 203,
SETREGID = 204,
GETGROUPS = 205,
SETGROUPS = 206,
FCHOWN = 207,
SETRESUID = 208,
GETRESUID = 209,
SETRESGID = 210,
GETRESGID = 211,
CHOWN = 212,
SETUID = 213,
SETGID = 214,
SETFSUID = 215,
SETFSGID = 216,
PIVOT_ROOT = 217,
MINCORE = 218,
MADVISE = 219,
GETDENTS64 = 220,
READAHEAD = 222,
SETXATTR = 224,
LSETXATTR = 225,
FSETXATTR = 226,
GETXATTR = 227,
LGETXATTR = 228,
FGETXATTR = 229,
LISTXATTR = 230,
LLISTXATTR = 231,
FLISTXATTR = 232,
REMOVEXATTR = 233,
LREMOVEXATTR = 234,
FREMOVEXATTR = 235,
GETTID = 236,
TKILL = 237,
FUTEX = 238,
SCHED_SETAFFINITY = 239,
SCHED_GETAFFINITY = 240,
TGKILL = 241,
IO_SETUP = 243,
IO_DESTROY = 244,
IO_GETEVENTS = 245,
IO_SUBMIT = 246,
IO_CANCEL = 247,
EXIT_GROUP = 248,
EPOLL_CREATE = 249,
EPOLL_CTL = 250,
EPOLL_WAIT = 251,
SET_TID_ADDRESS = 252,
FADVISE64 = 253,
TIMER_CREATE = 254,
TIMER_SETTIME = 255,
TIMER_GETTIME = 256,
TIMER_GETOVERRUN = 257,
TIMER_DELETE = 258,
CLOCK_SETTIME = 259,
CLOCK_GETTIME = 260,
CLOCK_GETRES = 261,
CLOCK_NANOSLEEP = 262,
STATFS64 = 265,
FSTATFS64 = 266,
REMAP_FILE_PAGES = 267,
MBIND = 268,
GET_MEMPOLICY = 269,
SET_MEMPOLICY = 270,
MQ_OPEN = 271,
MQ_UNLINK = 272,
MQ_TIMEDSEND = 273,
MQ_TIMEDRECEIVE = 274,
MQ_NOTIFY = 275,
MQ_GETSETATTR = 276,
KEXEC_LOAD = 277,
ADD_KEY = 278,
REQUEST_KEY = 279,
KEYCTL = 280,
WAITID = 281,
IOPRIO_SET = 282,
IOPRIO_GET = 283,
INOTIFY_INIT = 284,
INOTIFY_ADD_WATCH = 285,
INOTIFY_RM_WATCH = 286,
MIGRATE_PAGES = 287,
OPENAT = 288,
MKDIRAT = 289,
MKNODAT = 290,
FCHOWNAT = 291,
FUTIMESAT = 292,
NEWFSTATAT = 293,
UNLINKAT = 294,
RENAMEAT = 295,
LINKAT = 296,
SYMLINKAT = 297,
READLINKAT = 298,
FCHMODAT = 299,
FACCESSAT = 300,
PSELECT6 = 301,
PPOLL = 302,
UNSHARE = 303,
SET_ROBUST_LIST = 304,
GET_ROBUST_LIST = 305,
SPLICE = 306,
SYNC_FILE_RANGE = 307,
TEE = 308,
VMSPLICE = 309,
MOVE_PAGES = 310,
GETCPU = 311,
EPOLL_PWAIT = 312,
UTIMES = 313,
FALLOCATE = 314,
UTIMENSAT = 315,
SIGNALFD = 316,
TIMERFD = 317,
EVENTFD = 318,
TIMERFD_CREATE = 319,
TIMERFD_SETTIME = 320,
TIMERFD_GETTIME = 321,
SIGNALFD4 = 322,
EVENTFD2 = 323,
INOTIFY_INIT1 = 324,
PIPE2 = 325,
DUP3 = 326,
EPOLL_CREATE1 = 327,
PREADV = 328,
PWRITEV = 329,
RT_TGSIGQUEUEINFO = 330,
PERF_EVENT_OPEN = 331,
FANOTIFY_INIT = 332,
FANOTIFY_MARK = 333,
PRLIMIT64 = 334,
NAME_TO_HANDLE_AT = 335,
OPEN_BY_HANDLE_AT = 336,
CLOCK_ADJTIME = 337,
SYNCFS = 338,
SETNS = 339,
PROCESS_VM_READV = 340,
PROCESS_VM_WRITEV = 341,
S390_RUNTIME_INSTR = 342,
KCMP = 343,
FINIT_MODULE = 344,
SCHED_SETATTR = 345,
SCHED_GETATTR = 346,
RENAMEAT2 = 347,
SECCOMP = 348,
GETRANDOM = 349,
MEMFD_CREATE = 350,
BPF = 351,
S390_PCI_MMIO_WRITE = 352,
S390_PCI_MMIO_READ = 353,
EXECVEAT = 354,
USERFAULTFD = 355,
MEMBARRIER = 356,
RECVMMSG = 357,
SENDMMSG = 358,
SOCKET = 359,
SOCKETPAIR = 360,
BIND = 361,
CONNECT = 362,
LISTEN = 363,
ACCEPT4 = 364,
GETSOCKOPT = 365,
SETSOCKOPT = 366,
GETSOCKNAME = 367,
GETPEERNAME = 368,
SENDTO = 369,
SENDMSG = 370,
RECVFROM = 371,
RECVMSG = 372,
SHUTDOWN = 373,
MLOCK2 = 374,
COPY_FILE_RANGE = 375,
PREADV2 = 376,
PWRITEV2 = 377,
S390_GUARDED_STORAGE = 378,
STATX = 379,
S390_STHYI = 380,
KEXEC_FILE_LOAD = 381,
IO_PGETEVENTS = 382,
RSEQ = 383,
PKEY_MPROTECT = 384,
PKEY_ALLOC = 385,
PKEY_FREE = 386,
SEMTIMEDOP = 392,
SEMGET = 393,
SEMCTL = 394,
SHMGET = 395,
SHMCTL = 396,
SHMAT = 397,
SHMDT = 398,
MSGGET = 399,
MSGSND = 400,
MSGRCV = 401,
MSGCTL = 402,
PIDFD_SEND_SIGNAL = 424,
IO_URING_SETUP = 425,
IO_URING_ENTER = 426,
IO_URING_REGISTER = 427,
OPEN_TREE = 428,
MOVE_MOUNT = 429,
FSOPEN = 430,
FSCONFIG = 431,
FSMOUNT = 432,
FSPICK = 433,
PIDFD_OPEN = 434,
CLONE3 = 435,
CLOSE_RANGE = 436,
OPENAT2 = 437,
PIDFD_GETFD = 438,
FACCESSAT2 = 439,
PROCESS_MADVISE = 440,
EPOLL_PWAIT2 = 441,
MOUNT_SETATTR = 442,
QUOTACTL_FD = 443,
LANDLOCK_CREATE_RULESET = 444,
LANDLOCK_ADD_RULE = 445,
LANDLOCK_RESTRICT_SELF = 446,
MEMFD_SECRET = 447,
PROCESS_MRELEASE = 448,
FUTEX_WAITV = 449,
SET_MEMPOLICY_HOME_NODE = 450,
CACHESTAT = 451,
FCHMODAT2 = 452,
MAP_SHADOW_STACK = 453,
FUTEX_WAKE = 454,
FUTEX_WAIT = 455,
FUTEX_REQUEUE = 456,
STATMOUNT = 457,
LISTMOUNT = 458,
LSM_GET_SELF_ATTR = 459,
LSM_SET_SELF_ATTR = 460,
LSM_LIST_MODULES = 461,
MSEAL = 462,
SETXATTRAT = 463,
GETXATTRAT = 464,
LISTXATTRAT = 465,
REMOVEXATTRAT = 466,
OPEN_TREE_ATTR = 467,
FILE_GETATTR = 468,
FILE_SETATTR = 469,
LISTNS = 470,
}
}
+459
View File
@@ -0,0 +1,459 @@
/* AUTO-GENERATED FILE. DO NOT EDIT. */
#include "frida-base.h"
static const FridaLinuxSyscallSignature frida_syscall_signatures[] =
{
{ 0, "restart_syscall", 0, {} },
{ 1, "exit", 1, { { "int", "error_code" } } },
{ 2, "fork", 0, {} },
{ 3, "read", 3, { { "unsigned int", "fd" }, { "char *", "buf" }, { "size_t", "count" } } },
{ 4, "write", 3, { { "unsigned int", "fd" }, { "const char *", "buf" }, { "size_t", "count" } } },
{ 5, "open", 3, { { "const char *", "filename" }, { "int", "flags" }, { "umode_t", "mode" } } },
{ 6, "close", 1, { { "unsigned int", "fd" } } },
{ 7, "waitpid", 3, { { "pid_t", "pid" }, { "int *", "stat_addr" }, { "int", "options" } } },
{ 8, "creat", 2, { { "const char *", "pathname" }, { "umode_t", "mode" } } },
{ 9, "link", 2, { { "const char *", "oldname" }, { "const char *", "newname" } } },
{ 10, "unlink", 1, { { "const char *", "pathname" } } },
{ 11, "execve", 3, { { "const char *", "filename" }, { "const char *const *", "argv" }, { "const char *const *", "envp" } } },
{ 12, "chdir", 1, { { "const char *", "filename" } } },
{ 13, "time", 1, { { "__kernel_old_time_t *", "tloc" } } },
{ 14, "mknod", 3, { { "const char *", "filename" }, { "umode_t", "mode" }, { "unsigned", "dev" } } },
{ 15, "chmod", 2, { { "const char *", "filename" }, { "umode_t", "mode" } } },
{ 16, "lchown", 3, { { "const char *", "filename" }, { "uid_t", "user" }, { "gid_t", "group" } } },
{ 18, "oldstat", 2, { { "const char *", "filename" }, { "struct __old_kernel_stat *", "statbuf" } } },
{ 19, "lseek", 3, { { "unsigned int", "fd" }, { "off_t", "offset" }, { "unsigned int", "whence" } } },
{ 20, "getpid", 0, {} },
{ 21, "mount", 5, { { "char *", "dev_name" }, { "char *", "dir_name" }, { "char *", "type" }, { "unsigned long", "flags" }, { "void *", "data" } } },
{ 22, "umount", 2, { { "char *", "name" }, { "int", "flags" } } },
{ 23, "setuid", 1, { { "uid_t", "uid" } } },
{ 24, "getuid", 0, {} },
{ 25, "stime", 1, { { "__kernel_old_time_t *", "tptr" } } },
{ 26, "ptrace", 4, { { "long", "request" }, { "long", "pid" }, { "unsigned long", "addr" }, { "unsigned long", "data" } } },
{ 27, "alarm", 1, { { "unsigned int", "seconds" } } },
{ 28, "oldfstat", 2, { { "unsigned int", "fd" }, { "struct __old_kernel_stat *", "statbuf" } } },
{ 29, "pause", 0, {} },
{ 30, "utime", 2, { { "char *", "filename" }, { "struct utimbuf *", "times" } } },
{ 33, "access", 2, { { "const char *", "filename" }, { "int", "mode" } } },
{ 34, "nice", 1, { { "int", "increment" } } },
{ 36, "sync", 0, {} },
{ 37, "kill", 2, { { "pid_t", "pid" }, { "int", "sig" } } },
{ 38, "rename", 2, { { "const char *", "oldname" }, { "const char *", "newname" } } },
{ 39, "mkdir", 2, { { "const char *", "pathname" }, { "umode_t", "mode" } } },
{ 40, "rmdir", 1, { { "const char *", "pathname" } } },
{ 41, "dup", 1, { { "unsigned int", "fildes" } } },
{ 42, "pipe", 1, { { "int *", "fildes" } } },
{ 43, "times", 1, { { "struct tms *", "tbuf" } } },
{ 45, "brk", 1, { { "unsigned long", "brk" } } },
{ 46, "setgid", 1, { { "gid_t", "gid" } } },
{ 47, "getgid", 0, {} },
{ 48, "signal", 2, { { "int", "sig" }, { "__sighandler_t", "handler" } } },
{ 49, "geteuid", 0, {} },
{ 50, "getegid", 0, {} },
{ 51, "acct", 1, { { "const char *", "name" } } },
{ 52, "umount2", 2, { { "char *", "name" }, { "int", "flags" } } },
{ 54, "ioctl", 3, { { "unsigned int", "fd" }, { "unsigned int", "cmd" }, { "unsigned long", "arg" } } },
{ 55, "fcntl", 3, { { "unsigned int", "fd" }, { "unsigned int", "cmd" }, { "unsigned long", "arg" } } },
{ 57, "setpgid", 2, { { "pid_t", "pid" }, { "pid_t", "pgid" } } },
{ 59, "oldolduname", 1, { { "struct oldold_utsname *", "arg0" } } },
{ 60, "umask", 1, { { "int", "mask" } } },
{ 61, "chroot", 1, { { "const char *", "filename" } } },
{ 62, "ustat", 2, { { "unsigned", "dev" }, { "struct ustat *", "ubuf" } } },
{ 63, "dup2", 2, { { "unsigned int", "oldfd" }, { "unsigned int", "newfd" } } },
{ 64, "getppid", 0, {} },
{ 65, "getpgrp", 0, {} },
{ 66, "setsid", 0, {} },
{ 67, "sigaction", 3, { { "int", "sig" }, { "const struct old_sigaction *", "act" }, { "struct old_sigaction *", "oact" } } },
{ 68, "sgetmask", 0, {} },
{ 69, "ssetmask", 1, { { "int", "newmask" } } },
{ 70, "setreuid", 2, { { "uid_t", "ruid" }, { "uid_t", "euid" } } },
{ 71, "setregid", 2, { { "gid_t", "rgid" }, { "gid_t", "egid" } } },
{ 72, "sigsuspend", 3, { { "int", "unused1" }, { "int", "unused2" }, { "old_sigset_t", "mask" } } },
{ 73, "sigpending", 1, { { "old_sigset_t *", "uset" } } },
{ 74, "sethostname", 2, { { "char *", "name" }, { "int", "len" } } },
{ 75, "setrlimit", 2, { { "unsigned int", "resource" }, { "struct rlimit *", "rlim" } } },
{ 76, "getrlimit", 2, { { "unsigned int", "resource" }, { "struct rlimit *", "rlim" } } },
{ 77, "getrusage", 2, { { "int", "who" }, { "struct rusage *", "ru" } } },
{ 78, "gettimeofday", 2, { { "struct __kernel_old_timeval *", "tv" }, { "struct timezone *", "tz" } } },
{ 79, "settimeofday", 2, { { "struct __kernel_old_timeval *", "tv" }, { "struct timezone *", "tz" } } },
{ 80, "getgroups", 2, { { "int", "gidsetsize" }, { "gid_t *", "grouplist" } } },
{ 81, "setgroups", 2, { { "int", "gidsetsize" }, { "gid_t *", "grouplist" } } },
{ 82, "select", 5, { { "int", "n" }, { "fd_set *", "inp" }, { "fd_set *", "outp" }, { "fd_set *", "exp" }, { "struct __kernel_old_timeval *", "tvp" } } },
{ 83, "symlink", 2, { { "const char *", "oldname" }, { "const char *", "newname" } } },
{ 84, "oldlstat", 2, { { "const char *", "filename" }, { "struct __old_kernel_stat *", "statbuf" } } },
{ 85, "readlink", 3, { { "const char *", "path" }, { "char *", "buf" }, { "int", "bufsiz" } } },
{ 86, "uselib", 1, { { "const char *", "library" } } },
{ 87, "swapon", 2, { { "const char *", "specialfile" }, { "int", "swap_flags" } } },
{ 88, "reboot", 4, { { "int", "magic1" }, { "int", "magic2" }, { "unsigned int", "cmd" }, { "void *", "arg" } } },
{ 89, "readdir", 3, { { "unsigned", "int" }, { "struct old_linux_dirent *", "arg1" }, { "unsigned", "int" } } },
{ 90, "mmap", 6, { { "unsigned long", "addr" }, { "unsigned long", "len" }, { "unsigned long", "prot" }, { "unsigned long", "flags" }, { "unsigned long", "fd" }, { "unsigned long", "off" } } },
{ 91, "munmap", 2, { { "unsigned long", "addr" }, { "size_t", "len" } } },
{ 92, "truncate", 2, { { "const char *", "path" }, { "long", "length" } } },
{ 93, "ftruncate", 2, { { "unsigned int", "fd" }, { "off_t", "length" } } },
{ 94, "fchmod", 2, { { "unsigned int", "fd" }, { "umode_t", "mode" } } },
{ 95, "fchown", 3, { { "unsigned int", "fd" }, { "uid_t", "user" }, { "gid_t", "group" } } },
{ 96, "getpriority", 2, { { "int", "which" }, { "int", "who" } } },
{ 97, "setpriority", 3, { { "int", "which" }, { "int", "who" }, { "int", "niceval" } } },
{ 99, "statfs", 2, { { "const char *", "pathname" }, { "struct statfs *", "buf" } } },
{ 100, "fstatfs", 2, { { "unsigned int", "fd" }, { "struct statfs *", "buf" } } },
{ 101, "ioperm", 3, { { "unsigned long", "from" }, { "unsigned long", "num" }, { "int", "turn_on" } } },
{ 102, "socketcall", 2, { { "int", "call" }, { "unsigned long *", "args" } } },
{ 103, "syslog", 3, { { "int", "type" }, { "char *", "buf" }, { "int", "len" } } },
{ 104, "setitimer", 3, { { "int", "which" }, { "struct __kernel_old_itimerval *", "value" }, { "struct __kernel_old_itimerval *", "ovalue" } } },
{ 105, "getitimer", 2, { { "int", "which" }, { "struct __kernel_old_itimerval *", "value" } } },
{ 106, "stat", 2, { { "const char *", "filename" }, { "struct __old_kernel_stat *", "statbuf" } } },
{ 107, "lstat", 2, { { "const char *", "filename" }, { "struct __old_kernel_stat *", "statbuf" } } },
{ 108, "fstat", 2, { { "unsigned int", "fd" }, { "struct __old_kernel_stat *", "statbuf" } } },
{ 109, "olduname", 1, { { "struct oldold_utsname *", "name" } } },
{ 110, "iopl", 1, { { "unsigned int", "level" } } },
{ 111, "vhangup", 0, {} },
{ 113, "vm86old", 1, { { "struct vm86_struct *", "user_vm86" } } },
{ 114, "wait4", 4, { { "pid_t", "upid" }, { "int *", "stat_addr" }, { "int", "options" }, { "struct rusage *", "ru" } } },
{ 115, "swapoff", 1, { { "const char *", "specialfile" } } },
{ 116, "sysinfo", 1, { { "struct sysinfo *", "info" } } },
{ 117, "ipc", 6, { { "unsigned int", "call" }, { "int", "first" }, { "unsigned long", "second" }, { "unsigned long", "third" }, { "void *", "ptr" }, { "long", "fifth" } } },
{ 118, "fsync", 1, { { "unsigned int", "fd" } } },
{ 120, "clone", 5, { { "unsigned long", "clone_flags" }, { "unsigned long", "newsp" }, { "int *", "parent_tidptr" }, { "int *", "child_tidptr" }, { "unsigned long", "tls" } } },
{ 121, "setdomainname", 2, { { "char *", "name" }, { "int", "len" } } },
{ 122, "uname", 1, { { "struct old_utsname *", "name" } } },
{ 123, "modify_ldt", 3, { { "int", "func" }, { "void *", "ptr" }, { "unsigned long", "bytecount" } } },
{ 124, "adjtimex", 1, { { "struct old_timex32 *", "txc_p" } } },
{ 125, "mprotect", 3, { { "unsigned long", "start" }, { "size_t", "len" }, { "unsigned long", "prot" } } },
{ 126, "sigprocmask", 3, { { "int", "how" }, { "old_sigset_t *", "nset" }, { "old_sigset_t *", "oset" } } },
{ 128, "init_module", 3, { { "void *", "umod" }, { "unsigned long", "len" }, { "const char *", "uargs" } } },
{ 129, "delete_module", 2, { { "const char *", "name_user" }, { "unsigned int", "flags" } } },
{ 131, "quotactl", 4, { { "unsigned int", "cmd" }, { "const char *", "special" }, { "qid_t", "id" }, { "void *", "addr" } } },
{ 132, "getpgid", 1, { { "pid_t", "pid" } } },
{ 133, "fchdir", 1, { { "unsigned int", "fd" } } },
{ 134, "bdflush", 0, {} },
{ 135, "sysfs", 3, { { "int", "option" }, { "unsigned long", "arg1" }, { "unsigned long", "arg2" } } },
{ 136, "personality", 1, { { "unsigned int", "personality" } } },
{ 138, "setfsuid", 1, { { "uid_t", "uid" } } },
{ 139, "setfsgid", 1, { { "gid_t", "gid" } } },
{ 140, "_llseek", 5, { { "unsigned int", "fd" }, { "unsigned long", "offset_high" }, { "unsigned long", "offset_low" }, { "loff_t *", "result" }, { "unsigned int", "whence" } } },
{ 141, "getdents", 3, { { "unsigned int", "fd" }, { "struct linux_dirent *", "dirent" }, { "unsigned int", "count" } } },
{ 142, "_newselect", 5, { { "int", "n" }, { "fd_set *", "inp" }, { "fd_set *", "outp" }, { "fd_set *", "exp" }, { "struct __kernel_old_timeval *", "tvp" } } },
{ 143, "flock", 2, { { "unsigned int", "fd" }, { "unsigned int", "cmd" } } },
{ 144, "msync", 3, { { "unsigned long", "start" }, { "size_t", "len" }, { "int", "flags" } } },
{ 145, "readv", 3, { { "unsigned long", "fd" }, { "const struct iovec *", "vec" }, { "unsigned long", "vlen" } } },
{ 146, "writev", 3, { { "unsigned long", "fd" }, { "const struct iovec *", "vec" }, { "unsigned long", "vlen" } } },
{ 147, "getsid", 1, { { "pid_t", "pid" } } },
{ 148, "fdatasync", 1, { { "unsigned int", "fd" } } },
{ 149, "_sysctl", 0, {} },
{ 150, "mlock", 2, { { "unsigned long", "start" }, { "size_t", "len" } } },
{ 151, "munlock", 2, { { "unsigned long", "start" }, { "size_t", "len" } } },
{ 152, "mlockall", 1, { { "int", "flags" } } },
{ 153, "munlockall", 0, {} },
{ 154, "sched_setparam", 2, { { "pid_t", "pid" }, { "struct sched_param *", "param" } } },
{ 155, "sched_getparam", 2, { { "pid_t", "pid" }, { "struct sched_param *", "param" } } },
{ 156, "sched_setscheduler", 3, { { "pid_t", "pid" }, { "int", "policy" }, { "struct sched_param *", "param" } } },
{ 157, "sched_getscheduler", 1, { { "pid_t", "pid" } } },
{ 158, "sched_yield", 0, {} },
{ 159, "sched_get_priority_max", 1, { { "int", "policy" } } },
{ 160, "sched_get_priority_min", 1, { { "int", "policy" } } },
{ 161, "sched_rr_get_interval", 2, { { "pid_t", "pid" }, { "struct __kernel_timespec *", "interval" } } },
{ 162, "nanosleep", 2, { { "struct old_timespec32 *", "rqtp" }, { "struct old_timespec32 *", "rmtp" } } },
{ 163, "mremap", 5, { { "unsigned long", "addr" }, { "unsigned long", "old_len" }, { "unsigned long", "new_len" }, { "unsigned long", "flags" }, { "unsigned long", "new_addr" } } },
{ 164, "setresuid", 3, { { "uid_t", "ruid" }, { "uid_t", "euid" }, { "uid_t", "suid" } } },
{ 165, "getresuid", 3, { { "uid_t *", "ruidp" }, { "uid_t *", "euidp" }, { "uid_t *", "suidp" } } },
{ 166, "vm86", 2, { { "unsigned long", "cmd" }, { "unsigned long", "arg" } } },
{ 168, "poll", 3, { { "struct pollfd *", "ufds" }, { "unsigned int", "nfds" }, { "int", "timeout_msecs" } } },
{ 170, "setresgid", 3, { { "gid_t", "rgid" }, { "gid_t", "egid" }, { "gid_t", "sgid" } } },
{ 171, "getresgid", 3, { { "gid_t *", "rgidp" }, { "gid_t *", "egidp" }, { "gid_t *", "sgidp" } } },
{ 172, "prctl", 5, { { "int", "option" }, { "unsigned long", "arg2" }, { "unsigned long", "arg3" }, { "unsigned long", "arg4" }, { "unsigned long", "arg5" } } },
{ 173, "rt_sigreturn", 0, {} },
{ 174, "rt_sigaction", 4, { { "int", "sig" }, { "const struct sigaction *", "act" }, { "struct sigaction *", "oact" }, { "size_t", "sigsetsize" } } },
{ 175, "rt_sigprocmask", 4, { { "int", "how" }, { "sigset_t *", "nset" }, { "sigset_t *", "oset" }, { "size_t", "sigsetsize" } } },
{ 176, "rt_sigpending", 2, { { "sigset_t *", "uset" }, { "size_t", "sigsetsize" } } },
{ 177, "rt_sigtimedwait", 4, { { "const sigset_t *", "uthese" }, { "siginfo_t *", "uinfo" }, { "const struct __kernel_timespec *", "uts" }, { "size_t", "sigsetsize" } } },
{ 178, "rt_sigqueueinfo", 3, { { "pid_t", "pid" }, { "int", "sig" }, { "siginfo_t *", "uinfo" } } },
{ 179, "rt_sigsuspend", 2, { { "sigset_t *", "unewset" }, { "size_t", "sigsetsize" } } },
{ 180, "pread64", 4, { { "unsigned int", "fd" }, { "char *", "buf" }, { "size_t", "count" }, { "loff_t", "pos" } } },
{ 181, "pwrite64", 4, { { "unsigned int", "fd" }, { "const char *", "buf" }, { "size_t", "count" }, { "loff_t", "pos" } } },
{ 182, "chown", 3, { { "const char *", "filename" }, { "uid_t", "user" }, { "gid_t", "group" } } },
{ 183, "getcwd", 2, { { "char *", "buf" }, { "unsigned long", "size" } } },
{ 184, "capget", 2, { { "cap_user_header_t", "header" }, { "cap_user_data_t", "dataptr" } } },
{ 185, "capset", 2, { { "cap_user_header_t", "header" }, { "const cap_user_data_t", "data" } } },
{ 186, "sigaltstack", 2, { { "const stack_t *", "uss" }, { "stack_t *", "uoss" } } },
{ 187, "sendfile", 4, { { "int", "out_fd" }, { "int", "in_fd" }, { "off_t *", "offset" }, { "size_t", "count" } } },
{ 190, "vfork", 0, {} },
{ 191, "ugetrlimit", 2, { { "unsigned int", "resource" }, { "struct rlimit *", "rlim" } } },
{ 192, "mmap2", 6, { { "unsigned long", "addr" }, { "unsigned long", "len" }, { "unsigned long", "prot" }, { "unsigned long", "flags" }, { "unsigned long", "fd" }, { "unsigned long", "pgoff" } } },
{ 193, "truncate64", 2, { { "const char *", "path" }, { "loff_t", "length" } } },
{ 194, "ftruncate64", 2, { { "unsigned int", "fd" }, { "loff_t", "length" } } },
{ 198, "lchown32", 3, { { "const char *", "filename" }, { "uid_t", "user" }, { "gid_t", "group" } } },
{ 199, "getuid32", 0, {} },
{ 200, "getgid32", 0, {} },
{ 201, "geteuid32", 0, {} },
{ 202, "getegid32", 0, {} },
{ 203, "setreuid32", 2, { { "uid_t", "ruid" }, { "uid_t", "euid" } } },
{ 204, "setregid32", 2, { { "gid_t", "rgid" }, { "gid_t", "egid" } } },
{ 205, "getgroups32", 2, { { "int", "gidsetsize" }, { "gid_t *", "grouplist" } } },
{ 206, "setgroups32", 2, { { "int", "gidsetsize" }, { "gid_t *", "grouplist" } } },
{ 207, "fchown32", 3, { { "unsigned int", "fd" }, { "uid_t", "user" }, { "gid_t", "group" } } },
{ 208, "setresuid32", 3, { { "uid_t", "ruid" }, { "uid_t", "euid" }, { "uid_t", "suid" } } },
{ 209, "getresuid32", 3, { { "uid_t *", "ruid" }, { "uid_t *", "euid" }, { "uid_t *", "suid" } } },
{ 210, "setresgid32", 3, { { "gid_t", "rgid" }, { "gid_t", "egid" }, { "gid_t", "sgid" } } },
{ 211, "getresgid32", 3, { { "gid_t *", "rgid" }, { "gid_t *", "egid" }, { "gid_t *", "sgid" } } },
{ 212, "chown32", 3, { { "const char *", "filename" }, { "uid_t", "user" }, { "gid_t", "group" } } },
{ 213, "setuid32", 1, { { "uid_t", "uid" } } },
{ 214, "setgid32", 1, { { "gid_t", "gid" } } },
{ 215, "setfsuid32", 1, { { "uid_t", "uid" } } },
{ 216, "setfsgid32", 1, { { "gid_t", "gid" } } },
{ 217, "pivot_root", 2, { { "const char *", "new_root" }, { "const char *", "put_old" } } },
{ 218, "mincore", 3, { { "unsigned long", "start" }, { "size_t", "len" }, { "unsigned char *", "vec" } } },
{ 219, "madvise", 3, { { "unsigned long", "start" }, { "size_t", "len_in" }, { "int", "behavior" } } },
{ 220, "getdents64", 3, { { "unsigned int", "fd" }, { "struct linux_dirent64 *", "dirent" }, { "unsigned int", "count" } } },
{ 221, "fcntl64", 3, { { "unsigned int", "fd" }, { "unsigned int", "cmd" }, { "unsigned long", "arg" } } },
{ 224, "gettid", 0, {} },
{ 225, "readahead", 3, { { "int", "fd" }, { "loff_t", "offset" }, { "size_t", "count" } } },
{ 226, "setxattr", 5, { { "const char *", "pathname" }, { "const char *", "name" }, { "const void *", "value" }, { "size_t", "size" }, { "int", "flags" } } },
{ 227, "lsetxattr", 5, { { "const char *", "pathname" }, { "const char *", "name" }, { "const void *", "value" }, { "size_t", "size" }, { "int", "flags" } } },
{ 228, "fsetxattr", 5, { { "int", "fd" }, { "const char *", "name" }, { "const void *", "value" }, { "size_t", "size" }, { "int", "flags" } } },
{ 229, "getxattr", 4, { { "const char *", "pathname" }, { "const char *", "name" }, { "void *", "value" }, { "size_t", "size" } } },
{ 230, "lgetxattr", 4, { { "const char *", "pathname" }, { "const char *", "name" }, { "void *", "value" }, { "size_t", "size" } } },
{ 231, "fgetxattr", 4, { { "int", "fd" }, { "const char *", "name" }, { "void *", "value" }, { "size_t", "size" } } },
{ 232, "listxattr", 3, { { "const char *", "pathname" }, { "char *", "list" }, { "size_t", "size" } } },
{ 233, "llistxattr", 3, { { "const char *", "pathname" }, { "char *", "list" }, { "size_t", "size" } } },
{ 234, "flistxattr", 3, { { "int", "fd" }, { "char *", "list" }, { "size_t", "size" } } },
{ 235, "removexattr", 2, { { "const char *", "pathname" }, { "const char *", "name" } } },
{ 236, "lremovexattr", 2, { { "const char *", "pathname" }, { "const char *", "name" } } },
{ 237, "fremovexattr", 2, { { "int", "fd" }, { "const char *", "name" } } },
{ 238, "tkill", 2, { { "pid_t", "pid" }, { "int", "sig" } } },
{ 239, "sendfile64", 4, { { "int", "out_fd" }, { "int", "in_fd" }, { "loff_t *", "offset" }, { "size_t", "count" } } },
{ 240, "futex", 6, { { "u32 *", "uaddr" }, { "int", "op" }, { "u32", "val" }, { "const struct __kernel_timespec *", "utime" }, { "u32 *", "uaddr2" }, { "u32", "val3" } } },
{ 241, "sched_setaffinity", 3, { { "pid_t", "pid" }, { "unsigned int", "len" }, { "unsigned long *", "user_mask_ptr" } } },
{ 242, "sched_getaffinity", 3, { { "pid_t", "pid" }, { "unsigned int", "len" }, { "unsigned long *", "user_mask_ptr" } } },
{ 243, "set_thread_area", 1, { { "struct user_desc *", "user_desc" } } },
{ 244, "get_thread_area", 1, { { "struct user_desc *", "user_desc" } } },
{ 245, "io_setup", 2, { { "unsigned", "nr_events" }, { "aio_context_t *", "ctxp" } } },
{ 246, "io_destroy", 1, { { "aio_context_t", "ctx" } } },
{ 247, "io_getevents", 5, { { "__u32", "ctx_id" }, { "__s32", "min_nr" }, { "__s32", "nr" }, { "struct io_event *", "events" }, { "struct old_timespec32 *", "timeout" } } },
{ 248, "io_submit", 3, { { "aio_context_t", "ctx_id" }, { "long", "nr" }, { "struct iocb * *", "iocbpp" } } },
{ 249, "io_cancel", 3, { { "aio_context_t", "ctx_id" }, { "struct iocb *", "iocb" }, { "struct io_event *", "result" } } },
{ 250, "fadvise64", 5, { { "int", "fd" }, { "unsigned int", "offset_lo" }, { "unsigned int", "offset_hi" }, { "size_t", "len" }, { "int", "advice" } } },
{ 252, "exit_group", 1, { { "int", "error_code" } } },
{ 254, "epoll_create", 1, { { "int", "size" } } },
{ 255, "epoll_ctl", 4, { { "int", "epfd" }, { "int", "op" }, { "int", "fd" }, { "struct epoll_event *", "event" } } },
{ 256, "epoll_wait", 4, { { "int", "epfd" }, { "struct epoll_event *", "events" }, { "int", "maxevents" }, { "int", "timeout" } } },
{ 257, "remap_file_pages", 5, { { "unsigned long", "start" }, { "unsigned long", "size" }, { "unsigned long", "prot" }, { "unsigned long", "pgoff" }, { "unsigned long", "flags" } } },
{ 258, "set_tid_address", 1, { { "int *", "tidptr" } } },
{ 259, "timer_create", 3, { { "const clockid_t", "which_clock" }, { "struct sigevent *", "timer_event_spec" }, { "timer_t *", "created_timer_id" } } },
{ 260, "timer_settime", 4, { { "timer_t", "timer_id" }, { "int", "flags" }, { "const struct __kernel_itimerspec *", "new_setting" }, { "struct __kernel_itimerspec *", "old_setting" } } },
{ 261, "timer_gettime", 2, { { "timer_t", "timer_id" }, { "struct __kernel_itimerspec *", "setting" } } },
{ 262, "timer_getoverrun", 1, { { "timer_t", "timer_id" } } },
{ 263, "timer_delete", 1, { { "timer_t", "timer_id" } } },
{ 264, "clock_settime", 2, { { "const clockid_t", "which_clock" }, { "const struct __kernel_timespec *", "tp" } } },
{ 265, "clock_gettime", 2, { { "const clockid_t", "which_clock" }, { "struct __kernel_timespec *", "tp" } } },
{ 266, "clock_getres", 2, { { "const clockid_t", "which_clock" }, { "struct __kernel_timespec *", "tp" } } },
{ 267, "clock_nanosleep", 4, { { "const clockid_t", "which_clock" }, { "int", "flags" }, { "const struct __kernel_timespec *", "rqtp" }, { "struct __kernel_timespec *", "rmtp" } } },
{ 268, "statfs64", 3, { { "const char *", "pathname" }, { "size_t", "sz" }, { "struct statfs64 *", "buf" } } },
{ 269, "fstatfs64", 3, { { "unsigned int", "fd" }, { "size_t", "sz" }, { "struct statfs64 *", "buf" } } },
{ 270, "tgkill", 3, { { "pid_t", "tgid" }, { "pid_t", "pid" }, { "int", "sig" } } },
{ 271, "utimes", 2, { { "char *", "filename" }, { "struct __kernel_old_timeval *", "utimes" } } },
{ 272, "fadvise64_64", 6, { { "int", "fd" }, { "__u32", "offset_low" }, { "__u32", "offset_high" }, { "__u32", "len_low" }, { "__u32", "len_high" }, { "int", "advice" } } },
{ 274, "mbind", 6, { { "unsigned long", "start" }, { "unsigned long", "len" }, { "unsigned long", "mode" }, { "const unsigned long *", "nmask" }, { "unsigned long", "maxnode" }, { "unsigned int", "flags" } } },
{ 275, "get_mempolicy", 5, { { "int *", "policy" }, { "unsigned long *", "nmask" }, { "unsigned long", "maxnode" }, { "unsigned long", "addr" }, { "unsigned long", "flags" } } },
{ 276, "set_mempolicy", 3, { { "int", "mode" }, { "const unsigned long *", "nmask" }, { "unsigned long", "maxnode" } } },
{ 277, "mq_open", 4, { { "const char *", "u_name" }, { "int", "oflag" }, { "umode_t", "mode" }, { "struct mq_attr *", "u_attr" } } },
{ 278, "mq_unlink", 1, { { "const char *", "u_name" } } },
{ 279, "mq_timedsend", 5, { { "mqd_t", "mqdes" }, { "const char *", "u_msg_ptr" }, { "size_t", "msg_len" }, { "unsigned int", "msg_prio" }, { "const struct __kernel_timespec *", "u_abs_timeout" } } },
{ 280, "mq_timedreceive", 5, { { "mqd_t", "mqdes" }, { "char *", "u_msg_ptr" }, { "size_t", "msg_len" }, { "unsigned int *", "u_msg_prio" }, { "const struct __kernel_timespec *", "u_abs_timeout" } } },
{ 281, "mq_notify", 2, { { "mqd_t", "mqdes" }, { "const struct sigevent *", "u_notification" } } },
{ 282, "mq_getsetattr", 3, { { "mqd_t", "mqdes" }, { "const struct mq_attr *", "u_mqstat" }, { "struct mq_attr *", "u_omqstat" } } },
{ 283, "kexec_load", 4, { { "unsigned long", "entry" }, { "unsigned long", "nr_segments" }, { "struct kexec_segment *", "segments" }, { "unsigned long", "flags" } } },
{ 284, "waitid", 5, { { "int", "which" }, { "pid_t", "upid" }, { "struct siginfo *", "infop" }, { "int", "options" }, { "struct rusage *", "ru" } } },
{ 286, "add_key", 5, { { "const char *", "_type" }, { "const char *", "_description" }, { "const void *", "_payload" }, { "size_t", "plen" }, { "key_serial_t", "ringid" } } },
{ 287, "request_key", 4, { { "const char *", "_type" }, { "const char *", "_description" }, { "const char *", "_callout_info" }, { "key_serial_t", "destringid" } } },
{ 288, "keyctl", 5, { { "int", "option" }, { "unsigned long", "arg2" }, { "unsigned long", "arg3" }, { "unsigned long", "arg4" }, { "unsigned long", "arg5" } } },
{ 289, "ioprio_set", 3, { { "int", "which" }, { "int", "who" }, { "int", "ioprio" } } },
{ 290, "ioprio_get", 2, { { "int", "which" }, { "int", "who" } } },
{ 291, "inotify_init", 0, {} },
{ 292, "inotify_add_watch", 3, { { "int", "fd" }, { "const char *", "pathname" }, { "u32", "mask" } } },
{ 293, "inotify_rm_watch", 2, { { "int", "fd" }, { "__s32", "wd" } } },
{ 294, "migrate_pages", 4, { { "pid_t", "pid" }, { "unsigned long", "maxnode" }, { "const unsigned long *", "old_nodes" }, { "const unsigned long *", "new_nodes" } } },
{ 295, "openat", 4, { { "int", "dfd" }, { "const char *", "filename" }, { "int", "flags" }, { "umode_t", "mode" } } },
{ 296, "mkdirat", 3, { { "int", "dfd" }, { "const char *", "pathname" }, { "umode_t", "mode" } } },
{ 297, "mknodat", 4, { { "int", "dfd" }, { "const char *", "filename" }, { "umode_t", "mode" }, { "unsigned int", "dev" } } },
{ 298, "fchownat", 5, { { "int", "dfd" }, { "const char *", "filename" }, { "uid_t", "user" }, { "gid_t", "group" }, { "int", "flag" } } },
{ 299, "futimesat", 3, { { "int", "dfd" }, { "const char *", "filename" }, { "struct __kernel_old_timeval *", "utimes" } } },
{ 301, "unlinkat", 3, { { "int", "dfd" }, { "const char *", "pathname" }, { "int", "flag" } } },
{ 302, "renameat", 4, { { "int", "olddfd" }, { "const char *", "oldname" }, { "int", "newdfd" }, { "const char *", "newname" } } },
{ 303, "linkat", 5, { { "int", "olddfd" }, { "const char *", "oldname" }, { "int", "newdfd" }, { "const char *", "newname" }, { "int", "flags" } } },
{ 304, "symlinkat", 3, { { "const char *", "oldname" }, { "int", "newdfd" }, { "const char *", "newname" } } },
{ 305, "readlinkat", 4, { { "int", "dfd" }, { "const char *", "pathname" }, { "char *", "buf" }, { "int", "bufsiz" } } },
{ 306, "fchmodat", 3, { { "int", "dfd" }, { "const char *", "filename" }, { "umode_t", "mode" } } },
{ 307, "faccessat", 3, { { "int", "dfd" }, { "const char *", "filename" }, { "int", "mode" } } },
{ 308, "pselect6", 6, { { "int", "n" }, { "fd_set *", "inp" }, { "fd_set *", "outp" }, { "fd_set *", "exp" }, { "struct __kernel_timespec *", "tsp" }, { "void *", "sig" } } },
{ 309, "ppoll", 5, { { "struct pollfd *", "ufds" }, { "unsigned int", "nfds" }, { "struct __kernel_timespec *", "tsp" }, { "const sigset_t *", "sigmask" }, { "size_t", "sigsetsize" } } },
{ 310, "unshare", 1, { { "unsigned long", "unshare_flags" } } },
{ 311, "set_robust_list", 2, { { "struct robust_list_head *", "head" }, { "size_t", "len" } } },
{ 312, "get_robust_list", 3, { { "int", "pid" }, { "struct robust_list_head * *", "head_ptr" }, { "size_t *", "len_ptr" } } },
{ 313, "splice", 6, { { "int", "fd_in" }, { "loff_t *", "off_in" }, { "int", "fd_out" }, { "loff_t *", "off_out" }, { "size_t", "len" }, { "unsigned int", "flags" } } },
{ 314, "sync_file_range", 4, { { "int", "fd" }, { "loff_t", "offset" }, { "loff_t", "nbytes" }, { "unsigned int", "flags" } } },
{ 315, "tee", 4, { { "int", "fdin" }, { "int", "fdout" }, { "size_t", "len" }, { "unsigned int", "flags" } } },
{ 316, "vmsplice", 4, { { "int", "fd" }, { "const struct iovec *", "uiov" }, { "unsigned long", "nr_segs" }, { "unsigned int", "flags" } } },
{ 317, "move_pages", 6, { { "pid_t", "pid" }, { "unsigned long", "nr_pages" }, { "const void * *", "pages" }, { "const int *", "nodes" }, { "int *", "status" }, { "int", "flags" } } },
{ 318, "getcpu", 3, { { "unsigned *", "cpup" }, { "unsigned *", "nodep" }, { "struct getcpu_cache *", "unused" } } },
{ 319, "epoll_pwait", 6, { { "int", "epfd" }, { "struct epoll_event *", "events" }, { "int", "maxevents" }, { "int", "timeout" }, { "const sigset_t *", "sigmask" }, { "size_t", "sigsetsize" } } },
{ 320, "utimensat", 4, { { "int", "dfd" }, { "const char *", "filename" }, { "struct __kernel_timespec *", "utimes" }, { "int", "flags" } } },
{ 321, "signalfd", 3, { { "int", "ufd" }, { "sigset_t *", "user_mask" }, { "size_t", "sizemask" } } },
{ 322, "timerfd_create", 2, { { "int", "clockid" }, { "int", "flags" } } },
{ 323, "eventfd", 1, { { "unsigned int", "count" } } },
{ 324, "fallocate", 4, { { "int", "fd" }, { "int", "mode" }, { "loff_t", "offset" }, { "loff_t", "len" } } },
{ 325, "timerfd_settime", 4, { { "int", "ufd" }, { "int", "flags" }, { "const struct __kernel_itimerspec *", "utmr" }, { "struct __kernel_itimerspec *", "otmr" } } },
{ 326, "timerfd_gettime", 2, { { "int", "ufd" }, { "struct __kernel_itimerspec *", "otmr" } } },
{ 327, "signalfd4", 4, { { "int", "ufd" }, { "sigset_t *", "user_mask" }, { "size_t", "sizemask" }, { "int", "flags" } } },
{ 328, "eventfd2", 2, { { "unsigned int", "count" }, { "int", "flags" } } },
{ 329, "epoll_create1", 1, { { "int", "flags" } } },
{ 330, "dup3", 3, { { "unsigned int", "oldfd" }, { "unsigned int", "newfd" }, { "int", "flags" } } },
{ 331, "pipe2", 2, { { "int *", "fildes" }, { "int", "flags" } } },
{ 332, "inotify_init1", 1, { { "int", "flags" } } },
{ 333, "preadv", 5, { { "unsigned long", "fd" }, { "const struct iovec *", "vec" }, { "unsigned long", "vlen" }, { "unsigned long", "pos_l" }, { "unsigned long", "pos_h" } } },
{ 334, "pwritev", 5, { { "unsigned long", "fd" }, { "const struct iovec *", "vec" }, { "unsigned long", "vlen" }, { "unsigned long", "pos_l" }, { "unsigned long", "pos_h" } } },
{ 335, "rt_tgsigqueueinfo", 4, { { "pid_t", "tgid" }, { "pid_t", "pid" }, { "int", "sig" }, { "siginfo_t *", "uinfo" } } },
{ 336, "perf_event_open", 5, { { "struct perf_event_attr *", "attr_uptr" }, { "pid_t", "pid" }, { "int", "cpu" }, { "int", "group_fd" }, { "unsigned long", "flags" } } },
{ 337, "recvmmsg", 5, { { "int", "fd" }, { "struct mmsghdr *", "mmsg" }, { "unsigned int", "vlen" }, { "unsigned int", "flags" }, { "struct __kernel_timespec *", "timeout" } } },
{ 338, "fanotify_init", 2, { { "unsigned int", "flags" }, { "unsigned int", "event_f_flags" } } },
{ 339, "fanotify_mark", 5, { { "int", "fanotify_fd" }, { "unsigned int", "flags" }, { "__u64", "mask" }, { "int", "dfd" }, { "const char *", "pathname" } } },
{ 340, "prlimit64", 4, { { "pid_t", "pid" }, { "unsigned int", "resource" }, { "const struct rlimit64 *", "new_rlim" }, { "struct rlimit64 *", "old_rlim" } } },
{ 341, "name_to_handle_at", 5, { { "int", "dfd" }, { "const char *", "name" }, { "struct file_handle *", "handle" }, { "void *", "mnt_id" }, { "int", "flag" } } },
{ 342, "open_by_handle_at", 3, { { "int", "mountdirfd" }, { "struct file_handle *", "handle" }, { "int", "flags" } } },
{ 343, "clock_adjtime", 2, { { "const clockid_t", "which_clock" }, { "struct __kernel_timex *", "utx" } } },
{ 344, "syncfs", 1, { { "int", "fd" } } },
{ 345, "sendmmsg", 4, { { "int", "fd" }, { "struct mmsghdr *", "mmsg" }, { "unsigned int", "vlen" }, { "unsigned int", "flags" } } },
{ 346, "setns", 2, { { "int", "fd" }, { "int", "flags" } } },
{ 347, "process_vm_readv", 6, { { "pid_t", "pid" }, { "const struct iovec *", "lvec" }, { "unsigned long", "liovcnt" }, { "const struct iovec *", "rvec" }, { "unsigned long", "riovcnt" }, { "unsigned long", "flags" } } },
{ 348, "process_vm_writev", 6, { { "pid_t", "pid" }, { "const struct iovec *", "lvec" }, { "unsigned long", "liovcnt" }, { "const struct iovec *", "rvec" }, { "unsigned long", "riovcnt" }, { "unsigned long", "flags" } } },
{ 349, "kcmp", 5, { { "pid_t", "pid1" }, { "pid_t", "pid2" }, { "int", "type" }, { "unsigned long", "idx1" }, { "unsigned long", "idx2" } } },
{ 350, "finit_module", 3, { { "int", "fd" }, { "const char *", "uargs" }, { "int", "flags" } } },
{ 351, "sched_setattr", 3, { { "pid_t", "pid" }, { "struct sched_attr *", "uattr" }, { "unsigned int", "flags" } } },
{ 352, "sched_getattr", 4, { { "pid_t", "pid" }, { "struct sched_attr *", "uattr" }, { "unsigned int", "usize" }, { "unsigned int", "flags" } } },
{ 353, "renameat2", 5, { { "int", "olddfd" }, { "const char *", "oldname" }, { "int", "newdfd" }, { "const char *", "newname" }, { "unsigned int", "flags" } } },
{ 354, "seccomp", 3, { { "unsigned int", "op" }, { "unsigned int", "flags" }, { "void *", "uargs" } } },
{ 355, "getrandom", 3, { { "char *", "ubuf" }, { "size_t", "len" }, { "unsigned int", "flags" } } },
{ 356, "memfd_create", 2, { { "const char *", "uname" }, { "unsigned int", "flags" } } },
{ 357, "bpf", 3, { { "int", "cmd" }, { "union bpf_attr *", "uattr" }, { "unsigned int", "size" } } },
{ 358, "execveat", 5, { { "int", "fd" }, { "const char *", "filename" }, { "const char *const *", "argv" }, { "const char *const *", "envp" }, { "int", "flags" } } },
{ 359, "socket", 3, { { "int", "family" }, { "int", "type" }, { "int", "protocol" } } },
{ 360, "socketpair", 4, { { "int", "family" }, { "int", "type" }, { "int", "protocol" }, { "int *", "usockvec" } } },
{ 361, "bind", 3, { { "int", "fd" }, { "struct sockaddr *", "umyaddr" }, { "int", "addrlen" } } },
{ 362, "connect", 3, { { "int", "fd" }, { "struct sockaddr *", "uservaddr" }, { "int", "addrlen" } } },
{ 363, "listen", 2, { { "int", "fd" }, { "int", "backlog" } } },
{ 364, "accept4", 4, { { "int", "fd" }, { "struct sockaddr *", "upeer_sockaddr" }, { "int *", "upeer_addrlen" }, { "int", "flags" } } },
{ 365, "getsockopt", 5, { { "int", "fd" }, { "int", "level" }, { "int", "optname" }, { "char *", "optval" }, { "int *", "optlen" } } },
{ 366, "setsockopt", 5, { { "int", "fd" }, { "int", "level" }, { "int", "optname" }, { "char *", "optval" }, { "int", "optlen" } } },
{ 367, "getsockname", 3, { { "int", "fd" }, { "struct sockaddr *", "usockaddr" }, { "int *", "usockaddr_len" } } },
{ 368, "getpeername", 3, { { "int", "fd" }, { "struct sockaddr *", "usockaddr" }, { "int *", "usockaddr_len" } } },
{ 369, "sendto", 6, { { "int", "fd" }, { "void *", "buff" }, { "size_t", "len" }, { "unsigned int", "flags" }, { "struct sockaddr *", "addr" }, { "int", "addr_len" } } },
{ 370, "sendmsg", 3, { { "int", "fd" }, { "struct user_msghdr *", "msg" }, { "unsigned int", "flags" } } },
{ 371, "recvfrom", 6, { { "int", "fd" }, { "void *", "ubuf" }, { "size_t", "size" }, { "unsigned int", "flags" }, { "struct sockaddr *", "addr" }, { "int *", "addr_len" } } },
{ 372, "recvmsg", 3, { { "int", "fd" }, { "struct user_msghdr *", "msg" }, { "unsigned int", "flags" } } },
{ 373, "shutdown", 2, { { "int", "fd" }, { "int", "how" } } },
{ 374, "userfaultfd", 1, { { "int", "flags" } } },
{ 375, "membarrier", 3, { { "int", "cmd" }, { "unsigned int", "flags" }, { "int", "cpu_id" } } },
{ 376, "mlock2", 3, { { "unsigned long", "start" }, { "size_t", "len" }, { "int", "flags" } } },
{ 377, "copy_file_range", 6, { { "int", "fd_in" }, { "loff_t *", "off_in" }, { "int", "fd_out" }, { "loff_t *", "off_out" }, { "size_t", "len" }, { "unsigned int", "flags" } } },
{ 378, "preadv2", 6, { { "unsigned long", "fd" }, { "const struct iovec *", "vec" }, { "unsigned long", "vlen" }, { "unsigned long", "pos_l" }, { "unsigned long", "pos_h" }, { "rwf_t", "flags" } } },
{ 379, "pwritev2", 6, { { "unsigned long", "fd" }, { "const struct iovec *", "vec" }, { "unsigned long", "vlen" }, { "unsigned long", "pos_l" }, { "unsigned long", "pos_h" }, { "rwf_t", "flags" } } },
{ 380, "pkey_mprotect", 4, { { "unsigned long", "start" }, { "size_t", "len" }, { "unsigned long", "prot" }, { "int", "pkey" } } },
{ 381, "pkey_alloc", 2, { { "unsigned long", "flags" }, { "unsigned long", "init_val" } } },
{ 382, "pkey_free", 1, { { "int", "pkey" } } },
{ 383, "statx", 5, { { "int", "dfd" }, { "const char *", "filename" }, { "unsigned", "flags" }, { "unsigned int", "mask" }, { "struct statx *", "buffer" } } },
{ 384, "arch_prctl", 2, { { "int", "option" }, { "unsigned long", "arg2" } } },
{ 385, "io_pgetevents", 6, { { "aio_context_t", "ctx_id" }, { "long", "min_nr" }, { "long", "nr" }, { "struct io_event *", "events" }, { "struct __kernel_timespec *", "timeout" }, { "const struct __aio_sigset *", "usig" } } },
{ 386, "rseq", 4, { { "struct rseq *", "rseq" }, { "u32", "rseq_len" }, { "int", "flags" }, { "u32", "sig" } } },
{ 393, "semget", 3, { { "key_t", "key" }, { "int", "nsems" }, { "int", "semflg" } } },
{ 394, "semctl", 4, { { "int", "semid" }, { "int", "semnum" }, { "int", "cmd" }, { "unsigned long", "arg" } } },
{ 395, "shmget", 3, { { "key_t", "key" }, { "size_t", "size" }, { "int", "shmflg" } } },
{ 396, "shmctl", 3, { { "int", "shmid" }, { "int", "cmd" }, { "struct shmid_ds *", "buf" } } },
{ 397, "shmat", 3, { { "int", "shmid" }, { "char *", "shmaddr" }, { "int", "shmflg" } } },
{ 398, "shmdt", 1, { { "char *", "shmaddr" } } },
{ 399, "msgget", 2, { { "key_t", "key" }, { "int", "msgflg" } } },
{ 400, "msgsnd", 4, { { "int", "msqid" }, { "struct msgbuf *", "msgp" }, { "size_t", "msgsz" }, { "int", "msgflg" } } },
{ 401, "msgrcv", 5, { { "int", "msqid" }, { "struct msgbuf *", "msgp" }, { "size_t", "msgsz" }, { "long", "msgtyp" }, { "int", "msgflg" } } },
{ 402, "msgctl", 3, { { "int", "msqid" }, { "int", "cmd" }, { "struct msqid_ds *", "buf" } } },
{ 403, "clock_gettime64", 2, { { "clockid_t", "which_clock" }, { "struct __kernel_timespec *", "tp" } } },
{ 404, "clock_settime64", 2, { { "clockid_t", "which_clock" }, { "const struct __kernel_timespec *", "tp" } } },
{ 405, "clock_adjtime64", 2, { { "clockid_t", "which_clock" }, { "struct __kernel_timex *", "tx" } } },
{ 406, "clock_getres_time64", 2, { { "clockid_t", "which_clock" }, { "struct __kernel_timespec *", "tp" } } },
{ 407, "clock_nanosleep_time64", 4, { { "clockid_t", "which_clock" }, { "int", "flags" }, { "const struct __kernel_timespec *", "rqtp" }, { "struct __kernel_timespec *", "rmtp" } } },
{ 408, "timer_gettime64", 2, { { "timer_t", "timer_id" }, { "struct __kernel_itimerspec *", "setting" } } },
{ 409, "timer_settime64", 4, { { "timer_t", "timer_id" }, { "int", "flags" }, { "const struct __kernel_itimerspec *", "new_setting" }, { "struct __kernel_itimerspec *", "old_setting" } } },
{ 410, "timerfd_gettime64", 2, { { "int", "ufd" }, { "struct __kernel_itimerspec *", "otmr" } } },
{ 411, "timerfd_settime64", 4, { { "int", "ufd" }, { "int", "flags" }, { "const struct __kernel_itimerspec *", "utmr" }, { "struct __kernel_itimerspec *", "otmr" } } },
{ 412, "utimensat_time64", 4, { { "int", "dfd" }, { "const char *", "filename" }, { "struct __kernel_timespec *", "utimes" }, { "int", "flags" } } },
{ 413, "pselect6_time64", 6, { { "int", "arg0" }, { "fd_set *", "arg1" }, { "fd_set *", "arg2" }, { "fd_set *", "arg3" }, { "struct __kernel_timespec *", "arg4" }, { "void *", "arg5" } } },
{ 414, "ppoll_time64", 5, { { "struct pollfd *", "arg0" }, { "unsigned", "int" }, { "struct __kernel_timespec *", "arg2" }, { "const sigset_t *", "arg3" }, { "size_t", "arg4" } } },
{ 416, "io_pgetevents_time64", 6, { { "aio_context_t", "ctx_id" }, { "long", "min_nr" }, { "long", "nr" }, { "struct io_event *", "events" }, { "struct __kernel_timespec *", "timeout" }, { "const struct __aio_sigset *", "sig" } } },
{ 417, "recvmmsg_time64", 5, { { "int", "fd" }, { "struct compat_mmsghdr *", "mmsg" }, { "unsigned int", "vlen" }, { "unsigned int", "flags" }, { "struct __kernel_timespec *", "timeout" } } },
{ 418, "mq_timedsend_time64", 5, { { "mqd_t", "mqdes" }, { "const char *", "msg_ptr" }, { "size_t", "msg_len" }, { "unsigned int", "msg_prio" }, { "const struct __kernel_timespec *", "abs_timeout" } } },
{ 419, "mq_timedreceive_time64", 5, { { "mqd_t", "mqdes" }, { "char *", "msg_ptr" }, { "size_t", "msg_len" }, { "unsigned int *", "msg_prio" }, { "const struct __kernel_timespec *", "abs_timeout" } } },
{ 420, "semtimedop_time64", 4, { { "int", "semid" }, { "struct sembuf *", "sops" }, { "unsigned", "nsops" }, { "const struct __kernel_timespec *", "timeout" } } },
{ 421, "rt_sigtimedwait_time64", 4, { { "const sigset_t *", "uthese" }, { "siginfo_t *", "uinfo" }, { "const struct __kernel_timespec *", "uts" }, { "size_t", "sigsetsize" } } },
{ 422, "futex_time64", 6, { { "u32 *", "uaddr" }, { "int", "op" }, { "u32", "val" }, { "const struct __kernel_timespec *", "utime" }, { "u32 *", "uaddr2" }, { "u32", "val3" } } },
{ 423, "sched_rr_get_interval_time64", 2, { { "pid_t", "pid" }, { "struct __kernel_timespec *", "interval" } } },
{ 424, "pidfd_send_signal", 4, { { "int", "pidfd" }, { "int", "sig" }, { "siginfo_t *", "info" }, { "unsigned int", "flags" } } },
{ 425, "io_uring_setup", 2, { { "u32", "entries" }, { "struct io_uring_params *", "params" } } },
{ 426, "io_uring_enter", 6, { { "unsigned int", "fd" }, { "u32", "to_submit" }, { "u32", "min_complete" }, { "u32", "flags" }, { "const void *", "argp" }, { "size_t", "argsz" } } },
{ 427, "io_uring_register", 4, { { "unsigned int", "fd" }, { "unsigned int", "opcode" }, { "void *", "arg" }, { "unsigned int", "nr_args" } } },
{ 428, "open_tree", 3, { { "int", "dfd" }, { "const char *", "filename" }, { "unsigned", "flags" } } },
{ 429, "move_mount", 5, { { "int", "from_dfd" }, { "const char *", "from_pathname" }, { "int", "to_dfd" }, { "const char *", "to_pathname" }, { "unsigned int", "flags" } } },
{ 430, "fsopen", 2, { { "const char *", "_fs_name" }, { "unsigned int", "flags" } } },
{ 431, "fsconfig", 5, { { "int", "fd" }, { "unsigned int", "cmd" }, { "const char *", "_key" }, { "const void *", "_value" }, { "int", "aux" } } },
{ 432, "fsmount", 3, { { "int", "fs_fd" }, { "unsigned int", "flags" }, { "unsigned int", "attr_flags" } } },
{ 433, "fspick", 3, { { "int", "dfd" }, { "const char *", "path" }, { "unsigned int", "flags" } } },
{ 434, "pidfd_open", 2, { { "pid_t", "pid" }, { "unsigned int", "flags" } } },
{ 435, "clone3", 2, { { "struct clone_args *", "uargs" }, { "size_t", "size" } } },
{ 436, "close_range", 3, { { "unsigned int", "fd" }, { "unsigned int", "max_fd" }, { "unsigned int", "flags" } } },
{ 437, "openat2", 4, { { "int", "dfd" }, { "const char *", "filename" }, { "struct open_how *", "how" }, { "size_t", "usize" } } },
{ 438, "pidfd_getfd", 3, { { "int", "pidfd" }, { "int", "fd" }, { "unsigned int", "flags" } } },
{ 439, "faccessat2", 4, { { "int", "dfd" }, { "const char *", "filename" }, { "int", "mode" }, { "int", "flags" } } },
{ 440, "process_madvise", 5, { { "int", "pidfd" }, { "const struct iovec *", "vec" }, { "size_t", "vlen" }, { "int", "behavior" }, { "unsigned int", "flags" } } },
{ 441, "epoll_pwait2", 6, { { "int", "epfd" }, { "struct epoll_event *", "events" }, { "int", "maxevents" }, { "const struct __kernel_timespec *", "timeout" }, { "const sigset_t *", "sigmask" }, { "size_t", "sigsetsize" } } },
{ 442, "mount_setattr", 5, { { "int", "dfd" }, { "const char *", "path" }, { "unsigned int", "flags" }, { "struct mount_attr *", "uattr" }, { "size_t", "usize" } } },
{ 443, "quotactl_fd", 4, { { "unsigned int", "fd" }, { "unsigned int", "cmd" }, { "qid_t", "id" }, { "void *", "addr" } } },
{ 444, "landlock_create_ruleset", 3, { { "const struct landlock_ruleset_attr *const", "attr" }, { "const size_t", "size" }, { "const __u32", "flags" } } },
{ 445, "landlock_add_rule", 4, { { "const int", "ruleset_fd" }, { "const enum landlock_rule_type", "rule_type" }, { "const void *const", "rule_attr" }, { "const __u32", "flags" } } },
{ 446, "landlock_restrict_self", 2, { { "const int", "ruleset_fd" }, { "const __u32", "flags" } } },
{ 447, "memfd_secret", 1, { { "unsigned int", "flags" } } },
{ 448, "process_mrelease", 2, { { "int", "pidfd" }, { "unsigned int", "flags" } } },
{ 449, "futex_waitv", 5, { { "struct futex_waitv *", "waiters" }, { "unsigned int", "nr_futexes" }, { "unsigned int", "flags" }, { "struct __kernel_timespec *", "timeout" }, { "clockid_t", "clockid" } } },
{ 450, "set_mempolicy_home_node", 4, { { "unsigned long", "start" }, { "unsigned long", "len" }, { "unsigned long", "home_node" }, { "unsigned long", "flags" } } },
{ 451, "cachestat", 4, { { "unsigned int", "fd" }, { "struct cachestat_range *", "cstat_range" }, { "struct cachestat *", "cstat" }, { "unsigned int", "flags" } } },
{ 452, "fchmodat2", 4, { { "int", "dfd" }, { "const char *", "filename" }, { "umode_t", "mode" }, { "unsigned int", "flags" } } },
{ 453, "map_shadow_stack", 3, { { "unsigned long", "addr" }, { "unsigned long", "size" }, { "unsigned int", "flags" } } },
{ 454, "futex_wake", 4, { { "void *", "uaddr" }, { "unsigned long", "mask" }, { "int", "nr" }, { "unsigned int", "flags" } } },
{ 455, "futex_wait", 6, { { "void *", "uaddr" }, { "unsigned long", "val" }, { "unsigned long", "mask" }, { "unsigned int", "flags" }, { "struct __kernel_timespec *", "timeout" }, { "clockid_t", "clockid" } } },
{ 456, "futex_requeue", 4, { { "struct futex_waitv *", "waiters" }, { "unsigned int", "flags" }, { "int", "nr_wake" }, { "int", "nr_requeue" } } },
{ 457, "statmount", 4, { { "const struct mnt_id_req *", "req" }, { "struct statmount *", "buf" }, { "size_t", "bufsize" }, { "unsigned int", "flags" } } },
{ 458, "listmount", 4, { { "const struct mnt_id_req *", "req" }, { "u64 *", "mnt_ids" }, { "size_t", "nr_mnt_ids" }, { "unsigned int", "flags" } } },
{ 459, "lsm_get_self_attr", 4, { { "unsigned int", "attr" }, { "struct lsm_ctx *", "ctx" }, { "u32 *", "size" }, { "u32", "flags" } } },
{ 460, "lsm_set_self_attr", 4, { { "unsigned int", "attr" }, { "struct lsm_ctx *", "ctx" }, { "u32", "size" }, { "u32", "flags" } } },
{ 461, "lsm_list_modules", 3, { { "u64 *", "ids" }, { "u32 *", "size" }, { "u32", "flags" } } },
{ 462, "mseal", 3, { { "unsigned long", "start" }, { "size_t", "len" }, { "unsigned long", "flags" } } },
{ 463, "setxattrat", 6, { { "int", "dfd" }, { "const char *", "pathname" }, { "unsigned int", "at_flags" }, { "const char *", "name" }, { "const struct xattr_args *", "uargs" }, { "size_t", "usize" } } },
{ 464, "getxattrat", 6, { { "int", "dfd" }, { "const char *", "pathname" }, { "unsigned int", "at_flags" }, { "const char *", "name" }, { "struct xattr_args *", "uargs" }, { "size_t", "usize" } } },
{ 465, "listxattrat", 5, { { "int", "dfd" }, { "const char *", "pathname" }, { "unsigned int", "at_flags" }, { "char *", "list" }, { "size_t", "size" } } },
{ 466, "removexattrat", 4, { { "int", "dfd" }, { "const char *", "pathname" }, { "unsigned int", "at_flags" }, { "const char *", "name" } } },
{ 467, "open_tree_attr", 5, { { "int", "dfd" }, { "const char *", "filename" }, { "unsigned", "flags" }, { "struct mount_attr *", "uattr" }, { "size_t", "usize" } } },
{ 468, "file_getattr", 5, { { "int", "dfd" }, { "const char *", "filename" }, { "struct file_attr *", "ufattr" }, { "size_t", "usize" }, { "unsigned int", "at_flags" } } },
{ 469, "file_setattr", 5, { { "int", "dfd" }, { "const char *", "filename" }, { "struct file_attr *", "ufattr" }, { "size_t", "usize" }, { "unsigned int", "at_flags" } } },
{ 470, "listns", 4, { { "const struct ns_id_req *", "req" }, { "u64 *", "ns_ids" }, { "size_t", "nr_ns_ids" }, { "unsigned int", "flags" } } },
};
FridaLinuxSyscallSignature *
frida_get_syscall_signatures (int * len)
{
if (len != NULL)
*len = G_N_ELEMENTS (frida_syscall_signatures);
return (FridaLinuxSyscallSignature *) frida_syscall_signatures;
}
FridaLinuxSyscallSignature *
frida_get_compat32_syscall_signatures (int * len)
{
if (len != NULL)
*len = 0;
return NULL;
}
+442
View File
@@ -0,0 +1,442 @@
// AUTO-GENERATED FILE. DO NOT EDIT.
namespace Frida {
public enum LinuxSyscall {
RESTART_SYSCALL = 0,
EXIT = 1,
FORK = 2,
READ = 3,
WRITE = 4,
OPEN = 5,
CLOSE = 6,
WAITPID = 7,
CREAT = 8,
LINK = 9,
UNLINK = 10,
EXECVE = 11,
CHDIR = 12,
TIME = 13,
MKNOD = 14,
CHMOD = 15,
LCHOWN = 16,
OLDSTAT = 18,
LSEEK = 19,
GETPID = 20,
MOUNT = 21,
UMOUNT = 22,
SETUID = 23,
GETUID = 24,
STIME = 25,
PTRACE = 26,
ALARM = 27,
OLDFSTAT = 28,
PAUSE = 29,
UTIME = 30,
ACCESS = 33,
NICE = 34,
SYNC = 36,
KILL = 37,
RENAME = 38,
MKDIR = 39,
RMDIR = 40,
DUP = 41,
PIPE = 42,
TIMES = 43,
BRK = 45,
SETGID = 46,
GETGID = 47,
SIGNAL = 48,
GETEUID = 49,
GETEGID = 50,
ACCT = 51,
UMOUNT2 = 52,
IOCTL = 54,
FCNTL = 55,
SETPGID = 57,
OLDOLDUNAME = 59,
UMASK = 60,
CHROOT = 61,
USTAT = 62,
DUP2 = 63,
GETPPID = 64,
GETPGRP = 65,
SETSID = 66,
SIGACTION = 67,
SGETMASK = 68,
SSETMASK = 69,
SETREUID = 70,
SETREGID = 71,
SIGSUSPEND = 72,
SIGPENDING = 73,
SETHOSTNAME = 74,
SETRLIMIT = 75,
GETRLIMIT = 76,
GETRUSAGE = 77,
GETTIMEOFDAY = 78,
SETTIMEOFDAY = 79,
GETGROUPS = 80,
SETGROUPS = 81,
SELECT = 82,
SYMLINK = 83,
OLDLSTAT = 84,
READLINK = 85,
USELIB = 86,
SWAPON = 87,
REBOOT = 88,
READDIR = 89,
MMAP = 90,
MUNMAP = 91,
TRUNCATE = 92,
FTRUNCATE = 93,
FCHMOD = 94,
FCHOWN = 95,
GETPRIORITY = 96,
SETPRIORITY = 97,
STATFS = 99,
FSTATFS = 100,
IOPERM = 101,
SOCKETCALL = 102,
SYSLOG = 103,
SETITIMER = 104,
GETITIMER = 105,
STAT = 106,
LSTAT = 107,
FSTAT = 108,
OLDUNAME = 109,
IOPL = 110,
VHANGUP = 111,
VM86OLD = 113,
WAIT4 = 114,
SWAPOFF = 115,
SYSINFO = 116,
IPC = 117,
FSYNC = 118,
CLONE = 120,
SETDOMAINNAME = 121,
UNAME = 122,
MODIFY_LDT = 123,
ADJTIMEX = 124,
MPROTECT = 125,
SIGPROCMASK = 126,
INIT_MODULE = 128,
DELETE_MODULE = 129,
QUOTACTL = 131,
GETPGID = 132,
FCHDIR = 133,
BDFLUSH = 134,
SYSFS = 135,
PERSONALITY = 136,
SETFSUID = 138,
SETFSGID = 139,
_LLSEEK = 140,
GETDENTS = 141,
_NEWSELECT = 142,
FLOCK = 143,
MSYNC = 144,
READV = 145,
WRITEV = 146,
GETSID = 147,
FDATASYNC = 148,
_SYSCTL = 149,
MLOCK = 150,
MUNLOCK = 151,
MLOCKALL = 152,
MUNLOCKALL = 153,
SCHED_SETPARAM = 154,
SCHED_GETPARAM = 155,
SCHED_SETSCHEDULER = 156,
SCHED_GETSCHEDULER = 157,
SCHED_YIELD = 158,
SCHED_GET_PRIORITY_MAX = 159,
SCHED_GET_PRIORITY_MIN = 160,
SCHED_RR_GET_INTERVAL = 161,
NANOSLEEP = 162,
MREMAP = 163,
SETRESUID = 164,
GETRESUID = 165,
VM86 = 166,
POLL = 168,
SETRESGID = 170,
GETRESGID = 171,
PRCTL = 172,
RT_SIGRETURN = 173,
RT_SIGACTION = 174,
RT_SIGPROCMASK = 175,
RT_SIGPENDING = 176,
RT_SIGTIMEDWAIT = 177,
RT_SIGQUEUEINFO = 178,
RT_SIGSUSPEND = 179,
PREAD64 = 180,
PWRITE64 = 181,
CHOWN = 182,
GETCWD = 183,
CAPGET = 184,
CAPSET = 185,
SIGALTSTACK = 186,
SENDFILE = 187,
VFORK = 190,
UGETRLIMIT = 191,
MMAP2 = 192,
TRUNCATE64 = 193,
FTRUNCATE64 = 194,
LCHOWN32 = 198,
GETUID32 = 199,
GETGID32 = 200,
GETEUID32 = 201,
GETEGID32 = 202,
SETREUID32 = 203,
SETREGID32 = 204,
GETGROUPS32 = 205,
SETGROUPS32 = 206,
FCHOWN32 = 207,
SETRESUID32 = 208,
GETRESUID32 = 209,
SETRESGID32 = 210,
GETRESGID32 = 211,
CHOWN32 = 212,
SETUID32 = 213,
SETGID32 = 214,
SETFSUID32 = 215,
SETFSGID32 = 216,
PIVOT_ROOT = 217,
MINCORE = 218,
MADVISE = 219,
GETDENTS64 = 220,
FCNTL64 = 221,
GETTID = 224,
READAHEAD = 225,
SETXATTR = 226,
LSETXATTR = 227,
FSETXATTR = 228,
GETXATTR = 229,
LGETXATTR = 230,
FGETXATTR = 231,
LISTXATTR = 232,
LLISTXATTR = 233,
FLISTXATTR = 234,
REMOVEXATTR = 235,
LREMOVEXATTR = 236,
FREMOVEXATTR = 237,
TKILL = 238,
SENDFILE64 = 239,
FUTEX = 240,
SCHED_SETAFFINITY = 241,
SCHED_GETAFFINITY = 242,
SET_THREAD_AREA = 243,
GET_THREAD_AREA = 244,
IO_SETUP = 245,
IO_DESTROY = 246,
IO_GETEVENTS = 247,
IO_SUBMIT = 248,
IO_CANCEL = 249,
FADVISE64 = 250,
EXIT_GROUP = 252,
EPOLL_CREATE = 254,
EPOLL_CTL = 255,
EPOLL_WAIT = 256,
REMAP_FILE_PAGES = 257,
SET_TID_ADDRESS = 258,
TIMER_CREATE = 259,
TIMER_SETTIME = 260,
TIMER_GETTIME = 261,
TIMER_GETOVERRUN = 262,
TIMER_DELETE = 263,
CLOCK_SETTIME = 264,
CLOCK_GETTIME = 265,
CLOCK_GETRES = 266,
CLOCK_NANOSLEEP = 267,
STATFS64 = 268,
FSTATFS64 = 269,
TGKILL = 270,
UTIMES = 271,
FADVISE64_64 = 272,
MBIND = 274,
GET_MEMPOLICY = 275,
SET_MEMPOLICY = 276,
MQ_OPEN = 277,
MQ_UNLINK = 278,
MQ_TIMEDSEND = 279,
MQ_TIMEDRECEIVE = 280,
MQ_NOTIFY = 281,
MQ_GETSETATTR = 282,
KEXEC_LOAD = 283,
WAITID = 284,
ADD_KEY = 286,
REQUEST_KEY = 287,
KEYCTL = 288,
IOPRIO_SET = 289,
IOPRIO_GET = 290,
INOTIFY_INIT = 291,
INOTIFY_ADD_WATCH = 292,
INOTIFY_RM_WATCH = 293,
MIGRATE_PAGES = 294,
OPENAT = 295,
MKDIRAT = 296,
MKNODAT = 297,
FCHOWNAT = 298,
FUTIMESAT = 299,
UNLINKAT = 301,
RENAMEAT = 302,
LINKAT = 303,
SYMLINKAT = 304,
READLINKAT = 305,
FCHMODAT = 306,
FACCESSAT = 307,
PSELECT6 = 308,
PPOLL = 309,
UNSHARE = 310,
SET_ROBUST_LIST = 311,
GET_ROBUST_LIST = 312,
SPLICE = 313,
SYNC_FILE_RANGE = 314,
TEE = 315,
VMSPLICE = 316,
MOVE_PAGES = 317,
GETCPU = 318,
EPOLL_PWAIT = 319,
UTIMENSAT = 320,
SIGNALFD = 321,
TIMERFD_CREATE = 322,
EVENTFD = 323,
FALLOCATE = 324,
TIMERFD_SETTIME = 325,
TIMERFD_GETTIME = 326,
SIGNALFD4 = 327,
EVENTFD2 = 328,
EPOLL_CREATE1 = 329,
DUP3 = 330,
PIPE2 = 331,
INOTIFY_INIT1 = 332,
PREADV = 333,
PWRITEV = 334,
RT_TGSIGQUEUEINFO = 335,
PERF_EVENT_OPEN = 336,
RECVMMSG = 337,
FANOTIFY_INIT = 338,
FANOTIFY_MARK = 339,
PRLIMIT64 = 340,
NAME_TO_HANDLE_AT = 341,
OPEN_BY_HANDLE_AT = 342,
CLOCK_ADJTIME = 343,
SYNCFS = 344,
SENDMMSG = 345,
SETNS = 346,
PROCESS_VM_READV = 347,
PROCESS_VM_WRITEV = 348,
KCMP = 349,
FINIT_MODULE = 350,
SCHED_SETATTR = 351,
SCHED_GETATTR = 352,
RENAMEAT2 = 353,
SECCOMP = 354,
GETRANDOM = 355,
MEMFD_CREATE = 356,
BPF = 357,
EXECVEAT = 358,
SOCKET = 359,
SOCKETPAIR = 360,
BIND = 361,
CONNECT = 362,
LISTEN = 363,
ACCEPT4 = 364,
GETSOCKOPT = 365,
SETSOCKOPT = 366,
GETSOCKNAME = 367,
GETPEERNAME = 368,
SENDTO = 369,
SENDMSG = 370,
RECVFROM = 371,
RECVMSG = 372,
SHUTDOWN = 373,
USERFAULTFD = 374,
MEMBARRIER = 375,
MLOCK2 = 376,
COPY_FILE_RANGE = 377,
PREADV2 = 378,
PWRITEV2 = 379,
PKEY_MPROTECT = 380,
PKEY_ALLOC = 381,
PKEY_FREE = 382,
STATX = 383,
ARCH_PRCTL = 384,
IO_PGETEVENTS = 385,
RSEQ = 386,
SEMGET = 393,
SEMCTL = 394,
SHMGET = 395,
SHMCTL = 396,
SHMAT = 397,
SHMDT = 398,
MSGGET = 399,
MSGSND = 400,
MSGRCV = 401,
MSGCTL = 402,
CLOCK_GETTIME64 = 403,
CLOCK_SETTIME64 = 404,
CLOCK_ADJTIME64 = 405,
CLOCK_GETRES_TIME64 = 406,
CLOCK_NANOSLEEP_TIME64 = 407,
TIMER_GETTIME64 = 408,
TIMER_SETTIME64 = 409,
TIMERFD_GETTIME64 = 410,
TIMERFD_SETTIME64 = 411,
UTIMENSAT_TIME64 = 412,
PSELECT6_TIME64 = 413,
PPOLL_TIME64 = 414,
IO_PGETEVENTS_TIME64 = 416,
RECVMMSG_TIME64 = 417,
MQ_TIMEDSEND_TIME64 = 418,
MQ_TIMEDRECEIVE_TIME64 = 419,
SEMTIMEDOP_TIME64 = 420,
RT_SIGTIMEDWAIT_TIME64 = 421,
FUTEX_TIME64 = 422,
SCHED_RR_GET_INTERVAL_TIME64 = 423,
PIDFD_SEND_SIGNAL = 424,
IO_URING_SETUP = 425,
IO_URING_ENTER = 426,
IO_URING_REGISTER = 427,
OPEN_TREE = 428,
MOVE_MOUNT = 429,
FSOPEN = 430,
FSCONFIG = 431,
FSMOUNT = 432,
FSPICK = 433,
PIDFD_OPEN = 434,
CLONE3 = 435,
CLOSE_RANGE = 436,
OPENAT2 = 437,
PIDFD_GETFD = 438,
FACCESSAT2 = 439,
PROCESS_MADVISE = 440,
EPOLL_PWAIT2 = 441,
MOUNT_SETATTR = 442,
QUOTACTL_FD = 443,
LANDLOCK_CREATE_RULESET = 444,
LANDLOCK_ADD_RULE = 445,
LANDLOCK_RESTRICT_SELF = 446,
MEMFD_SECRET = 447,
PROCESS_MRELEASE = 448,
FUTEX_WAITV = 449,
SET_MEMPOLICY_HOME_NODE = 450,
CACHESTAT = 451,
FCHMODAT2 = 452,
MAP_SHADOW_STACK = 453,
FUTEX_WAKE = 454,
FUTEX_WAIT = 455,
FUTEX_REQUEUE = 456,
STATMOUNT = 457,
LISTMOUNT = 458,
LSM_GET_SELF_ATTR = 459,
LSM_SET_SELF_ATTR = 460,
LSM_LIST_MODULES = 461,
MSEAL = 462,
SETXATTRAT = 463,
GETXATTRAT = 464,
LISTXATTRAT = 465,
REMOVEXATTRAT = 466,
OPEN_TREE_ATTR = 467,
FILE_GETATTR = 468,
FILE_SETATTR = 469,
LISTNS = 470,
}
}
+833
View File
@@ -0,0 +1,833 @@
/* AUTO-GENERATED FILE. DO NOT EDIT. */
#include "frida-base.h"
static const FridaLinuxSyscallSignature frida_syscall_signatures[] =
{
{ 0, "read", 3, { { "unsigned int", "fd" }, { "char *", "buf" }, { "size_t", "count" } } },
{ 1, "write", 3, { { "unsigned int", "fd" }, { "const char *", "buf" }, { "size_t", "count" } } },
{ 2, "open", 3, { { "const char *", "filename" }, { "int", "flags" }, { "umode_t", "mode" } } },
{ 3, "close", 1, { { "unsigned int", "fd" } } },
{ 4, "stat", 2, { { "const char *", "filename" }, { "struct __old_kernel_stat *", "statbuf" } } },
{ 5, "fstat", 2, { { "unsigned int", "fd" }, { "struct __old_kernel_stat *", "statbuf" } } },
{ 6, "lstat", 2, { { "const char *", "filename" }, { "struct __old_kernel_stat *", "statbuf" } } },
{ 7, "poll", 3, { { "struct pollfd *", "ufds" }, { "unsigned int", "nfds" }, { "int", "timeout_msecs" } } },
{ 8, "lseek", 3, { { "unsigned int", "fd" }, { "off_t", "offset" }, { "unsigned int", "whence" } } },
{ 9, "mmap", 6, { { "unsigned long", "addr" }, { "unsigned long", "len" }, { "unsigned long", "prot" }, { "unsigned long", "flags" }, { "unsigned long", "fd" }, { "unsigned long", "off" } } },
{ 10, "mprotect", 3, { { "unsigned long", "start" }, { "size_t", "len" }, { "unsigned long", "prot" } } },
{ 11, "munmap", 2, { { "unsigned long", "addr" }, { "size_t", "len" } } },
{ 12, "brk", 1, { { "unsigned long", "brk" } } },
{ 13, "rt_sigaction", 4, { { "int", "sig" }, { "const struct sigaction *", "act" }, { "struct sigaction *", "oact" }, { "size_t", "sigsetsize" } } },
{ 14, "rt_sigprocmask", 4, { { "int", "how" }, { "sigset_t *", "nset" }, { "sigset_t *", "oset" }, { "size_t", "sigsetsize" } } },
{ 15, "rt_sigreturn", 0, {} },
{ 16, "ioctl", 3, { { "unsigned int", "fd" }, { "unsigned int", "cmd" }, { "unsigned long", "arg" } } },
{ 17, "pread64", 4, { { "unsigned int", "fd" }, { "char *", "buf" }, { "size_t", "count" }, { "loff_t", "pos" } } },
{ 18, "pwrite64", 4, { { "unsigned int", "fd" }, { "const char *", "buf" }, { "size_t", "count" }, { "loff_t", "pos" } } },
{ 19, "readv", 3, { { "unsigned long", "fd" }, { "const struct iovec *", "vec" }, { "unsigned long", "vlen" } } },
{ 20, "writev", 3, { { "unsigned long", "fd" }, { "const struct iovec *", "vec" }, { "unsigned long", "vlen" } } },
{ 21, "access", 2, { { "const char *", "filename" }, { "int", "mode" } } },
{ 22, "pipe", 1, { { "int *", "fildes" } } },
{ 23, "select", 5, { { "int", "n" }, { "fd_set *", "inp" }, { "fd_set *", "outp" }, { "fd_set *", "exp" }, { "struct __kernel_old_timeval *", "tvp" } } },
{ 24, "sched_yield", 0, {} },
{ 25, "mremap", 5, { { "unsigned long", "addr" }, { "unsigned long", "old_len" }, { "unsigned long", "new_len" }, { "unsigned long", "flags" }, { "unsigned long", "new_addr" } } },
{ 26, "msync", 3, { { "unsigned long", "start" }, { "size_t", "len" }, { "int", "flags" } } },
{ 27, "mincore", 3, { { "unsigned long", "start" }, { "size_t", "len" }, { "unsigned char *", "vec" } } },
{ 28, "madvise", 3, { { "unsigned long", "start" }, { "size_t", "len_in" }, { "int", "behavior" } } },
{ 29, "shmget", 3, { { "key_t", "key" }, { "size_t", "size" }, { "int", "shmflg" } } },
{ 30, "shmat", 3, { { "int", "shmid" }, { "char *", "shmaddr" }, { "int", "shmflg" } } },
{ 31, "shmctl", 3, { { "int", "shmid" }, { "int", "cmd" }, { "struct shmid_ds *", "buf" } } },
{ 32, "dup", 1, { { "unsigned int", "fildes" } } },
{ 33, "dup2", 2, { { "unsigned int", "oldfd" }, { "unsigned int", "newfd" } } },
{ 34, "pause", 0, {} },
{ 35, "nanosleep", 2, { { "struct __kernel_timespec *", "rqtp" }, { "struct __kernel_timespec *", "rmtp" } } },
{ 36, "getitimer", 2, { { "int", "which" }, { "struct __kernel_old_itimerval *", "value" } } },
{ 37, "alarm", 1, { { "unsigned int", "seconds" } } },
{ 38, "setitimer", 3, { { "int", "which" }, { "struct __kernel_old_itimerval *", "value" }, { "struct __kernel_old_itimerval *", "ovalue" } } },
{ 39, "getpid", 0, {} },
{ 40, "sendfile", 4, { { "int", "out_fd" }, { "int", "in_fd" }, { "off_t *", "offset" }, { "size_t", "count" } } },
{ 41, "socket", 3, { { "int", "family" }, { "int", "type" }, { "int", "protocol" } } },
{ 42, "connect", 3, { { "int", "fd" }, { "struct sockaddr *", "uservaddr" }, { "int", "addrlen" } } },
{ 43, "accept", 3, { { "int", "fd" }, { "struct sockaddr *", "upeer_sockaddr" }, { "int *", "upeer_addrlen" } } },
{ 44, "sendto", 6, { { "int", "fd" }, { "void *", "buff" }, { "size_t", "len" }, { "unsigned int", "flags" }, { "struct sockaddr *", "addr" }, { "int", "addr_len" } } },
{ 45, "recvfrom", 6, { { "int", "fd" }, { "void *", "ubuf" }, { "size_t", "size" }, { "unsigned int", "flags" }, { "struct sockaddr *", "addr" }, { "int *", "addr_len" } } },
{ 46, "sendmsg", 3, { { "int", "fd" }, { "struct user_msghdr *", "msg" }, { "unsigned int", "flags" } } },
{ 47, "recvmsg", 3, { { "int", "fd" }, { "struct user_msghdr *", "msg" }, { "unsigned int", "flags" } } },
{ 48, "shutdown", 2, { { "int", "fd" }, { "int", "how" } } },
{ 49, "bind", 3, { { "int", "fd" }, { "struct sockaddr *", "umyaddr" }, { "int", "addrlen" } } },
{ 50, "listen", 2, { { "int", "fd" }, { "int", "backlog" } } },
{ 51, "getsockname", 3, { { "int", "fd" }, { "struct sockaddr *", "usockaddr" }, { "int *", "usockaddr_len" } } },
{ 52, "getpeername", 3, { { "int", "fd" }, { "struct sockaddr *", "usockaddr" }, { "int *", "usockaddr_len" } } },
{ 53, "socketpair", 4, { { "int", "family" }, { "int", "type" }, { "int", "protocol" }, { "int *", "usockvec" } } },
{ 54, "setsockopt", 5, { { "int", "fd" }, { "int", "level" }, { "int", "optname" }, { "char *", "optval" }, { "int", "optlen" } } },
{ 55, "getsockopt", 5, { { "int", "fd" }, { "int", "level" }, { "int", "optname" }, { "char *", "optval" }, { "int *", "optlen" } } },
{ 56, "clone", 5, { { "unsigned long", "clone_flags" }, { "unsigned long", "newsp" }, { "int *", "parent_tidptr" }, { "int *", "child_tidptr" }, { "unsigned long", "tls" } } },
{ 57, "fork", 0, {} },
{ 58, "vfork", 0, {} },
{ 59, "execve", 3, { { "const char *", "filename" }, { "const char *const *", "argv" }, { "const char *const *", "envp" } } },
{ 60, "exit", 1, { { "int", "error_code" } } },
{ 61, "wait4", 4, { { "pid_t", "upid" }, { "int *", "stat_addr" }, { "int", "options" }, { "struct rusage *", "ru" } } },
{ 62, "kill", 2, { { "pid_t", "pid" }, { "int", "sig" } } },
{ 63, "uname", 1, { { "struct old_utsname *", "name" } } },
{ 64, "semget", 3, { { "key_t", "key" }, { "int", "nsems" }, { "int", "semflg" } } },
{ 65, "semop", 3, { { "int", "semid" }, { "struct sembuf *", "tsops" }, { "unsigned", "nsops" } } },
{ 66, "semctl", 4, { { "int", "semid" }, { "int", "semnum" }, { "int", "cmd" }, { "unsigned long", "arg" } } },
{ 67, "shmdt", 1, { { "char *", "shmaddr" } } },
{ 68, "msgget", 2, { { "key_t", "key" }, { "int", "msgflg" } } },
{ 69, "msgsnd", 4, { { "int", "msqid" }, { "struct msgbuf *", "msgp" }, { "size_t", "msgsz" }, { "int", "msgflg" } } },
{ 70, "msgrcv", 5, { { "int", "msqid" }, { "struct msgbuf *", "msgp" }, { "size_t", "msgsz" }, { "long", "msgtyp" }, { "int", "msgflg" } } },
{ 71, "msgctl", 3, { { "int", "msqid" }, { "int", "cmd" }, { "struct msqid_ds *", "buf" } } },
{ 72, "fcntl", 3, { { "unsigned int", "fd" }, { "unsigned int", "cmd" }, { "unsigned long", "arg" } } },
{ 73, "flock", 2, { { "unsigned int", "fd" }, { "unsigned int", "cmd" } } },
{ 74, "fsync", 1, { { "unsigned int", "fd" } } },
{ 75, "fdatasync", 1, { { "unsigned int", "fd" } } },
{ 76, "truncate", 2, { { "const char *", "path" }, { "long", "length" } } },
{ 77, "ftruncate", 2, { { "unsigned int", "fd" }, { "off_t", "length" } } },
{ 78, "getdents", 3, { { "unsigned int", "fd" }, { "struct linux_dirent *", "dirent" }, { "unsigned int", "count" } } },
{ 79, "getcwd", 2, { { "char *", "buf" }, { "unsigned long", "size" } } },
{ 80, "chdir", 1, { { "const char *", "filename" } } },
{ 81, "fchdir", 1, { { "unsigned int", "fd" } } },
{ 82, "rename", 2, { { "const char *", "oldname" }, { "const char *", "newname" } } },
{ 83, "mkdir", 2, { { "const char *", "pathname" }, { "umode_t", "mode" } } },
{ 84, "rmdir", 1, { { "const char *", "pathname" } } },
{ 85, "creat", 2, { { "const char *", "pathname" }, { "umode_t", "mode" } } },
{ 86, "link", 2, { { "const char *", "oldname" }, { "const char *", "newname" } } },
{ 87, "unlink", 1, { { "const char *", "pathname" } } },
{ 88, "symlink", 2, { { "const char *", "oldname" }, { "const char *", "newname" } } },
{ 89, "readlink", 3, { { "const char *", "path" }, { "char *", "buf" }, { "int", "bufsiz" } } },
{ 90, "chmod", 2, { { "const char *", "filename" }, { "umode_t", "mode" } } },
{ 91, "fchmod", 2, { { "unsigned int", "fd" }, { "umode_t", "mode" } } },
{ 92, "chown", 3, { { "const char *", "filename" }, { "uid_t", "user" }, { "gid_t", "group" } } },
{ 93, "fchown", 3, { { "unsigned int", "fd" }, { "uid_t", "user" }, { "gid_t", "group" } } },
{ 94, "lchown", 3, { { "const char *", "filename" }, { "uid_t", "user" }, { "gid_t", "group" } } },
{ 95, "umask", 1, { { "int", "mask" } } },
{ 96, "gettimeofday", 2, { { "struct __kernel_old_timeval *", "tv" }, { "struct timezone *", "tz" } } },
{ 97, "getrlimit", 2, { { "unsigned int", "resource" }, { "struct rlimit *", "rlim" } } },
{ 98, "getrusage", 2, { { "int", "who" }, { "struct rusage *", "ru" } } },
{ 99, "sysinfo", 1, { { "struct sysinfo *", "info" } } },
{ 100, "times", 1, { { "struct tms *", "tbuf" } } },
{ 101, "ptrace", 4, { { "long", "request" }, { "long", "pid" }, { "unsigned long", "addr" }, { "unsigned long", "data" } } },
{ 102, "getuid", 0, {} },
{ 103, "syslog", 3, { { "int", "type" }, { "char *", "buf" }, { "int", "len" } } },
{ 104, "getgid", 0, {} },
{ 105, "setuid", 1, { { "uid_t", "uid" } } },
{ 106, "setgid", 1, { { "gid_t", "gid" } } },
{ 107, "geteuid", 0, {} },
{ 108, "getegid", 0, {} },
{ 109, "setpgid", 2, { { "pid_t", "pid" }, { "pid_t", "pgid" } } },
{ 110, "getppid", 0, {} },
{ 111, "getpgrp", 0, {} },
{ 112, "setsid", 0, {} },
{ 113, "setreuid", 2, { { "uid_t", "ruid" }, { "uid_t", "euid" } } },
{ 114, "setregid", 2, { { "gid_t", "rgid" }, { "gid_t", "egid" } } },
{ 115, "getgroups", 2, { { "int", "gidsetsize" }, { "gid_t *", "grouplist" } } },
{ 116, "setgroups", 2, { { "int", "gidsetsize" }, { "gid_t *", "grouplist" } } },
{ 117, "setresuid", 3, { { "uid_t", "ruid" }, { "uid_t", "euid" }, { "uid_t", "suid" } } },
{ 118, "getresuid", 3, { { "uid_t *", "ruidp" }, { "uid_t *", "euidp" }, { "uid_t *", "suidp" } } },
{ 119, "setresgid", 3, { { "gid_t", "rgid" }, { "gid_t", "egid" }, { "gid_t", "sgid" } } },
{ 120, "getresgid", 3, { { "gid_t *", "rgidp" }, { "gid_t *", "egidp" }, { "gid_t *", "sgidp" } } },
{ 121, "getpgid", 1, { { "pid_t", "pid" } } },
{ 122, "setfsuid", 1, { { "uid_t", "uid" } } },
{ 123, "setfsgid", 1, { { "gid_t", "gid" } } },
{ 124, "getsid", 1, { { "pid_t", "pid" } } },
{ 125, "capget", 2, { { "cap_user_header_t", "header" }, { "cap_user_data_t", "dataptr" } } },
{ 126, "capset", 2, { { "cap_user_header_t", "header" }, { "const cap_user_data_t", "data" } } },
{ 127, "rt_sigpending", 2, { { "sigset_t *", "uset" }, { "size_t", "sigsetsize" } } },
{ 128, "rt_sigtimedwait", 4, { { "const sigset_t *", "uthese" }, { "siginfo_t *", "uinfo" }, { "const struct __kernel_timespec *", "uts" }, { "size_t", "sigsetsize" } } },
{ 129, "rt_sigqueueinfo", 3, { { "pid_t", "pid" }, { "int", "sig" }, { "siginfo_t *", "uinfo" } } },
{ 130, "rt_sigsuspend", 2, { { "sigset_t *", "unewset" }, { "size_t", "sigsetsize" } } },
{ 131, "sigaltstack", 2, { { "const stack_t *", "uss" }, { "stack_t *", "uoss" } } },
{ 132, "utime", 2, { { "char *", "filename" }, { "struct utimbuf *", "times" } } },
{ 133, "mknod", 3, { { "const char *", "filename" }, { "umode_t", "mode" }, { "unsigned", "dev" } } },
{ 135, "personality", 1, { { "unsigned int", "personality" } } },
{ 136, "ustat", 2, { { "unsigned", "dev" }, { "struct ustat *", "ubuf" } } },
{ 137, "statfs", 2, { { "const char *", "pathname" }, { "struct statfs *", "buf" } } },
{ 138, "fstatfs", 2, { { "unsigned int", "fd" }, { "struct statfs *", "buf" } } },
{ 139, "sysfs", 3, { { "int", "option" }, { "unsigned long", "arg1" }, { "unsigned long", "arg2" } } },
{ 140, "getpriority", 2, { { "int", "which" }, { "int", "who" } } },
{ 141, "setpriority", 3, { { "int", "which" }, { "int", "who" }, { "int", "niceval" } } },
{ 142, "sched_setparam", 2, { { "pid_t", "pid" }, { "struct sched_param *", "param" } } },
{ 143, "sched_getparam", 2, { { "pid_t", "pid" }, { "struct sched_param *", "param" } } },
{ 144, "sched_setscheduler", 3, { { "pid_t", "pid" }, { "int", "policy" }, { "struct sched_param *", "param" } } },
{ 145, "sched_getscheduler", 1, { { "pid_t", "pid" } } },
{ 146, "sched_get_priority_max", 1, { { "int", "policy" } } },
{ 147, "sched_get_priority_min", 1, { { "int", "policy" } } },
{ 148, "sched_rr_get_interval", 2, { { "pid_t", "pid" }, { "struct __kernel_timespec *", "interval" } } },
{ 149, "mlock", 2, { { "unsigned long", "start" }, { "size_t", "len" } } },
{ 150, "munlock", 2, { { "unsigned long", "start" }, { "size_t", "len" } } },
{ 151, "mlockall", 1, { { "int", "flags" } } },
{ 152, "munlockall", 0, {} },
{ 153, "vhangup", 0, {} },
{ 154, "modify_ldt", 3, { { "int", "func" }, { "void *", "ptr" }, { "unsigned long", "bytecount" } } },
{ 155, "pivot_root", 2, { { "const char *", "new_root" }, { "const char *", "put_old" } } },
{ 156, "_sysctl", 0, {} },
{ 157, "prctl", 5, { { "int", "option" }, { "unsigned long", "arg2" }, { "unsigned long", "arg3" }, { "unsigned long", "arg4" }, { "unsigned long", "arg5" } } },
{ 158, "arch_prctl", 2, { { "int", "option" }, { "unsigned long", "arg2" } } },
{ 159, "adjtimex", 1, { { "struct __kernel_timex *", "txc_p" } } },
{ 160, "setrlimit", 2, { { "unsigned int", "resource" }, { "struct rlimit *", "rlim" } } },
{ 161, "chroot", 1, { { "const char *", "filename" } } },
{ 162, "sync", 0, {} },
{ 163, "acct", 1, { { "const char *", "name" } } },
{ 164, "settimeofday", 2, { { "struct __kernel_old_timeval *", "tv" }, { "struct timezone *", "tz" } } },
{ 165, "mount", 5, { { "char *", "dev_name" }, { "char *", "dir_name" }, { "char *", "type" }, { "unsigned long", "flags" }, { "void *", "data" } } },
{ 166, "umount2", 2, { { "char *", "name" }, { "int", "flags" } } },
{ 167, "swapon", 2, { { "const char *", "specialfile" }, { "int", "swap_flags" } } },
{ 168, "swapoff", 1, { { "const char *", "specialfile" } } },
{ 169, "reboot", 4, { { "int", "magic1" }, { "int", "magic2" }, { "unsigned int", "cmd" }, { "void *", "arg" } } },
{ 170, "sethostname", 2, { { "char *", "name" }, { "int", "len" } } },
{ 171, "setdomainname", 2, { { "char *", "name" }, { "int", "len" } } },
{ 172, "iopl", 1, { { "unsigned int", "level" } } },
{ 173, "ioperm", 3, { { "unsigned long", "from" }, { "unsigned long", "num" }, { "int", "turn_on" } } },
{ 175, "init_module", 3, { { "void *", "umod" }, { "unsigned long", "len" }, { "const char *", "uargs" } } },
{ 176, "delete_module", 2, { { "const char *", "name_user" }, { "unsigned int", "flags" } } },
{ 179, "quotactl", 4, { { "unsigned int", "cmd" }, { "const char *", "special" }, { "qid_t", "id" }, { "void *", "addr" } } },
{ 186, "gettid", 0, {} },
{ 187, "readahead", 3, { { "int", "fd" }, { "loff_t", "offset" }, { "size_t", "count" } } },
{ 188, "setxattr", 5, { { "const char *", "pathname" }, { "const char *", "name" }, { "const void *", "value" }, { "size_t", "size" }, { "int", "flags" } } },
{ 189, "lsetxattr", 5, { { "const char *", "pathname" }, { "const char *", "name" }, { "const void *", "value" }, { "size_t", "size" }, { "int", "flags" } } },
{ 190, "fsetxattr", 5, { { "int", "fd" }, { "const char *", "name" }, { "const void *", "value" }, { "size_t", "size" }, { "int", "flags" } } },
{ 191, "getxattr", 4, { { "const char *", "pathname" }, { "const char *", "name" }, { "void *", "value" }, { "size_t", "size" } } },
{ 192, "lgetxattr", 4, { { "const char *", "pathname" }, { "const char *", "name" }, { "void *", "value" }, { "size_t", "size" } } },
{ 193, "fgetxattr", 4, { { "int", "fd" }, { "const char *", "name" }, { "void *", "value" }, { "size_t", "size" } } },
{ 194, "listxattr", 3, { { "const char *", "pathname" }, { "char *", "list" }, { "size_t", "size" } } },
{ 195, "llistxattr", 3, { { "const char *", "pathname" }, { "char *", "list" }, { "size_t", "size" } } },
{ 196, "flistxattr", 3, { { "int", "fd" }, { "char *", "list" }, { "size_t", "size" } } },
{ 197, "removexattr", 2, { { "const char *", "pathname" }, { "const char *", "name" } } },
{ 198, "lremovexattr", 2, { { "const char *", "pathname" }, { "const char *", "name" } } },
{ 199, "fremovexattr", 2, { { "int", "fd" }, { "const char *", "name" } } },
{ 200, "tkill", 2, { { "pid_t", "pid" }, { "int", "sig" } } },
{ 201, "time", 1, { { "__kernel_old_time_t *", "tloc" } } },
{ 202, "futex", 6, { { "u32 *", "uaddr" }, { "int", "op" }, { "u32", "val" }, { "const struct __kernel_timespec *", "utime" }, { "u32 *", "uaddr2" }, { "u32", "val3" } } },
{ 203, "sched_setaffinity", 3, { { "pid_t", "pid" }, { "unsigned int", "len" }, { "unsigned long *", "user_mask_ptr" } } },
{ 204, "sched_getaffinity", 3, { { "pid_t", "pid" }, { "unsigned int", "len" }, { "unsigned long *", "user_mask_ptr" } } },
{ 205, "set_thread_area", 1, { { "struct user_desc *", "user_desc" } } },
{ 206, "io_setup", 2, { { "unsigned", "nr_events" }, { "aio_context_t *", "ctxp" } } },
{ 207, "io_destroy", 1, { { "aio_context_t", "ctx" } } },
{ 208, "io_getevents", 5, { { "aio_context_t", "ctx_id" }, { "long", "min_nr" }, { "long", "nr" }, { "struct io_event *", "events" }, { "struct __kernel_timespec *", "timeout" } } },
{ 209, "io_submit", 3, { { "aio_context_t", "ctx_id" }, { "long", "nr" }, { "struct iocb * *", "iocbpp" } } },
{ 210, "io_cancel", 3, { { "aio_context_t", "ctx_id" }, { "struct iocb *", "iocb" }, { "struct io_event *", "result" } } },
{ 211, "get_thread_area", 1, { { "struct user_desc *", "user_desc" } } },
{ 213, "epoll_create", 1, { { "int", "size" } } },
{ 216, "remap_file_pages", 5, { { "unsigned long", "start" }, { "unsigned long", "size" }, { "unsigned long", "prot" }, { "unsigned long", "pgoff" }, { "unsigned long", "flags" } } },
{ 217, "getdents64", 3, { { "unsigned int", "fd" }, { "struct linux_dirent64 *", "dirent" }, { "unsigned int", "count" } } },
{ 218, "set_tid_address", 1, { { "int *", "tidptr" } } },
{ 219, "restart_syscall", 0, {} },
{ 220, "semtimedop", 4, { { "int", "semid" }, { "struct sembuf *", "tsops" }, { "unsigned int", "nsops" }, { "const struct __kernel_timespec *", "timeout" } } },
{ 221, "fadvise64", 4, { { "int", "fd" }, { "loff_t", "offset" }, { "size_t", "len" }, { "int", "advice" } } },
{ 222, "timer_create", 3, { { "const clockid_t", "which_clock" }, { "struct sigevent *", "timer_event_spec" }, { "timer_t *", "created_timer_id" } } },
{ 223, "timer_settime", 4, { { "timer_t", "timer_id" }, { "int", "flags" }, { "const struct __kernel_itimerspec *", "new_setting" }, { "struct __kernel_itimerspec *", "old_setting" } } },
{ 224, "timer_gettime", 2, { { "timer_t", "timer_id" }, { "struct __kernel_itimerspec *", "setting" } } },
{ 225, "timer_getoverrun", 1, { { "timer_t", "timer_id" } } },
{ 226, "timer_delete", 1, { { "timer_t", "timer_id" } } },
{ 227, "clock_settime", 2, { { "const clockid_t", "which_clock" }, { "const struct __kernel_timespec *", "tp" } } },
{ 228, "clock_gettime", 2, { { "const clockid_t", "which_clock" }, { "struct __kernel_timespec *", "tp" } } },
{ 229, "clock_getres", 2, { { "const clockid_t", "which_clock" }, { "struct __kernel_timespec *", "tp" } } },
{ 230, "clock_nanosleep", 4, { { "const clockid_t", "which_clock" }, { "int", "flags" }, { "const struct __kernel_timespec *", "rqtp" }, { "struct __kernel_timespec *", "rmtp" } } },
{ 231, "exit_group", 1, { { "int", "error_code" } } },
{ 232, "epoll_wait", 4, { { "int", "epfd" }, { "struct epoll_event *", "events" }, { "int", "maxevents" }, { "int", "timeout" } } },
{ 233, "epoll_ctl", 4, { { "int", "epfd" }, { "int", "op" }, { "int", "fd" }, { "struct epoll_event *", "event" } } },
{ 234, "tgkill", 3, { { "pid_t", "tgid" }, { "pid_t", "pid" }, { "int", "sig" } } },
{ 235, "utimes", 2, { { "char *", "filename" }, { "struct __kernel_old_timeval *", "utimes" } } },
{ 237, "mbind", 6, { { "unsigned long", "start" }, { "unsigned long", "len" }, { "unsigned long", "mode" }, { "const unsigned long *", "nmask" }, { "unsigned long", "maxnode" }, { "unsigned int", "flags" } } },
{ 238, "set_mempolicy", 3, { { "int", "mode" }, { "const unsigned long *", "nmask" }, { "unsigned long", "maxnode" } } },
{ 239, "get_mempolicy", 5, { { "int *", "policy" }, { "unsigned long *", "nmask" }, { "unsigned long", "maxnode" }, { "unsigned long", "addr" }, { "unsigned long", "flags" } } },
{ 240, "mq_open", 4, { { "const char *", "u_name" }, { "int", "oflag" }, { "umode_t", "mode" }, { "struct mq_attr *", "u_attr" } } },
{ 241, "mq_unlink", 1, { { "const char *", "u_name" } } },
{ 242, "mq_timedsend", 5, { { "mqd_t", "mqdes" }, { "const char *", "u_msg_ptr" }, { "size_t", "msg_len" }, { "unsigned int", "msg_prio" }, { "const struct __kernel_timespec *", "u_abs_timeout" } } },
{ 243, "mq_timedreceive", 5, { { "mqd_t", "mqdes" }, { "char *", "u_msg_ptr" }, { "size_t", "msg_len" }, { "unsigned int *", "u_msg_prio" }, { "const struct __kernel_timespec *", "u_abs_timeout" } } },
{ 244, "mq_notify", 2, { { "mqd_t", "mqdes" }, { "const struct sigevent *", "u_notification" } } },
{ 245, "mq_getsetattr", 3, { { "mqd_t", "mqdes" }, { "const struct mq_attr *", "u_mqstat" }, { "struct mq_attr *", "u_omqstat" } } },
{ 246, "kexec_load", 4, { { "unsigned long", "entry" }, { "unsigned long", "nr_segments" }, { "struct kexec_segment *", "segments" }, { "unsigned long", "flags" } } },
{ 247, "waitid", 5, { { "int", "which" }, { "pid_t", "upid" }, { "struct siginfo *", "infop" }, { "int", "options" }, { "struct rusage *", "ru" } } },
{ 248, "add_key", 5, { { "const char *", "_type" }, { "const char *", "_description" }, { "const void *", "_payload" }, { "size_t", "plen" }, { "key_serial_t", "ringid" } } },
{ 249, "request_key", 4, { { "const char *", "_type" }, { "const char *", "_description" }, { "const char *", "_callout_info" }, { "key_serial_t", "destringid" } } },
{ 250, "keyctl", 5, { { "int", "option" }, { "unsigned long", "arg2" }, { "unsigned long", "arg3" }, { "unsigned long", "arg4" }, { "unsigned long", "arg5" } } },
{ 251, "ioprio_set", 3, { { "int", "which" }, { "int", "who" }, { "int", "ioprio" } } },
{ 252, "ioprio_get", 2, { { "int", "which" }, { "int", "who" } } },
{ 253, "inotify_init", 0, {} },
{ 254, "inotify_add_watch", 3, { { "int", "fd" }, { "const char *", "pathname" }, { "u32", "mask" } } },
{ 255, "inotify_rm_watch", 2, { { "int", "fd" }, { "__s32", "wd" } } },
{ 256, "migrate_pages", 4, { { "pid_t", "pid" }, { "unsigned long", "maxnode" }, { "const unsigned long *", "old_nodes" }, { "const unsigned long *", "new_nodes" } } },
{ 257, "openat", 4, { { "int", "dfd" }, { "const char *", "filename" }, { "int", "flags" }, { "umode_t", "mode" } } },
{ 258, "mkdirat", 3, { { "int", "dfd" }, { "const char *", "pathname" }, { "umode_t", "mode" } } },
{ 259, "mknodat", 4, { { "int", "dfd" }, { "const char *", "filename" }, { "umode_t", "mode" }, { "unsigned int", "dev" } } },
{ 260, "fchownat", 5, { { "int", "dfd" }, { "const char *", "filename" }, { "uid_t", "user" }, { "gid_t", "group" }, { "int", "flag" } } },
{ 261, "futimesat", 3, { { "int", "dfd" }, { "const char *", "filename" }, { "struct __kernel_old_timeval *", "utimes" } } },
{ 262, "newfstatat", 4, { { "int", "dfd" }, { "const char *", "filename" }, { "struct stat *", "statbuf" }, { "int", "flag" } } },
{ 263, "unlinkat", 3, { { "int", "dfd" }, { "const char *", "pathname" }, { "int", "flag" } } },
{ 264, "renameat", 4, { { "int", "olddfd" }, { "const char *", "oldname" }, { "int", "newdfd" }, { "const char *", "newname" } } },
{ 265, "linkat", 5, { { "int", "olddfd" }, { "const char *", "oldname" }, { "int", "newdfd" }, { "const char *", "newname" }, { "int", "flags" } } },
{ 266, "symlinkat", 3, { { "const char *", "oldname" }, { "int", "newdfd" }, { "const char *", "newname" } } },
{ 267, "readlinkat", 4, { { "int", "dfd" }, { "const char *", "pathname" }, { "char *", "buf" }, { "int", "bufsiz" } } },
{ 268, "fchmodat", 3, { { "int", "dfd" }, { "const char *", "filename" }, { "umode_t", "mode" } } },
{ 269, "faccessat", 3, { { "int", "dfd" }, { "const char *", "filename" }, { "int", "mode" } } },
{ 270, "pselect6", 6, { { "int", "n" }, { "fd_set *", "inp" }, { "fd_set *", "outp" }, { "fd_set *", "exp" }, { "struct __kernel_timespec *", "tsp" }, { "void *", "sig" } } },
{ 271, "ppoll", 5, { { "struct pollfd *", "ufds" }, { "unsigned int", "nfds" }, { "struct __kernel_timespec *", "tsp" }, { "const sigset_t *", "sigmask" }, { "size_t", "sigsetsize" } } },
{ 272, "unshare", 1, { { "unsigned long", "unshare_flags" } } },
{ 273, "set_robust_list", 2, { { "struct robust_list_head *", "head" }, { "size_t", "len" } } },
{ 274, "get_robust_list", 3, { { "int", "pid" }, { "struct robust_list_head * *", "head_ptr" }, { "size_t *", "len_ptr" } } },
{ 275, "splice", 6, { { "int", "fd_in" }, { "loff_t *", "off_in" }, { "int", "fd_out" }, { "loff_t *", "off_out" }, { "size_t", "len" }, { "unsigned int", "flags" } } },
{ 276, "tee", 4, { { "int", "fdin" }, { "int", "fdout" }, { "size_t", "len" }, { "unsigned int", "flags" } } },
{ 277, "sync_file_range", 4, { { "int", "fd" }, { "loff_t", "offset" }, { "loff_t", "nbytes" }, { "unsigned int", "flags" } } },
{ 278, "vmsplice", 4, { { "int", "fd" }, { "const struct iovec *", "uiov" }, { "unsigned long", "nr_segs" }, { "unsigned int", "flags" } } },
{ 279, "move_pages", 6, { { "pid_t", "pid" }, { "unsigned long", "nr_pages" }, { "const void * *", "pages" }, { "const int *", "nodes" }, { "int *", "status" }, { "int", "flags" } } },
{ 280, "utimensat", 4, { { "int", "dfd" }, { "const char *", "filename" }, { "struct __kernel_timespec *", "utimes" }, { "int", "flags" } } },
{ 281, "epoll_pwait", 6, { { "int", "epfd" }, { "struct epoll_event *", "events" }, { "int", "maxevents" }, { "int", "timeout" }, { "const sigset_t *", "sigmask" }, { "size_t", "sigsetsize" } } },
{ 282, "signalfd", 3, { { "int", "ufd" }, { "sigset_t *", "user_mask" }, { "size_t", "sizemask" } } },
{ 283, "timerfd_create", 2, { { "int", "clockid" }, { "int", "flags" } } },
{ 284, "eventfd", 1, { { "unsigned int", "count" } } },
{ 285, "fallocate", 4, { { "int", "fd" }, { "int", "mode" }, { "loff_t", "offset" }, { "loff_t", "len" } } },
{ 286, "timerfd_settime", 4, { { "int", "ufd" }, { "int", "flags" }, { "const struct __kernel_itimerspec *", "utmr" }, { "struct __kernel_itimerspec *", "otmr" } } },
{ 287, "timerfd_gettime", 2, { { "int", "ufd" }, { "struct __kernel_itimerspec *", "otmr" } } },
{ 288, "accept4", 4, { { "int", "fd" }, { "struct sockaddr *", "upeer_sockaddr" }, { "int *", "upeer_addrlen" }, { "int", "flags" } } },
{ 289, "signalfd4", 4, { { "int", "ufd" }, { "sigset_t *", "user_mask" }, { "size_t", "sizemask" }, { "int", "flags" } } },
{ 290, "eventfd2", 2, { { "unsigned int", "count" }, { "int", "flags" } } },
{ 291, "epoll_create1", 1, { { "int", "flags" } } },
{ 292, "dup3", 3, { { "unsigned int", "oldfd" }, { "unsigned int", "newfd" }, { "int", "flags" } } },
{ 293, "pipe2", 2, { { "int *", "fildes" }, { "int", "flags" } } },
{ 294, "inotify_init1", 1, { { "int", "flags" } } },
{ 295, "preadv", 5, { { "unsigned long", "fd" }, { "const struct iovec *", "vec" }, { "unsigned long", "vlen" }, { "unsigned long", "pos_l" }, { "unsigned long", "pos_h" } } },
{ 296, "pwritev", 5, { { "unsigned long", "fd" }, { "const struct iovec *", "vec" }, { "unsigned long", "vlen" }, { "unsigned long", "pos_l" }, { "unsigned long", "pos_h" } } },
{ 297, "rt_tgsigqueueinfo", 4, { { "pid_t", "tgid" }, { "pid_t", "pid" }, { "int", "sig" }, { "siginfo_t *", "uinfo" } } },
{ 298, "perf_event_open", 5, { { "struct perf_event_attr *", "attr_uptr" }, { "pid_t", "pid" }, { "int", "cpu" }, { "int", "group_fd" }, { "unsigned long", "flags" } } },
{ 299, "recvmmsg", 5, { { "int", "fd" }, { "struct mmsghdr *", "mmsg" }, { "unsigned int", "vlen" }, { "unsigned int", "flags" }, { "struct __kernel_timespec *", "timeout" } } },
{ 300, "fanotify_init", 2, { { "unsigned int", "flags" }, { "unsigned int", "event_f_flags" } } },
{ 301, "fanotify_mark", 5, { { "int", "fanotify_fd" }, { "unsigned int", "flags" }, { "__u64", "mask" }, { "int", "dfd" }, { "const char *", "pathname" } } },
{ 302, "prlimit64", 4, { { "pid_t", "pid" }, { "unsigned int", "resource" }, { "const struct rlimit64 *", "new_rlim" }, { "struct rlimit64 *", "old_rlim" } } },
{ 303, "name_to_handle_at", 5, { { "int", "dfd" }, { "const char *", "name" }, { "struct file_handle *", "handle" }, { "void *", "mnt_id" }, { "int", "flag" } } },
{ 304, "open_by_handle_at", 3, { { "int", "mountdirfd" }, { "struct file_handle *", "handle" }, { "int", "flags" } } },
{ 305, "clock_adjtime", 2, { { "const clockid_t", "which_clock" }, { "struct __kernel_timex *", "utx" } } },
{ 306, "syncfs", 1, { { "int", "fd" } } },
{ 307, "sendmmsg", 4, { { "int", "fd" }, { "struct mmsghdr *", "mmsg" }, { "unsigned int", "vlen" }, { "unsigned int", "flags" } } },
{ 308, "setns", 2, { { "int", "fd" }, { "int", "flags" } } },
{ 309, "getcpu", 3, { { "unsigned *", "cpup" }, { "unsigned *", "nodep" }, { "struct getcpu_cache *", "unused" } } },
{ 310, "process_vm_readv", 6, { { "pid_t", "pid" }, { "const struct iovec *", "lvec" }, { "unsigned long", "liovcnt" }, { "const struct iovec *", "rvec" }, { "unsigned long", "riovcnt" }, { "unsigned long", "flags" } } },
{ 311, "process_vm_writev", 6, { { "pid_t", "pid" }, { "const struct iovec *", "lvec" }, { "unsigned long", "liovcnt" }, { "const struct iovec *", "rvec" }, { "unsigned long", "riovcnt" }, { "unsigned long", "flags" } } },
{ 312, "kcmp", 5, { { "pid_t", "pid1" }, { "pid_t", "pid2" }, { "int", "type" }, { "unsigned long", "idx1" }, { "unsigned long", "idx2" } } },
{ 313, "finit_module", 3, { { "int", "fd" }, { "const char *", "uargs" }, { "int", "flags" } } },
{ 314, "sched_setattr", 3, { { "pid_t", "pid" }, { "struct sched_attr *", "uattr" }, { "unsigned int", "flags" } } },
{ 315, "sched_getattr", 4, { { "pid_t", "pid" }, { "struct sched_attr *", "uattr" }, { "unsigned int", "usize" }, { "unsigned int", "flags" } } },
{ 316, "renameat2", 5, { { "int", "olddfd" }, { "const char *", "oldname" }, { "int", "newdfd" }, { "const char *", "newname" }, { "unsigned int", "flags" } } },
{ 317, "seccomp", 3, { { "unsigned int", "op" }, { "unsigned int", "flags" }, { "void *", "uargs" } } },
{ 318, "getrandom", 3, { { "char *", "ubuf" }, { "size_t", "len" }, { "unsigned int", "flags" } } },
{ 319, "memfd_create", 2, { { "const char *", "uname" }, { "unsigned int", "flags" } } },
{ 320, "kexec_file_load", 5, { { "int", "kernel_fd" }, { "int", "initrd_fd" }, { "unsigned long", "cmdline_len" }, { "const char *", "cmdline_ptr" }, { "unsigned long", "flags" } } },
{ 321, "bpf", 3, { { "int", "cmd" }, { "union bpf_attr *", "uattr" }, { "unsigned int", "size" } } },
{ 322, "execveat", 5, { { "int", "fd" }, { "const char *", "filename" }, { "const char *const *", "argv" }, { "const char *const *", "envp" }, { "int", "flags" } } },
{ 323, "userfaultfd", 1, { { "int", "flags" } } },
{ 324, "membarrier", 3, { { "int", "cmd" }, { "unsigned int", "flags" }, { "int", "cpu_id" } } },
{ 325, "mlock2", 3, { { "unsigned long", "start" }, { "size_t", "len" }, { "int", "flags" } } },
{ 326, "copy_file_range", 6, { { "int", "fd_in" }, { "loff_t *", "off_in" }, { "int", "fd_out" }, { "loff_t *", "off_out" }, { "size_t", "len" }, { "unsigned int", "flags" } } },
{ 327, "preadv2", 6, { { "unsigned long", "fd" }, { "const struct iovec *", "vec" }, { "unsigned long", "vlen" }, { "unsigned long", "pos_l" }, { "unsigned long", "pos_h" }, { "rwf_t", "flags" } } },
{ 328, "pwritev2", 6, { { "unsigned long", "fd" }, { "const struct iovec *", "vec" }, { "unsigned long", "vlen" }, { "unsigned long", "pos_l" }, { "unsigned long", "pos_h" }, { "rwf_t", "flags" } } },
{ 329, "pkey_mprotect", 4, { { "unsigned long", "start" }, { "size_t", "len" }, { "unsigned long", "prot" }, { "int", "pkey" } } },
{ 330, "pkey_alloc", 2, { { "unsigned long", "flags" }, { "unsigned long", "init_val" } } },
{ 331, "pkey_free", 1, { { "int", "pkey" } } },
{ 332, "statx", 5, { { "int", "dfd" }, { "const char *", "filename" }, { "unsigned", "flags" }, { "unsigned int", "mask" }, { "struct statx *", "buffer" } } },
{ 333, "io_pgetevents", 6, { { "aio_context_t", "ctx_id" }, { "long", "min_nr" }, { "long", "nr" }, { "struct io_event *", "events" }, { "struct __kernel_timespec *", "timeout" }, { "const struct __aio_sigset *", "usig" } } },
{ 334, "rseq", 4, { { "struct rseq *", "rseq" }, { "u32", "rseq_len" }, { "int", "flags" }, { "u32", "sig" } } },
{ 335, "uretprobe", 0, {} },
{ 336, "uprobe", 0, {} },
{ 424, "pidfd_send_signal", 4, { { "int", "pidfd" }, { "int", "sig" }, { "siginfo_t *", "info" }, { "unsigned int", "flags" } } },
{ 425, "io_uring_setup", 2, { { "u32", "entries" }, { "struct io_uring_params *", "params" } } },
{ 426, "io_uring_enter", 6, { { "unsigned int", "fd" }, { "u32", "to_submit" }, { "u32", "min_complete" }, { "u32", "flags" }, { "const void *", "argp" }, { "size_t", "argsz" } } },
{ 427, "io_uring_register", 4, { { "unsigned int", "fd" }, { "unsigned int", "opcode" }, { "void *", "arg" }, { "unsigned int", "nr_args" } } },
{ 428, "open_tree", 3, { { "int", "dfd" }, { "const char *", "filename" }, { "unsigned", "flags" } } },
{ 429, "move_mount", 5, { { "int", "from_dfd" }, { "const char *", "from_pathname" }, { "int", "to_dfd" }, { "const char *", "to_pathname" }, { "unsigned int", "flags" } } },
{ 430, "fsopen", 2, { { "const char *", "_fs_name" }, { "unsigned int", "flags" } } },
{ 431, "fsconfig", 5, { { "int", "fd" }, { "unsigned int", "cmd" }, { "const char *", "_key" }, { "const void *", "_value" }, { "int", "aux" } } },
{ 432, "fsmount", 3, { { "int", "fs_fd" }, { "unsigned int", "flags" }, { "unsigned int", "attr_flags" } } },
{ 433, "fspick", 3, { { "int", "dfd" }, { "const char *", "path" }, { "unsigned int", "flags" } } },
{ 434, "pidfd_open", 2, { { "pid_t", "pid" }, { "unsigned int", "flags" } } },
{ 435, "clone3", 2, { { "struct clone_args *", "uargs" }, { "size_t", "size" } } },
{ 436, "close_range", 3, { { "unsigned int", "fd" }, { "unsigned int", "max_fd" }, { "unsigned int", "flags" } } },
{ 437, "openat2", 4, { { "int", "dfd" }, { "const char *", "filename" }, { "struct open_how *", "how" }, { "size_t", "usize" } } },
{ 438, "pidfd_getfd", 3, { { "int", "pidfd" }, { "int", "fd" }, { "unsigned int", "flags" } } },
{ 439, "faccessat2", 4, { { "int", "dfd" }, { "const char *", "filename" }, { "int", "mode" }, { "int", "flags" } } },
{ 440, "process_madvise", 5, { { "int", "pidfd" }, { "const struct iovec *", "vec" }, { "size_t", "vlen" }, { "int", "behavior" }, { "unsigned int", "flags" } } },
{ 441, "epoll_pwait2", 6, { { "int", "epfd" }, { "struct epoll_event *", "events" }, { "int", "maxevents" }, { "const struct __kernel_timespec *", "timeout" }, { "const sigset_t *", "sigmask" }, { "size_t", "sigsetsize" } } },
{ 442, "mount_setattr", 5, { { "int", "dfd" }, { "const char *", "path" }, { "unsigned int", "flags" }, { "struct mount_attr *", "uattr" }, { "size_t", "usize" } } },
{ 443, "quotactl_fd", 4, { { "unsigned int", "fd" }, { "unsigned int", "cmd" }, { "qid_t", "id" }, { "void *", "addr" } } },
{ 444, "landlock_create_ruleset", 3, { { "const struct landlock_ruleset_attr *const", "attr" }, { "const size_t", "size" }, { "const __u32", "flags" } } },
{ 445, "landlock_add_rule", 4, { { "const int", "ruleset_fd" }, { "const enum landlock_rule_type", "rule_type" }, { "const void *const", "rule_attr" }, { "const __u32", "flags" } } },
{ 446, "landlock_restrict_self", 2, { { "const int", "ruleset_fd" }, { "const __u32", "flags" } } },
{ 447, "memfd_secret", 1, { { "unsigned int", "flags" } } },
{ 448, "process_mrelease", 2, { { "int", "pidfd" }, { "unsigned int", "flags" } } },
{ 449, "futex_waitv", 5, { { "struct futex_waitv *", "waiters" }, { "unsigned int", "nr_futexes" }, { "unsigned int", "flags" }, { "struct __kernel_timespec *", "timeout" }, { "clockid_t", "clockid" } } },
{ 450, "set_mempolicy_home_node", 4, { { "unsigned long", "start" }, { "unsigned long", "len" }, { "unsigned long", "home_node" }, { "unsigned long", "flags" } } },
{ 451, "cachestat", 4, { { "unsigned int", "fd" }, { "struct cachestat_range *", "cstat_range" }, { "struct cachestat *", "cstat" }, { "unsigned int", "flags" } } },
{ 452, "fchmodat2", 4, { { "int", "dfd" }, { "const char *", "filename" }, { "umode_t", "mode" }, { "unsigned int", "flags" } } },
{ 453, "map_shadow_stack", 3, { { "unsigned long", "addr" }, { "unsigned long", "size" }, { "unsigned int", "flags" } } },
{ 454, "futex_wake", 4, { { "void *", "uaddr" }, { "unsigned long", "mask" }, { "int", "nr" }, { "unsigned int", "flags" } } },
{ 455, "futex_wait", 6, { { "void *", "uaddr" }, { "unsigned long", "val" }, { "unsigned long", "mask" }, { "unsigned int", "flags" }, { "struct __kernel_timespec *", "timeout" }, { "clockid_t", "clockid" } } },
{ 456, "futex_requeue", 4, { { "struct futex_waitv *", "waiters" }, { "unsigned int", "flags" }, { "int", "nr_wake" }, { "int", "nr_requeue" } } },
{ 457, "statmount", 4, { { "const struct mnt_id_req *", "req" }, { "struct statmount *", "buf" }, { "size_t", "bufsize" }, { "unsigned int", "flags" } } },
{ 458, "listmount", 4, { { "const struct mnt_id_req *", "req" }, { "u64 *", "mnt_ids" }, { "size_t", "nr_mnt_ids" }, { "unsigned int", "flags" } } },
{ 459, "lsm_get_self_attr", 4, { { "unsigned int", "attr" }, { "struct lsm_ctx *", "ctx" }, { "u32 *", "size" }, { "u32", "flags" } } },
{ 460, "lsm_set_self_attr", 4, { { "unsigned int", "attr" }, { "struct lsm_ctx *", "ctx" }, { "u32", "size" }, { "u32", "flags" } } },
{ 461, "lsm_list_modules", 3, { { "u64 *", "ids" }, { "u32 *", "size" }, { "u32", "flags" } } },
{ 462, "mseal", 3, { { "unsigned long", "start" }, { "size_t", "len" }, { "unsigned long", "flags" } } },
{ 463, "setxattrat", 6, { { "int", "dfd" }, { "const char *", "pathname" }, { "unsigned int", "at_flags" }, { "const char *", "name" }, { "const struct xattr_args *", "uargs" }, { "size_t", "usize" } } },
{ 464, "getxattrat", 6, { { "int", "dfd" }, { "const char *", "pathname" }, { "unsigned int", "at_flags" }, { "const char *", "name" }, { "struct xattr_args *", "uargs" }, { "size_t", "usize" } } },
{ 465, "listxattrat", 5, { { "int", "dfd" }, { "const char *", "pathname" }, { "unsigned int", "at_flags" }, { "char *", "list" }, { "size_t", "size" } } },
{ 466, "removexattrat", 4, { { "int", "dfd" }, { "const char *", "pathname" }, { "unsigned int", "at_flags" }, { "const char *", "name" } } },
{ 467, "open_tree_attr", 5, { { "int", "dfd" }, { "const char *", "filename" }, { "unsigned", "flags" }, { "struct mount_attr *", "uattr" }, { "size_t", "usize" } } },
{ 468, "file_getattr", 5, { { "int", "dfd" }, { "const char *", "filename" }, { "struct file_attr *", "ufattr" }, { "size_t", "usize" }, { "unsigned int", "at_flags" } } },
{ 469, "file_setattr", 5, { { "int", "dfd" }, { "const char *", "filename" }, { "struct file_attr *", "ufattr" }, { "size_t", "usize" }, { "unsigned int", "at_flags" } } },
{ 470, "listns", 4, { { "const struct ns_id_req *", "req" }, { "u64 *", "ns_ids" }, { "size_t", "nr_ns_ids" }, { "unsigned int", "flags" } } },
};
static const FridaLinuxSyscallSignature frida_compat32_syscall_signatures[] =
{
{ 0, "restart_syscall", 0, {} },
{ 1, "exit", 1, { { "int", "error_code" } } },
{ 2, "fork", 0, {} },
{ 3, "read", 3, { { "unsigned int", "fd" }, { "char *", "buf" }, { "size_t", "count" } } },
{ 4, "write", 3, { { "unsigned int", "fd" }, { "const char *", "buf" }, { "size_t", "count" } } },
{ 5, "open", 3, { { "const char *", "filename" }, { "int", "flags" }, { "umode_t", "mode" } } },
{ 6, "close", 1, { { "unsigned int", "fd" } } },
{ 7, "waitpid", 3, { { "pid_t", "pid" }, { "int *", "stat_addr" }, { "int", "options" } } },
{ 8, "creat", 2, { { "const char *", "pathname" }, { "umode_t", "mode" } } },
{ 9, "link", 2, { { "const char *", "oldname" }, { "const char *", "newname" } } },
{ 10, "unlink", 1, { { "const char *", "pathname" } } },
{ 11, "execve", 3, { { "const char *", "filename" }, { "const compat_uptr_t *", "argv" }, { "const compat_uptr_t *", "envp" } } },
{ 12, "chdir", 1, { { "const char *", "filename" } } },
{ 13, "time", 1, { { "__kernel_old_time_t *", "tloc" } } },
{ 14, "mknod", 3, { { "const char *", "filename" }, { "umode_t", "mode" }, { "unsigned", "dev" } } },
{ 15, "chmod", 2, { { "const char *", "filename" }, { "umode_t", "mode" } } },
{ 16, "lchown", 3, { { "const char *", "filename" }, { "uid_t", "user" }, { "gid_t", "group" } } },
{ 18, "oldstat", 2, { { "const char *", "filename" }, { "struct __old_kernel_stat *", "statbuf" } } },
{ 19, "lseek", 3, { { "unsigned int", "fd" }, { "compat_off_t", "offset" }, { "unsigned int", "whence" } } },
{ 20, "getpid", 0, {} },
{ 21, "mount", 5, { { "char *", "dev_name" }, { "char *", "dir_name" }, { "char *", "type" }, { "unsigned long", "flags" }, { "void *", "data" } } },
{ 22, "umount", 2, { { "char *", "name" }, { "int", "flags" } } },
{ 23, "setuid", 1, { { "uid_t", "uid" } } },
{ 24, "getuid", 0, {} },
{ 25, "stime", 1, { { "__kernel_old_time_t *", "tptr" } } },
{ 26, "ptrace", 4, { { "compat_long_t", "request" }, { "compat_long_t", "pid" }, { "compat_long_t", "addr" }, { "compat_long_t", "data" } } },
{ 27, "alarm", 1, { { "unsigned int", "seconds" } } },
{ 28, "oldfstat", 2, { { "unsigned int", "fd" }, { "struct __old_kernel_stat *", "statbuf" } } },
{ 29, "pause", 0, {} },
{ 30, "utime", 2, { { "char *", "filename" }, { "struct utimbuf *", "times" } } },
{ 33, "access", 2, { { "const char *", "filename" }, { "int", "mode" } } },
{ 34, "nice", 1, { { "int", "increment" } } },
{ 36, "sync", 0, {} },
{ 37, "kill", 2, { { "pid_t", "pid" }, { "int", "sig" } } },
{ 38, "rename", 2, { { "const char *", "oldname" }, { "const char *", "newname" } } },
{ 39, "mkdir", 2, { { "const char *", "pathname" }, { "umode_t", "mode" } } },
{ 40, "rmdir", 1, { { "const char *", "pathname" } } },
{ 41, "dup", 1, { { "unsigned int", "fildes" } } },
{ 42, "pipe", 1, { { "int *", "fildes" } } },
{ 43, "times", 1, { { "struct compat_tms *", "tbuf" } } },
{ 45, "brk", 1, { { "unsigned long", "brk" } } },
{ 46, "setgid", 1, { { "gid_t", "gid" } } },
{ 47, "getgid", 0, {} },
{ 48, "signal", 2, { { "int", "sig" }, { "__sighandler_t", "handler" } } },
{ 49, "geteuid", 0, {} },
{ 50, "getegid", 0, {} },
{ 51, "acct", 1, { { "const char *", "name" } } },
{ 52, "umount2", 2, { { "char *", "name" }, { "int", "flags" } } },
{ 54, "ioctl", 3, { { "unsigned int", "fd" }, { "unsigned int", "cmd" }, { "compat_ulong_t", "arg" } } },
{ 55, "fcntl", 3, { { "unsigned int", "fd" }, { "unsigned int", "cmd" }, { "compat_ulong_t", "arg" } } },
{ 57, "setpgid", 2, { { "pid_t", "pid" }, { "pid_t", "pgid" } } },
{ 59, "oldolduname", 1, { { "struct oldold_utsname *", "arg0" } } },
{ 60, "umask", 1, { { "int", "mask" } } },
{ 61, "chroot", 1, { { "const char *", "filename" } } },
{ 62, "ustat", 2, { { "unsigned", "dev" }, { "struct compat_ustat *", "u" } } },
{ 63, "dup2", 2, { { "unsigned int", "oldfd" }, { "unsigned int", "newfd" } } },
{ 64, "getppid", 0, {} },
{ 65, "getpgrp", 0, {} },
{ 66, "setsid", 0, {} },
{ 67, "sigaction", 3, { { "int", "sig" }, { "const struct compat_old_sigaction *", "act" }, { "struct compat_old_sigaction *", "oact" } } },
{ 68, "sgetmask", 0, {} },
{ 69, "ssetmask", 1, { { "int", "newmask" } } },
{ 70, "setreuid", 2, { { "uid_t", "ruid" }, { "uid_t", "euid" } } },
{ 71, "setregid", 2, { { "gid_t", "rgid" }, { "gid_t", "egid" } } },
{ 72, "sigsuspend", 3, { { "int", "unused1" }, { "int", "unused2" }, { "old_sigset_t", "mask" } } },
{ 73, "sigpending", 1, { { "compat_old_sigset_t *", "set32" } } },
{ 74, "sethostname", 2, { { "char *", "name" }, { "int", "len" } } },
{ 75, "setrlimit", 2, { { "unsigned int", "resource" }, { "struct compat_rlimit *", "rlim" } } },
{ 76, "getrlimit", 2, { { "unsigned int", "resource" }, { "struct compat_rlimit *", "rlim" } } },
{ 77, "getrusage", 2, { { "int", "who" }, { "struct compat_rusage *", "ru" } } },
{ 78, "gettimeofday", 2, { { "struct old_timeval32 *", "tv" }, { "struct timezone *", "tz" } } },
{ 79, "settimeofday", 2, { { "struct old_timeval32 *", "tv" }, { "struct timezone *", "tz" } } },
{ 80, "getgroups", 2, { { "int", "gidsetsize" }, { "gid_t *", "grouplist" } } },
{ 81, "setgroups", 2, { { "int", "gidsetsize" }, { "gid_t *", "grouplist" } } },
{ 82, "select", 5, { { "int", "n" }, { "compat_ulong_t *", "inp" }, { "compat_ulong_t *", "outp" }, { "compat_ulong_t *", "exp" }, { "struct old_timeval32 *", "tvp" } } },
{ 83, "symlink", 2, { { "const char *", "oldname" }, { "const char *", "newname" } } },
{ 84, "oldlstat", 2, { { "const char *", "filename" }, { "struct __old_kernel_stat *", "statbuf" } } },
{ 85, "readlink", 3, { { "const char *", "path" }, { "char *", "buf" }, { "int", "bufsiz" } } },
{ 86, "uselib", 1, { { "const char *", "library" } } },
{ 87, "swapon", 2, { { "const char *", "specialfile" }, { "int", "swap_flags" } } },
{ 88, "reboot", 4, { { "int", "magic1" }, { "int", "magic2" }, { "unsigned int", "cmd" }, { "void *", "arg" } } },
{ 89, "readdir", 3, { { "unsigned int", "fd" }, { "struct compat_old_linux_dirent *", "arg1" }, { "unsigned int", "count" } } },
{ 90, "mmap", 6, { { "unsigned long", "addr" }, { "unsigned long", "len" }, { "unsigned long", "prot" }, { "unsigned long", "flags" }, { "unsigned long", "fd" }, { "unsigned long", "off" } } },
{ 91, "munmap", 2, { { "unsigned long", "addr" }, { "size_t", "len" } } },
{ 92, "truncate", 2, { { "const char *", "path" }, { "compat_off_t", "length" } } },
{ 93, "ftruncate", 2, { { "unsigned int", "fd" }, { "compat_off_t", "length" } } },
{ 94, "fchmod", 2, { { "unsigned int", "fd" }, { "umode_t", "mode" } } },
{ 95, "fchown", 3, { { "unsigned int", "fd" }, { "uid_t", "user" }, { "gid_t", "group" } } },
{ 96, "getpriority", 2, { { "int", "which" }, { "int", "who" } } },
{ 97, "setpriority", 3, { { "int", "which" }, { "int", "who" }, { "int", "niceval" } } },
{ 99, "statfs", 2, { { "const char *", "pathname" }, { "struct compat_statfs *", "buf" } } },
{ 100, "fstatfs", 2, { { "unsigned int", "fd" }, { "struct compat_statfs *", "buf" } } },
{ 101, "ioperm", 3, { { "unsigned long", "from" }, { "unsigned long", "num" }, { "int", "turn_on" } } },
{ 102, "socketcall", 2, { { "int", "call" }, { "u32 *", "args" } } },
{ 103, "syslog", 3, { { "int", "type" }, { "char *", "buf" }, { "int", "len" } } },
{ 104, "setitimer", 3, { { "int", "which" }, { "struct old_itimerval32 *", "value" }, { "struct old_itimerval32 *", "ovalue" } } },
{ 105, "getitimer", 2, { { "int", "which" }, { "struct old_itimerval32 *", "value" } } },
{ 106, "stat", 2, { { "const char *", "filename" }, { "struct __old_kernel_stat *", "statbuf" } } },
{ 107, "lstat", 2, { { "const char *", "filename" }, { "struct __old_kernel_stat *", "statbuf" } } },
{ 108, "fstat", 2, { { "unsigned int", "fd" }, { "struct __old_kernel_stat *", "statbuf" } } },
{ 109, "olduname", 1, { { "struct oldold_utsname *", "name" } } },
{ 110, "iopl", 1, { { "unsigned int", "level" } } },
{ 111, "vhangup", 0, {} },
{ 113, "vm86old", 1, { { "struct vm86_struct *", "user_vm86" } } },
{ 114, "wait4", 4, { { "compat_pid_t", "pid" }, { "compat_uint_t *", "stat_addr" }, { "int", "options" }, { "struct compat_rusage *", "ru" } } },
{ 115, "swapoff", 1, { { "const char *", "specialfile" } } },
{ 116, "sysinfo", 1, { { "struct compat_sysinfo *", "info" } } },
{ 117, "ipc", 6, { { "u32", "arg0" }, { "int", "arg1" }, { "int", "arg2" }, { "u32", "arg3" }, { "compat_uptr_t", "arg4" }, { "u32", "arg5" } } },
{ 118, "fsync", 1, { { "unsigned int", "fd" } } },
{ 120, "clone", 5, { { "unsigned long", "clone_flags" }, { "unsigned long", "newsp" }, { "int *", "parent_tidptr" }, { "int *", "child_tidptr" }, { "unsigned long", "tls" } } },
{ 121, "setdomainname", 2, { { "char *", "name" }, { "int", "len" } } },
{ 122, "uname", 1, { { "struct old_utsname *", "name" } } },
{ 123, "modify_ldt", 3, { { "int", "func" }, { "void *", "ptr" }, { "unsigned long", "bytecount" } } },
{ 124, "adjtimex", 1, { { "struct __kernel_timex *", "txc_p" } } },
{ 125, "mprotect", 3, { { "unsigned long", "start" }, { "size_t", "len" }, { "unsigned long", "prot" } } },
{ 126, "sigprocmask", 3, { { "int", "how" }, { "compat_old_sigset_t *", "nset" }, { "compat_old_sigset_t *", "oset" } } },
{ 128, "init_module", 3, { { "void *", "umod" }, { "unsigned long", "len" }, { "const char *", "uargs" } } },
{ 129, "delete_module", 2, { { "const char *", "name_user" }, { "unsigned int", "flags" } } },
{ 131, "quotactl", 4, { { "unsigned int", "cmd" }, { "const char *", "special" }, { "qid_t", "id" }, { "void *", "addr" } } },
{ 132, "getpgid", 1, { { "pid_t", "pid" } } },
{ 133, "fchdir", 1, { { "unsigned int", "fd" } } },
{ 134, "bdflush", 0, {} },
{ 135, "sysfs", 3, { { "int", "option" }, { "unsigned long", "arg1" }, { "unsigned long", "arg2" } } },
{ 136, "personality", 1, { { "unsigned int", "personality" } } },
{ 138, "setfsuid", 1, { { "uid_t", "uid" } } },
{ 139, "setfsgid", 1, { { "gid_t", "gid" } } },
{ 140, "_llseek", 5, { { "unsigned int", "fd" }, { "unsigned long", "offset_high" }, { "unsigned long", "offset_low" }, { "loff_t *", "result" }, { "unsigned int", "whence" } } },
{ 141, "getdents", 3, { { "unsigned int", "fd" }, { "struct compat_linux_dirent *", "dirent" }, { "unsigned int", "count" } } },
{ 142, "_newselect", 5, { { "int", "n" }, { "compat_ulong_t *", "inp" }, { "compat_ulong_t *", "outp" }, { "compat_ulong_t *", "exp" }, { "struct old_timeval32 *", "tvp" } } },
{ 143, "flock", 2, { { "unsigned int", "fd" }, { "unsigned int", "cmd" } } },
{ 144, "msync", 3, { { "unsigned long", "start" }, { "size_t", "len" }, { "int", "flags" } } },
{ 145, "readv", 3, { { "unsigned long", "fd" }, { "const struct iovec *", "vec" }, { "unsigned long", "vlen" } } },
{ 146, "writev", 3, { { "unsigned long", "fd" }, { "const struct iovec *", "vec" }, { "unsigned long", "vlen" } } },
{ 147, "getsid", 1, { { "pid_t", "pid" } } },
{ 148, "fdatasync", 1, { { "unsigned int", "fd" } } },
{ 149, "_sysctl", 0, {} },
{ 150, "mlock", 2, { { "unsigned long", "start" }, { "size_t", "len" } } },
{ 151, "munlock", 2, { { "unsigned long", "start" }, { "size_t", "len" } } },
{ 152, "mlockall", 1, { { "int", "flags" } } },
{ 153, "munlockall", 0, {} },
{ 154, "sched_setparam", 2, { { "pid_t", "pid" }, { "struct sched_param *", "param" } } },
{ 155, "sched_getparam", 2, { { "pid_t", "pid" }, { "struct sched_param *", "param" } } },
{ 156, "sched_setscheduler", 3, { { "pid_t", "pid" }, { "int", "policy" }, { "struct sched_param *", "param" } } },
{ 157, "sched_getscheduler", 1, { { "pid_t", "pid" } } },
{ 158, "sched_yield", 0, {} },
{ 159, "sched_get_priority_max", 1, { { "int", "policy" } } },
{ 160, "sched_get_priority_min", 1, { { "int", "policy" } } },
{ 161, "sched_rr_get_interval", 2, { { "pid_t", "pid" }, { "struct __kernel_timespec *", "interval" } } },
{ 162, "nanosleep", 2, { { "struct __kernel_timespec *", "rqtp" }, { "struct __kernel_timespec *", "rmtp" } } },
{ 163, "mremap", 5, { { "unsigned long", "addr" }, { "unsigned long", "old_len" }, { "unsigned long", "new_len" }, { "unsigned long", "flags" }, { "unsigned long", "new_addr" } } },
{ 164, "setresuid", 3, { { "uid_t", "ruid" }, { "uid_t", "euid" }, { "uid_t", "suid" } } },
{ 165, "getresuid", 3, { { "uid_t *", "ruidp" }, { "uid_t *", "euidp" }, { "uid_t *", "suidp" } } },
{ 166, "vm86", 2, { { "unsigned long", "cmd" }, { "unsigned long", "arg" } } },
{ 168, "poll", 3, { { "struct pollfd *", "ufds" }, { "unsigned int", "nfds" }, { "int", "timeout_msecs" } } },
{ 170, "setresgid", 3, { { "gid_t", "rgid" }, { "gid_t", "egid" }, { "gid_t", "sgid" } } },
{ 171, "getresgid", 3, { { "gid_t *", "rgidp" }, { "gid_t *", "egidp" }, { "gid_t *", "sgidp" } } },
{ 172, "prctl", 5, { { "int", "option" }, { "unsigned long", "arg2" }, { "unsigned long", "arg3" }, { "unsigned long", "arg4" }, { "unsigned long", "arg5" } } },
{ 173, "rt_sigreturn", 0, {} },
{ 174, "rt_sigaction", 4, { { "int", "sig" }, { "const struct compat_sigaction *", "act" }, { "struct compat_sigaction *", "oact" }, { "compat_size_t", "sigsetsize" } } },
{ 175, "rt_sigprocmask", 4, { { "int", "how" }, { "compat_sigset_t *", "nset" }, { "compat_sigset_t *", "oset" }, { "compat_size_t", "sigsetsize" } } },
{ 176, "rt_sigpending", 2, { { "compat_sigset_t *", "uset" }, { "compat_size_t", "sigsetsize" } } },
{ 177, "rt_sigtimedwait", 4, { { "const sigset_t *", "uthese" }, { "siginfo_t *", "uinfo" }, { "const struct __kernel_timespec *", "uts" }, { "size_t", "sigsetsize" } } },
{ 178, "rt_sigqueueinfo", 3, { { "compat_pid_t", "pid" }, { "int", "sig" }, { "struct compat_siginfo *", "uinfo" } } },
{ 179, "rt_sigsuspend", 2, { { "compat_sigset_t *", "unewset" }, { "compat_size_t", "sigsetsize" } } },
{ 180, "pread64", 4, { { "unsigned int", "fd" }, { "char *", "buf" }, { "size_t", "count" }, { "loff_t", "pos" } } },
{ 181, "pwrite64", 4, { { "unsigned int", "fd" }, { "const char *", "buf" }, { "size_t", "count" }, { "loff_t", "pos" } } },
{ 182, "chown", 3, { { "const char *", "filename" }, { "uid_t", "user" }, { "gid_t", "group" } } },
{ 183, "getcwd", 2, { { "char *", "buf" }, { "unsigned long", "size" } } },
{ 184, "capget", 2, { { "cap_user_header_t", "header" }, { "cap_user_data_t", "dataptr" } } },
{ 185, "capset", 2, { { "cap_user_header_t", "header" }, { "const cap_user_data_t", "data" } } },
{ 186, "sigaltstack", 2, { { "const compat_stack_t *", "uss_ptr" }, { "compat_stack_t *", "uoss_ptr" } } },
{ 187, "sendfile", 4, { { "int", "out_fd" }, { "int", "in_fd" }, { "compat_off_t *", "offset" }, { "compat_size_t", "count" } } },
{ 190, "vfork", 0, {} },
{ 191, "ugetrlimit", 2, { { "unsigned int", "resource" }, { "struct compat_rlimit *", "rlim" } } },
{ 192, "mmap2", 6, { { "unsigned long", "addr" }, { "unsigned long", "len" }, { "unsigned long", "prot" }, { "unsigned long", "flags" }, { "unsigned long", "fd" }, { "unsigned long", "pgoff" } } },
{ 193, "truncate64", 3, { { "const char *", "filename" }, { "unsigned long", "offset_low" }, { "unsigned long", "offset_high" } } },
{ 194, "ftruncate64", 3, { { "unsigned int", "fd" }, { "unsigned long", "offset_low" }, { "unsigned long", "offset_high" } } },
{ 198, "lchown32", 3, { { "const char *", "filename" }, { "uid_t", "user" }, { "gid_t", "group" } } },
{ 199, "getuid32", 0, {} },
{ 200, "getgid32", 0, {} },
{ 201, "geteuid32", 0, {} },
{ 202, "getegid32", 0, {} },
{ 203, "setreuid32", 2, { { "uid_t", "ruid" }, { "uid_t", "euid" } } },
{ 204, "setregid32", 2, { { "gid_t", "rgid" }, { "gid_t", "egid" } } },
{ 205, "getgroups32", 2, { { "int", "gidsetsize" }, { "gid_t *", "grouplist" } } },
{ 206, "setgroups32", 2, { { "int", "gidsetsize" }, { "gid_t *", "grouplist" } } },
{ 207, "fchown32", 3, { { "unsigned int", "fd" }, { "uid_t", "user" }, { "gid_t", "group" } } },
{ 208, "setresuid32", 3, { { "uid_t", "ruid" }, { "uid_t", "euid" }, { "uid_t", "suid" } } },
{ 209, "getresuid32", 3, { { "uid_t *", "ruid" }, { "uid_t *", "euid" }, { "uid_t *", "suid" } } },
{ 210, "setresgid32", 3, { { "gid_t", "rgid" }, { "gid_t", "egid" }, { "gid_t", "sgid" } } },
{ 211, "getresgid32", 3, { { "gid_t *", "rgid" }, { "gid_t *", "egid" }, { "gid_t *", "sgid" } } },
{ 212, "chown32", 3, { { "const char *", "filename" }, { "uid_t", "user" }, { "gid_t", "group" } } },
{ 213, "setuid32", 1, { { "uid_t", "uid" } } },
{ 214, "setgid32", 1, { { "gid_t", "gid" } } },
{ 215, "setfsuid32", 1, { { "uid_t", "uid" } } },
{ 216, "setfsgid32", 1, { { "gid_t", "gid" } } },
{ 217, "pivot_root", 2, { { "const char *", "new_root" }, { "const char *", "put_old" } } },
{ 218, "mincore", 3, { { "unsigned long", "start" }, { "size_t", "len" }, { "unsigned char *", "vec" } } },
{ 219, "madvise", 3, { { "unsigned long", "start" }, { "size_t", "len_in" }, { "int", "behavior" } } },
{ 220, "getdents64", 3, { { "unsigned int", "fd" }, { "struct linux_dirent64 *", "dirent" }, { "unsigned int", "count" } } },
{ 221, "fcntl64", 3, { { "unsigned int", "fd" }, { "unsigned int", "cmd" }, { "compat_ulong_t", "arg" } } },
{ 224, "gettid", 0, {} },
{ 225, "readahead", 3, { { "int", "fd" }, { "loff_t", "offset" }, { "size_t", "count" } } },
{ 226, "setxattr", 5, { { "const char *", "pathname" }, { "const char *", "name" }, { "const void *", "value" }, { "size_t", "size" }, { "int", "flags" } } },
{ 227, "lsetxattr", 5, { { "const char *", "pathname" }, { "const char *", "name" }, { "const void *", "value" }, { "size_t", "size" }, { "int", "flags" } } },
{ 228, "fsetxattr", 5, { { "int", "fd" }, { "const char *", "name" }, { "const void *", "value" }, { "size_t", "size" }, { "int", "flags" } } },
{ 229, "getxattr", 4, { { "const char *", "pathname" }, { "const char *", "name" }, { "void *", "value" }, { "size_t", "size" } } },
{ 230, "lgetxattr", 4, { { "const char *", "pathname" }, { "const char *", "name" }, { "void *", "value" }, { "size_t", "size" } } },
{ 231, "fgetxattr", 4, { { "int", "fd" }, { "const char *", "name" }, { "void *", "value" }, { "size_t", "size" } } },
{ 232, "listxattr", 3, { { "const char *", "pathname" }, { "char *", "list" }, { "size_t", "size" } } },
{ 233, "llistxattr", 3, { { "const char *", "pathname" }, { "char *", "list" }, { "size_t", "size" } } },
{ 234, "flistxattr", 3, { { "int", "fd" }, { "char *", "list" }, { "size_t", "size" } } },
{ 235, "removexattr", 2, { { "const char *", "pathname" }, { "const char *", "name" } } },
{ 236, "lremovexattr", 2, { { "const char *", "pathname" }, { "const char *", "name" } } },
{ 237, "fremovexattr", 2, { { "int", "fd" }, { "const char *", "name" } } },
{ 238, "tkill", 2, { { "pid_t", "pid" }, { "int", "sig" } } },
{ 239, "sendfile64", 4, { { "int", "out_fd" }, { "int", "in_fd" }, { "compat_loff_t *", "offset" }, { "compat_size_t", "count" } } },
{ 240, "futex", 6, { { "u32 *", "uaddr" }, { "int", "op" }, { "u32", "val" }, { "const struct __kernel_timespec *", "utime" }, { "u32 *", "uaddr2" }, { "u32", "val3" } } },
{ 241, "sched_setaffinity", 3, { { "compat_pid_t", "pid" }, { "unsigned int", "len" }, { "compat_ulong_t *", "user_mask_ptr" } } },
{ 242, "sched_getaffinity", 3, { { "compat_pid_t", "pid" }, { "unsigned int", "len" }, { "compat_ulong_t *", "user_mask_ptr" } } },
{ 243, "set_thread_area", 1, { { "struct user_desc *", "user_desc" } } },
{ 244, "get_thread_area", 1, { { "struct user_desc *", "user_desc" } } },
{ 245, "io_setup", 2, { { "unsigned", "nr_events" }, { "u32 *", "ctx32p" } } },
{ 246, "io_destroy", 1, { { "aio_context_t", "ctx" } } },
{ 247, "io_getevents", 5, { { "aio_context_t", "ctx_id" }, { "long", "min_nr" }, { "long", "nr" }, { "struct io_event *", "events" }, { "struct __kernel_timespec *", "timeout" } } },
{ 248, "io_submit", 3, { { "compat_aio_context_t", "ctx_id" }, { "int", "nr" }, { "compat_uptr_t *", "iocbpp" } } },
{ 249, "io_cancel", 3, { { "aio_context_t", "ctx_id" }, { "struct iocb *", "iocb" }, { "struct io_event *", "result" } } },
{ 250, "fadvise64", 5, { { "int", "fd" }, { "unsigned int", "offset_lo" }, { "unsigned int", "offset_hi" }, { "size_t", "len" }, { "int", "advice" } } },
{ 252, "exit_group", 1, { { "int", "error_code" } } },
{ 254, "epoll_create", 1, { { "int", "size" } } },
{ 255, "epoll_ctl", 4, { { "int", "epfd" }, { "int", "op" }, { "int", "fd" }, { "struct epoll_event *", "event" } } },
{ 256, "epoll_wait", 4, { { "int", "epfd" }, { "struct epoll_event *", "events" }, { "int", "maxevents" }, { "int", "timeout" } } },
{ 257, "remap_file_pages", 5, { { "unsigned long", "start" }, { "unsigned long", "size" }, { "unsigned long", "prot" }, { "unsigned long", "pgoff" }, { "unsigned long", "flags" } } },
{ 258, "set_tid_address", 1, { { "int *", "tidptr" } } },
{ 259, "timer_create", 3, { { "clockid_t", "which_clock" }, { "struct compat_sigevent *", "timer_event_spec" }, { "timer_t *", "created_timer_id" } } },
{ 260, "timer_settime", 4, { { "timer_t", "timer_id" }, { "int", "flags" }, { "const struct __kernel_itimerspec *", "new_setting" }, { "struct __kernel_itimerspec *", "old_setting" } } },
{ 261, "timer_gettime", 2, { { "timer_t", "timer_id" }, { "struct __kernel_itimerspec *", "setting" } } },
{ 262, "timer_getoverrun", 1, { { "timer_t", "timer_id" } } },
{ 263, "timer_delete", 1, { { "timer_t", "timer_id" } } },
{ 264, "clock_settime", 2, { { "const clockid_t", "which_clock" }, { "const struct __kernel_timespec *", "tp" } } },
{ 265, "clock_gettime", 2, { { "const clockid_t", "which_clock" }, { "struct __kernel_timespec *", "tp" } } },
{ 266, "clock_getres", 2, { { "const clockid_t", "which_clock" }, { "struct __kernel_timespec *", "tp" } } },
{ 267, "clock_nanosleep", 4, { { "const clockid_t", "which_clock" }, { "int", "flags" }, { "const struct __kernel_timespec *", "rqtp" }, { "struct __kernel_timespec *", "rmtp" } } },
{ 268, "statfs64", 3, { { "const char *", "pathname" }, { "compat_size_t", "sz" }, { "struct compat_statfs64 *", "buf" } } },
{ 269, "fstatfs64", 3, { { "unsigned int", "fd" }, { "compat_size_t", "sz" }, { "struct compat_statfs64 *", "buf" } } },
{ 270, "tgkill", 3, { { "pid_t", "tgid" }, { "pid_t", "pid" }, { "int", "sig" } } },
{ 271, "utimes", 2, { { "char *", "filename" }, { "struct __kernel_old_timeval *", "utimes" } } },
{ 272, "fadvise64_64", 6, { { "int", "fd" }, { "__u32", "offset_low" }, { "__u32", "offset_high" }, { "__u32", "len_low" }, { "__u32", "len_high" }, { "int", "advice" } } },
{ 274, "mbind", 6, { { "unsigned long", "start" }, { "unsigned long", "len" }, { "unsigned long", "mode" }, { "const unsigned long *", "nmask" }, { "unsigned long", "maxnode" }, { "unsigned int", "flags" } } },
{ 275, "get_mempolicy", 5, { { "int *", "policy" }, { "unsigned long *", "nmask" }, { "unsigned long", "maxnode" }, { "unsigned long", "addr" }, { "unsigned long", "flags" } } },
{ 276, "set_mempolicy", 3, { { "int", "mode" }, { "const unsigned long *", "nmask" }, { "unsigned long", "maxnode" } } },
{ 277, "mq_open", 4, { { "const char *", "u_name" }, { "int", "oflag" }, { "compat_mode_t", "mode" }, { "struct compat_mq_attr *", "u_attr" } } },
{ 278, "mq_unlink", 1, { { "const char *", "u_name" } } },
{ 279, "mq_timedsend", 5, { { "mqd_t", "mqdes" }, { "const char *", "u_msg_ptr" }, { "size_t", "msg_len" }, { "unsigned int", "msg_prio" }, { "const struct __kernel_timespec *", "u_abs_timeout" } } },
{ 280, "mq_timedreceive", 5, { { "mqd_t", "mqdes" }, { "char *", "u_msg_ptr" }, { "size_t", "msg_len" }, { "unsigned int *", "u_msg_prio" }, { "const struct __kernel_timespec *", "u_abs_timeout" } } },
{ 281, "mq_notify", 2, { { "mqd_t", "mqdes" }, { "const struct compat_sigevent *", "u_notification" } } },
{ 282, "mq_getsetattr", 3, { { "mqd_t", "mqdes" }, { "const struct compat_mq_attr *", "u_mqstat" }, { "struct compat_mq_attr *", "u_omqstat" } } },
{ 283, "kexec_load", 4, { { "compat_ulong_t", "entry" }, { "compat_ulong_t", "nr_segments" }, { "struct compat_kexec_segment *", "segments" }, { "compat_ulong_t", "flags" } } },
{ 284, "waitid", 5, { { "int", "which" }, { "compat_pid_t", "pid" }, { "struct compat_siginfo *", "infop" }, { "int", "options" }, { "struct compat_rusage *", "uru" } } },
{ 286, "add_key", 5, { { "const char *", "_type" }, { "const char *", "_description" }, { "const void *", "_payload" }, { "size_t", "plen" }, { "key_serial_t", "ringid" } } },
{ 287, "request_key", 4, { { "const char *", "_type" }, { "const char *", "_description" }, { "const char *", "_callout_info" }, { "key_serial_t", "destringid" } } },
{ 288, "keyctl", 5, { { "u32", "option" }, { "u32", "arg2" }, { "u32", "arg3" }, { "u32", "arg4" }, { "u32", "arg5" } } },
{ 289, "ioprio_set", 3, { { "int", "which" }, { "int", "who" }, { "int", "ioprio" } } },
{ 290, "ioprio_get", 2, { { "int", "which" }, { "int", "who" } } },
{ 291, "inotify_init", 0, {} },
{ 292, "inotify_add_watch", 3, { { "int", "fd" }, { "const char *", "pathname" }, { "u32", "mask" } } },
{ 293, "inotify_rm_watch", 2, { { "int", "fd" }, { "__s32", "wd" } } },
{ 294, "migrate_pages", 4, { { "pid_t", "pid" }, { "unsigned long", "maxnode" }, { "const unsigned long *", "old_nodes" }, { "const unsigned long *", "new_nodes" } } },
{ 295, "openat", 4, { { "int", "dfd" }, { "const char *", "filename" }, { "int", "flags" }, { "umode_t", "mode" } } },
{ 296, "mkdirat", 3, { { "int", "dfd" }, { "const char *", "pathname" }, { "umode_t", "mode" } } },
{ 297, "mknodat", 4, { { "int", "dfd" }, { "const char *", "filename" }, { "umode_t", "mode" }, { "unsigned int", "dev" } } },
{ 298, "fchownat", 5, { { "int", "dfd" }, { "const char *", "filename" }, { "uid_t", "user" }, { "gid_t", "group" }, { "int", "flag" } } },
{ 299, "futimesat", 3, { { "int", "dfd" }, { "const char *", "filename" }, { "struct __kernel_old_timeval *", "utimes" } } },
{ 301, "unlinkat", 3, { { "int", "dfd" }, { "const char *", "pathname" }, { "int", "flag" } } },
{ 302, "renameat", 4, { { "int", "olddfd" }, { "const char *", "oldname" }, { "int", "newdfd" }, { "const char *", "newname" } } },
{ 303, "linkat", 5, { { "int", "olddfd" }, { "const char *", "oldname" }, { "int", "newdfd" }, { "const char *", "newname" }, { "int", "flags" } } },
{ 304, "symlinkat", 3, { { "const char *", "oldname" }, { "int", "newdfd" }, { "const char *", "newname" } } },
{ 305, "readlinkat", 4, { { "int", "dfd" }, { "const char *", "pathname" }, { "char *", "buf" }, { "int", "bufsiz" } } },
{ 306, "fchmodat", 3, { { "int", "dfd" }, { "const char *", "filename" }, { "umode_t", "mode" } } },
{ 307, "faccessat", 3, { { "int", "dfd" }, { "const char *", "filename" }, { "int", "mode" } } },
{ 308, "pselect6", 6, { { "int", "n" }, { "fd_set *", "inp" }, { "fd_set *", "outp" }, { "fd_set *", "exp" }, { "struct __kernel_timespec *", "tsp" }, { "void *", "sig" } } },
{ 309, "ppoll", 5, { { "struct pollfd *", "ufds" }, { "unsigned int", "nfds" }, { "struct __kernel_timespec *", "tsp" }, { "const sigset_t *", "sigmask" }, { "size_t", "sigsetsize" } } },
{ 310, "unshare", 1, { { "unsigned long", "unshare_flags" } } },
{ 311, "set_robust_list", 2, { { "struct compat_robust_list_head *", "head" }, { "compat_size_t", "len" } } },
{ 312, "get_robust_list", 3, { { "int", "pid" }, { "compat_uptr_t *", "head_ptr" }, { "compat_size_t *", "len_ptr" } } },
{ 313, "splice", 6, { { "int", "fd_in" }, { "loff_t *", "off_in" }, { "int", "fd_out" }, { "loff_t *", "off_out" }, { "size_t", "len" }, { "unsigned int", "flags" } } },
{ 314, "sync_file_range", 4, { { "int", "fd" }, { "loff_t", "offset" }, { "loff_t", "nbytes" }, { "unsigned int", "flags" } } },
{ 315, "tee", 4, { { "int", "fdin" }, { "int", "fdout" }, { "size_t", "len" }, { "unsigned int", "flags" } } },
{ 316, "vmsplice", 4, { { "int", "fd" }, { "const struct iovec *", "uiov" }, { "unsigned long", "nr_segs" }, { "unsigned int", "flags" } } },
{ 317, "move_pages", 6, { { "pid_t", "pid" }, { "unsigned long", "nr_pages" }, { "const void * *", "pages" }, { "const int *", "nodes" }, { "int *", "status" }, { "int", "flags" } } },
{ 318, "getcpu", 3, { { "unsigned *", "cpup" }, { "unsigned *", "nodep" }, { "struct getcpu_cache *", "unused" } } },
{ 319, "epoll_pwait", 6, { { "int", "epfd" }, { "struct epoll_event *", "events" }, { "int", "maxevents" }, { "int", "timeout" }, { "const compat_sigset_t *", "sigmask" }, { "compat_size_t", "sigsetsize" } } },
{ 320, "utimensat", 4, { { "int", "dfd" }, { "const char *", "filename" }, { "struct __kernel_timespec *", "utimes" }, { "int", "flags" } } },
{ 321, "signalfd", 3, { { "int", "ufd" }, { "const compat_sigset_t *", "user_mask" }, { "compat_size_t", "sigsetsize" } } },
{ 322, "timerfd_create", 2, { { "int", "clockid" }, { "int", "flags" } } },
{ 323, "eventfd", 1, { { "unsigned int", "count" } } },
{ 324, "fallocate", 4, { { "int", "fd" }, { "int", "mode" }, { "loff_t", "offset" }, { "loff_t", "len" } } },
{ 325, "timerfd_settime", 4, { { "int", "ufd" }, { "int", "flags" }, { "const struct __kernel_itimerspec *", "utmr" }, { "struct __kernel_itimerspec *", "otmr" } } },
{ 326, "timerfd_gettime", 2, { { "int", "ufd" }, { "struct __kernel_itimerspec *", "otmr" } } },
{ 327, "signalfd4", 4, { { "int", "ufd" }, { "const compat_sigset_t *", "user_mask" }, { "compat_size_t", "sigsetsize" }, { "int", "flags" } } },
{ 328, "eventfd2", 2, { { "unsigned int", "count" }, { "int", "flags" } } },
{ 329, "epoll_create1", 1, { { "int", "flags" } } },
{ 330, "dup3", 3, { { "unsigned int", "oldfd" }, { "unsigned int", "newfd" }, { "int", "flags" } } },
{ 331, "pipe2", 2, { { "int *", "fildes" }, { "int", "flags" } } },
{ 332, "inotify_init1", 1, { { "int", "flags" } } },
{ 333, "preadv", 5, { { "compat_ulong_t", "fd" }, { "const struct iovec *", "vec" }, { "compat_ulong_t", "vlen" }, { "u32", "pos_low" }, { "u32", "pos_high" } } },
{ 334, "pwritev", 5, { { "compat_ulong_t", "fd" }, { "const struct iovec *", "vec" }, { "compat_ulong_t", "vlen" }, { "u32", "pos_low" }, { "u32", "pos_high" } } },
{ 335, "rt_tgsigqueueinfo", 4, { { "compat_pid_t", "tgid" }, { "compat_pid_t", "pid" }, { "int", "sig" }, { "struct compat_siginfo *", "uinfo" } } },
{ 336, "perf_event_open", 5, { { "struct perf_event_attr *", "attr_uptr" }, { "pid_t", "pid" }, { "int", "cpu" }, { "int", "group_fd" }, { "unsigned long", "flags" } } },
{ 337, "recvmmsg", 5, { { "int", "fd" }, { "struct mmsghdr *", "mmsg" }, { "unsigned int", "vlen" }, { "unsigned int", "flags" }, { "struct __kernel_timespec *", "timeout" } } },
{ 338, "fanotify_init", 2, { { "unsigned int", "flags" }, { "unsigned int", "event_f_flags" } } },
{ 339, "fanotify_mark", 5, { { "int", "fanotify_fd" }, { "unsigned int", "flags" }, { "__u64", "mask" }, { "int", "dfd" }, { "const char *", "pathname" } } },
{ 340, "prlimit64", 4, { { "pid_t", "pid" }, { "unsigned int", "resource" }, { "const struct rlimit64 *", "new_rlim" }, { "struct rlimit64 *", "old_rlim" } } },
{ 341, "name_to_handle_at", 5, { { "int", "dfd" }, { "const char *", "name" }, { "struct file_handle *", "handle" }, { "void *", "mnt_id" }, { "int", "flag" } } },
{ 342, "open_by_handle_at", 3, { { "int", "mountdirfd" }, { "struct file_handle *", "handle" }, { "int", "flags" } } },
{ 343, "clock_adjtime", 2, { { "const clockid_t", "which_clock" }, { "struct __kernel_timex *", "utx" } } },
{ 344, "syncfs", 1, { { "int", "fd" } } },
{ 345, "sendmmsg", 4, { { "int", "fd" }, { "struct compat_mmsghdr *", "mmsg" }, { "unsigned int", "vlen" }, { "unsigned int", "flags" } } },
{ 346, "setns", 2, { { "int", "fd" }, { "int", "flags" } } },
{ 347, "process_vm_readv", 6, { { "pid_t", "pid" }, { "const struct iovec *", "lvec" }, { "unsigned long", "liovcnt" }, { "const struct iovec *", "rvec" }, { "unsigned long", "riovcnt" }, { "unsigned long", "flags" } } },
{ 348, "process_vm_writev", 6, { { "pid_t", "pid" }, { "const struct iovec *", "lvec" }, { "unsigned long", "liovcnt" }, { "const struct iovec *", "rvec" }, { "unsigned long", "riovcnt" }, { "unsigned long", "flags" } } },
{ 349, "kcmp", 5, { { "pid_t", "pid1" }, { "pid_t", "pid2" }, { "int", "type" }, { "unsigned long", "idx1" }, { "unsigned long", "idx2" } } },
{ 350, "finit_module", 3, { { "int", "fd" }, { "const char *", "uargs" }, { "int", "flags" } } },
{ 351, "sched_setattr", 3, { { "pid_t", "pid" }, { "struct sched_attr *", "uattr" }, { "unsigned int", "flags" } } },
{ 352, "sched_getattr", 4, { { "pid_t", "pid" }, { "struct sched_attr *", "uattr" }, { "unsigned int", "usize" }, { "unsigned int", "flags" } } },
{ 353, "renameat2", 5, { { "int", "olddfd" }, { "const char *", "oldname" }, { "int", "newdfd" }, { "const char *", "newname" }, { "unsigned int", "flags" } } },
{ 354, "seccomp", 3, { { "unsigned int", "op" }, { "unsigned int", "flags" }, { "void *", "uargs" } } },
{ 355, "getrandom", 3, { { "char *", "ubuf" }, { "size_t", "len" }, { "unsigned int", "flags" } } },
{ 356, "memfd_create", 2, { { "const char *", "uname" }, { "unsigned int", "flags" } } },
{ 357, "bpf", 3, { { "int", "cmd" }, { "union bpf_attr *", "uattr" }, { "unsigned int", "size" } } },
{ 358, "execveat", 5, { { "int", "fd" }, { "const char *", "filename" }, { "const compat_uptr_t *", "argv" }, { "const compat_uptr_t *", "envp" }, { "int", "flags" } } },
{ 359, "socket", 3, { { "int", "family" }, { "int", "type" }, { "int", "protocol" } } },
{ 360, "socketpair", 4, { { "int", "family" }, { "int", "type" }, { "int", "protocol" }, { "int *", "usockvec" } } },
{ 361, "bind", 3, { { "int", "fd" }, { "struct sockaddr *", "umyaddr" }, { "int", "addrlen" } } },
{ 362, "connect", 3, { { "int", "fd" }, { "struct sockaddr *", "uservaddr" }, { "int", "addrlen" } } },
{ 363, "listen", 2, { { "int", "fd" }, { "int", "backlog" } } },
{ 364, "accept4", 4, { { "int", "fd" }, { "struct sockaddr *", "upeer_sockaddr" }, { "int *", "upeer_addrlen" }, { "int", "flags" } } },
{ 365, "getsockopt", 5, { { "int", "fd" }, { "int", "level" }, { "int", "optname" }, { "char *", "optval" }, { "int *", "optlen" } } },
{ 366, "setsockopt", 5, { { "int", "fd" }, { "int", "level" }, { "int", "optname" }, { "char *", "optval" }, { "int", "optlen" } } },
{ 367, "getsockname", 3, { { "int", "fd" }, { "struct sockaddr *", "usockaddr" }, { "int *", "usockaddr_len" } } },
{ 368, "getpeername", 3, { { "int", "fd" }, { "struct sockaddr *", "usockaddr" }, { "int *", "usockaddr_len" } } },
{ 369, "sendto", 6, { { "int", "fd" }, { "void *", "buff" }, { "size_t", "len" }, { "unsigned int", "flags" }, { "struct sockaddr *", "addr" }, { "int", "addr_len" } } },
{ 370, "sendmsg", 3, { { "int", "fd" }, { "struct compat_msghdr *", "msg" }, { "unsigned int", "flags" } } },
{ 371, "recvfrom", 6, { { "int", "fd" }, { "void *", "buf" }, { "compat_size_t", "len" }, { "unsigned int", "flags" }, { "struct sockaddr *", "addr" }, { "int *", "addrlen" } } },
{ 372, "recvmsg", 3, { { "int", "fd" }, { "struct compat_msghdr *", "msg" }, { "unsigned int", "flags" } } },
{ 373, "shutdown", 2, { { "int", "fd" }, { "int", "how" } } },
{ 374, "userfaultfd", 1, { { "int", "flags" } } },
{ 375, "membarrier", 3, { { "int", "cmd" }, { "unsigned int", "flags" }, { "int", "cpu_id" } } },
{ 376, "mlock2", 3, { { "unsigned long", "start" }, { "size_t", "len" }, { "int", "flags" } } },
{ 377, "copy_file_range", 6, { { "int", "fd_in" }, { "loff_t *", "off_in" }, { "int", "fd_out" }, { "loff_t *", "off_out" }, { "size_t", "len" }, { "unsigned int", "flags" } } },
{ 378, "preadv2", 6, { { "compat_ulong_t", "fd" }, { "const struct iovec *", "vec" }, { "compat_ulong_t", "vlen" }, { "u32", "pos_low" }, { "u32", "pos_high" }, { "rwf_t", "flags" } } },
{ 379, "pwritev2", 6, { { "compat_ulong_t", "fd" }, { "const struct iovec *", "vec" }, { "compat_ulong_t", "vlen" }, { "u32", "pos_low" }, { "u32", "pos_high" }, { "rwf_t", "flags" } } },
{ 380, "pkey_mprotect", 4, { { "unsigned long", "start" }, { "size_t", "len" }, { "unsigned long", "prot" }, { "int", "pkey" } } },
{ 381, "pkey_alloc", 2, { { "unsigned long", "flags" }, { "unsigned long", "init_val" } } },
{ 382, "pkey_free", 1, { { "int", "pkey" } } },
{ 383, "statx", 5, { { "int", "dfd" }, { "const char *", "filename" }, { "unsigned", "flags" }, { "unsigned int", "mask" }, { "struct statx *", "buffer" } } },
{ 384, "arch_prctl", 2, { { "int", "option" }, { "unsigned long", "arg2" } } },
{ 385, "io_pgetevents", 6, { { "compat_aio_context_t", "ctx_id" }, { "compat_long_t", "min_nr" }, { "compat_long_t", "nr" }, { "struct io_event *", "events" }, { "struct old_timespec32 *", "timeout" }, { "const struct __compat_aio_sigset *", "usig" } } },
{ 386, "rseq", 4, { { "struct rseq *", "rseq" }, { "u32", "rseq_len" }, { "int", "flags" }, { "u32", "sig" } } },
{ 393, "semget", 3, { { "key_t", "key" }, { "int", "nsems" }, { "int", "semflg" } } },
{ 394, "semctl", 4, { { "int", "semid" }, { "int", "semnum" }, { "int", "cmd" }, { "int", "arg" } } },
{ 395, "shmget", 3, { { "key_t", "key" }, { "size_t", "size" }, { "int", "shmflg" } } },
{ 396, "shmctl", 3, { { "int", "shmid" }, { "int", "cmd" }, { "void *", "uptr" } } },
{ 397, "shmat", 3, { { "int", "shmid" }, { "compat_uptr_t", "shmaddr" }, { "int", "shmflg" } } },
{ 398, "shmdt", 1, { { "char *", "shmaddr" } } },
{ 399, "msgget", 2, { { "key_t", "key" }, { "int", "msgflg" } } },
{ 400, "msgsnd", 4, { { "int", "msqid" }, { "compat_uptr_t", "msgp" }, { "compat_ssize_t", "msgsz" }, { "int", "msgflg" } } },
{ 401, "msgrcv", 5, { { "int", "msqid" }, { "compat_uptr_t", "msgp" }, { "compat_ssize_t", "msgsz" }, { "compat_long_t", "msgtyp" }, { "int", "msgflg" } } },
{ 402, "msgctl", 3, { { "int", "msqid" }, { "int", "cmd" }, { "void *", "uptr" } } },
{ 403, "clock_gettime64", 2, { { "clockid_t", "which_clock" }, { "struct __kernel_timespec *", "tp" } } },
{ 404, "clock_settime64", 2, { { "clockid_t", "which_clock" }, { "const struct __kernel_timespec *", "tp" } } },
{ 405, "clock_adjtime64", 2, { { "clockid_t", "which_clock" }, { "struct __kernel_timex *", "tx" } } },
{ 406, "clock_getres_time64", 2, { { "clockid_t", "which_clock" }, { "struct __kernel_timespec *", "tp" } } },
{ 407, "clock_nanosleep_time64", 4, { { "clockid_t", "which_clock" }, { "int", "flags" }, { "const struct __kernel_timespec *", "rqtp" }, { "struct __kernel_timespec *", "rmtp" } } },
{ 408, "timer_gettime64", 2, { { "timer_t", "timer_id" }, { "struct __kernel_itimerspec *", "setting" } } },
{ 409, "timer_settime64", 4, { { "timer_t", "timer_id" }, { "int", "flags" }, { "const struct __kernel_itimerspec *", "new_setting" }, { "struct __kernel_itimerspec *", "old_setting" } } },
{ 410, "timerfd_gettime64", 2, { { "int", "ufd" }, { "struct __kernel_itimerspec *", "otmr" } } },
{ 411, "timerfd_settime64", 4, { { "int", "ufd" }, { "int", "flags" }, { "const struct __kernel_itimerspec *", "utmr" }, { "struct __kernel_itimerspec *", "otmr" } } },
{ 412, "utimensat_time64", 4, { { "int", "dfd" }, { "const char *", "filename" }, { "struct __kernel_timespec *", "utimes" }, { "int", "flags" } } },
{ 413, "pselect6_time64", 6, { { "int", "n" }, { "compat_ulong_t *", "inp" }, { "compat_ulong_t *", "outp" }, { "compat_ulong_t *", "exp" }, { "struct __kernel_timespec *", "tsp" }, { "void *", "sig" } } },
{ 414, "ppoll_time64", 5, { { "struct pollfd *", "ufds" }, { "unsigned int", "nfds" }, { "struct __kernel_timespec *", "tsp" }, { "const compat_sigset_t *", "sigmask" }, { "compat_size_t", "sigsetsize" } } },
{ 416, "io_pgetevents_time64", 6, { { "compat_aio_context_t", "ctx_id" }, { "compat_long_t", "min_nr" }, { "compat_long_t", "nr" }, { "struct io_event *", "events" }, { "struct __kernel_timespec *", "timeout" }, { "const struct __compat_aio_sigset *", "usig" } } },
{ 417, "recvmmsg_time64", 5, { { "int", "fd" }, { "struct compat_mmsghdr *", "mmsg" }, { "unsigned int", "vlen" }, { "unsigned int", "flags" }, { "struct __kernel_timespec *", "timeout" } } },
{ 418, "mq_timedsend_time64", 5, { { "mqd_t", "mqdes" }, { "const char *", "msg_ptr" }, { "size_t", "msg_len" }, { "unsigned int", "msg_prio" }, { "const struct __kernel_timespec *", "abs_timeout" } } },
{ 419, "mq_timedreceive_time64", 5, { { "mqd_t", "mqdes" }, { "char *", "msg_ptr" }, { "size_t", "msg_len" }, { "unsigned int *", "msg_prio" }, { "const struct __kernel_timespec *", "abs_timeout" } } },
{ 420, "semtimedop_time64", 4, { { "int", "semid" }, { "struct sembuf *", "sops" }, { "unsigned", "nsops" }, { "const struct __kernel_timespec *", "timeout" } } },
{ 421, "rt_sigtimedwait_time64", 4, { { "compat_sigset_t *", "uthese" }, { "struct compat_siginfo *", "uinfo" }, { "struct __kernel_timespec *", "uts" }, { "compat_size_t", "sigsetsize" } } },
{ 422, "futex_time64", 6, { { "u32 *", "uaddr" }, { "int", "op" }, { "u32", "val" }, { "const struct __kernel_timespec *", "utime" }, { "u32 *", "uaddr2" }, { "u32", "val3" } } },
{ 423, "sched_rr_get_interval_time64", 2, { { "pid_t", "pid" }, { "struct __kernel_timespec *", "interval" } } },
{ 424, "pidfd_send_signal", 4, { { "int", "pidfd" }, { "int", "sig" }, { "siginfo_t *", "info" }, { "unsigned int", "flags" } } },
{ 425, "io_uring_setup", 2, { { "u32", "entries" }, { "struct io_uring_params *", "params" } } },
{ 426, "io_uring_enter", 6, { { "unsigned int", "fd" }, { "u32", "to_submit" }, { "u32", "min_complete" }, { "u32", "flags" }, { "const void *", "argp" }, { "size_t", "argsz" } } },
{ 427, "io_uring_register", 4, { { "unsigned int", "fd" }, { "unsigned int", "opcode" }, { "void *", "arg" }, { "unsigned int", "nr_args" } } },
{ 428, "open_tree", 3, { { "int", "dfd" }, { "const char *", "filename" }, { "unsigned", "flags" } } },
{ 429, "move_mount", 5, { { "int", "from_dfd" }, { "const char *", "from_pathname" }, { "int", "to_dfd" }, { "const char *", "to_pathname" }, { "unsigned int", "flags" } } },
{ 430, "fsopen", 2, { { "const char *", "_fs_name" }, { "unsigned int", "flags" } } },
{ 431, "fsconfig", 5, { { "int", "fd" }, { "unsigned int", "cmd" }, { "const char *", "_key" }, { "const void *", "_value" }, { "int", "aux" } } },
{ 432, "fsmount", 3, { { "int", "fs_fd" }, { "unsigned int", "flags" }, { "unsigned int", "attr_flags" } } },
{ 433, "fspick", 3, { { "int", "dfd" }, { "const char *", "path" }, { "unsigned int", "flags" } } },
{ 434, "pidfd_open", 2, { { "pid_t", "pid" }, { "unsigned int", "flags" } } },
{ 435, "clone3", 2, { { "struct clone_args *", "uargs" }, { "size_t", "size" } } },
{ 436, "close_range", 3, { { "unsigned int", "fd" }, { "unsigned int", "max_fd" }, { "unsigned int", "flags" } } },
{ 437, "openat2", 4, { { "int", "dfd" }, { "const char *", "filename" }, { "struct open_how *", "how" }, { "size_t", "usize" } } },
{ 438, "pidfd_getfd", 3, { { "int", "pidfd" }, { "int", "fd" }, { "unsigned int", "flags" } } },
{ 439, "faccessat2", 4, { { "int", "dfd" }, { "const char *", "filename" }, { "int", "mode" }, { "int", "flags" } } },
{ 440, "process_madvise", 5, { { "int", "pidfd" }, { "const struct iovec *", "vec" }, { "size_t", "vlen" }, { "int", "behavior" }, { "unsigned int", "flags" } } },
{ 441, "epoll_pwait2", 6, { { "int", "epfd" }, { "struct epoll_event *", "events" }, { "int", "maxevents" }, { "const struct __kernel_timespec *", "timeout" }, { "const compat_sigset_t *", "sigmask" }, { "compat_size_t", "sigsetsize" } } },
{ 442, "mount_setattr", 5, { { "int", "dfd" }, { "const char *", "path" }, { "unsigned int", "flags" }, { "struct mount_attr *", "uattr" }, { "size_t", "usize" } } },
{ 443, "quotactl_fd", 4, { { "unsigned int", "fd" }, { "unsigned int", "cmd" }, { "qid_t", "id" }, { "void *", "addr" } } },
{ 444, "landlock_create_ruleset", 3, { { "const struct landlock_ruleset_attr *const", "attr" }, { "const size_t", "size" }, { "const __u32", "flags" } } },
{ 445, "landlock_add_rule", 4, { { "const int", "ruleset_fd" }, { "const enum landlock_rule_type", "rule_type" }, { "const void *const", "rule_attr" }, { "const __u32", "flags" } } },
{ 446, "landlock_restrict_self", 2, { { "const int", "ruleset_fd" }, { "const __u32", "flags" } } },
{ 447, "memfd_secret", 1, { { "unsigned int", "flags" } } },
{ 448, "process_mrelease", 2, { { "int", "pidfd" }, { "unsigned int", "flags" } } },
{ 449, "futex_waitv", 5, { { "struct futex_waitv *", "waiters" }, { "unsigned int", "nr_futexes" }, { "unsigned int", "flags" }, { "struct __kernel_timespec *", "timeout" }, { "clockid_t", "clockid" } } },
{ 450, "set_mempolicy_home_node", 4, { { "unsigned long", "start" }, { "unsigned long", "len" }, { "unsigned long", "home_node" }, { "unsigned long", "flags" } } },
{ 451, "cachestat", 4, { { "unsigned int", "fd" }, { "struct cachestat_range *", "cstat_range" }, { "struct cachestat *", "cstat" }, { "unsigned int", "flags" } } },
{ 452, "fchmodat2", 4, { { "int", "dfd" }, { "const char *", "filename" }, { "umode_t", "mode" }, { "unsigned int", "flags" } } },
{ 453, "map_shadow_stack", 3, { { "unsigned long", "addr" }, { "unsigned long", "size" }, { "unsigned int", "flags" } } },
{ 454, "futex_wake", 4, { { "void *", "uaddr" }, { "unsigned long", "mask" }, { "int", "nr" }, { "unsigned int", "flags" } } },
{ 455, "futex_wait", 6, { { "void *", "uaddr" }, { "unsigned long", "val" }, { "unsigned long", "mask" }, { "unsigned int", "flags" }, { "struct __kernel_timespec *", "timeout" }, { "clockid_t", "clockid" } } },
{ 456, "futex_requeue", 4, { { "struct futex_waitv *", "waiters" }, { "unsigned int", "flags" }, { "int", "nr_wake" }, { "int", "nr_requeue" } } },
{ 457, "statmount", 4, { { "const struct mnt_id_req *", "req" }, { "struct statmount *", "buf" }, { "size_t", "bufsize" }, { "unsigned int", "flags" } } },
{ 458, "listmount", 4, { { "const struct mnt_id_req *", "req" }, { "u64 *", "mnt_ids" }, { "size_t", "nr_mnt_ids" }, { "unsigned int", "flags" } } },
{ 459, "lsm_get_self_attr", 4, { { "unsigned int", "attr" }, { "struct lsm_ctx *", "ctx" }, { "u32 *", "size" }, { "u32", "flags" } } },
{ 460, "lsm_set_self_attr", 4, { { "unsigned int", "attr" }, { "struct lsm_ctx *", "ctx" }, { "u32", "size" }, { "u32", "flags" } } },
{ 461, "lsm_list_modules", 3, { { "u64 *", "ids" }, { "u32 *", "size" }, { "u32", "flags" } } },
{ 462, "mseal", 3, { { "unsigned long", "start" }, { "size_t", "len" }, { "unsigned long", "flags" } } },
{ 463, "setxattrat", 6, { { "int", "dfd" }, { "const char *", "pathname" }, { "unsigned int", "at_flags" }, { "const char *", "name" }, { "const struct xattr_args *", "uargs" }, { "size_t", "usize" } } },
{ 464, "getxattrat", 6, { { "int", "dfd" }, { "const char *", "pathname" }, { "unsigned int", "at_flags" }, { "const char *", "name" }, { "struct xattr_args *", "uargs" }, { "size_t", "usize" } } },
{ 465, "listxattrat", 5, { { "int", "dfd" }, { "const char *", "pathname" }, { "unsigned int", "at_flags" }, { "char *", "list" }, { "size_t", "size" } } },
{ 466, "removexattrat", 4, { { "int", "dfd" }, { "const char *", "pathname" }, { "unsigned int", "at_flags" }, { "const char *", "name" } } },
{ 467, "open_tree_attr", 5, { { "int", "dfd" }, { "const char *", "filename" }, { "unsigned", "flags" }, { "struct mount_attr *", "uattr" }, { "size_t", "usize" } } },
{ 468, "file_getattr", 5, { { "int", "dfd" }, { "const char *", "filename" }, { "struct file_attr *", "ufattr" }, { "size_t", "usize" }, { "unsigned int", "at_flags" } } },
{ 469, "file_setattr", 5, { { "int", "dfd" }, { "const char *", "filename" }, { "struct file_attr *", "ufattr" }, { "size_t", "usize" }, { "unsigned int", "at_flags" } } },
{ 470, "listns", 4, { { "const struct ns_id_req *", "req" }, { "u64 *", "ns_ids" }, { "size_t", "nr_ns_ids" }, { "unsigned int", "flags" } } },
};
FridaLinuxSyscallSignature *
frida_get_syscall_signatures (int * len)
{
if (len != NULL)
*len = G_N_ELEMENTS (frida_syscall_signatures);
return (FridaLinuxSyscallSignature *) frida_syscall_signatures;
}
FridaLinuxSyscallSignature *
frida_get_compat32_syscall_signatures (int * len)
{
if (len != NULL)
*len = G_N_ELEMENTS (frida_compat32_syscall_signatures);
return (FridaLinuxSyscallSignature *) frida_compat32_syscall_signatures;
}
+815
View File
@@ -0,0 +1,815 @@
// AUTO-GENERATED FILE. DO NOT EDIT.
namespace Frida {
public enum LinuxSyscall {
READ = 0,
WRITE = 1,
OPEN = 2,
CLOSE = 3,
STAT = 4,
FSTAT = 5,
LSTAT = 6,
POLL = 7,
LSEEK = 8,
MMAP = 9,
MPROTECT = 10,
MUNMAP = 11,
BRK = 12,
RT_SIGACTION = 13,
RT_SIGPROCMASK = 14,
RT_SIGRETURN = 15,
IOCTL = 16,
PREAD64 = 17,
PWRITE64 = 18,
READV = 19,
WRITEV = 20,
ACCESS = 21,
PIPE = 22,
SELECT = 23,
SCHED_YIELD = 24,
MREMAP = 25,
MSYNC = 26,
MINCORE = 27,
MADVISE = 28,
SHMGET = 29,
SHMAT = 30,
SHMCTL = 31,
DUP = 32,
DUP2 = 33,
PAUSE = 34,
NANOSLEEP = 35,
GETITIMER = 36,
ALARM = 37,
SETITIMER = 38,
GETPID = 39,
SENDFILE = 40,
SOCKET = 41,
CONNECT = 42,
ACCEPT = 43,
SENDTO = 44,
RECVFROM = 45,
SENDMSG = 46,
RECVMSG = 47,
SHUTDOWN = 48,
BIND = 49,
LISTEN = 50,
GETSOCKNAME = 51,
GETPEERNAME = 52,
SOCKETPAIR = 53,
SETSOCKOPT = 54,
GETSOCKOPT = 55,
CLONE = 56,
FORK = 57,
VFORK = 58,
EXECVE = 59,
EXIT = 60,
WAIT4 = 61,
KILL = 62,
UNAME = 63,
SEMGET = 64,
SEMOP = 65,
SEMCTL = 66,
SHMDT = 67,
MSGGET = 68,
MSGSND = 69,
MSGRCV = 70,
MSGCTL = 71,
FCNTL = 72,
FLOCK = 73,
FSYNC = 74,
FDATASYNC = 75,
TRUNCATE = 76,
FTRUNCATE = 77,
GETDENTS = 78,
GETCWD = 79,
CHDIR = 80,
FCHDIR = 81,
RENAME = 82,
MKDIR = 83,
RMDIR = 84,
CREAT = 85,
LINK = 86,
UNLINK = 87,
SYMLINK = 88,
READLINK = 89,
CHMOD = 90,
FCHMOD = 91,
CHOWN = 92,
FCHOWN = 93,
LCHOWN = 94,
UMASK = 95,
GETTIMEOFDAY = 96,
GETRLIMIT = 97,
GETRUSAGE = 98,
SYSINFO = 99,
TIMES = 100,
PTRACE = 101,
GETUID = 102,
SYSLOG = 103,
GETGID = 104,
SETUID = 105,
SETGID = 106,
GETEUID = 107,
GETEGID = 108,
SETPGID = 109,
GETPPID = 110,
GETPGRP = 111,
SETSID = 112,
SETREUID = 113,
SETREGID = 114,
GETGROUPS = 115,
SETGROUPS = 116,
SETRESUID = 117,
GETRESUID = 118,
SETRESGID = 119,
GETRESGID = 120,
GETPGID = 121,
SETFSUID = 122,
SETFSGID = 123,
GETSID = 124,
CAPGET = 125,
CAPSET = 126,
RT_SIGPENDING = 127,
RT_SIGTIMEDWAIT = 128,
RT_SIGQUEUEINFO = 129,
RT_SIGSUSPEND = 130,
SIGALTSTACK = 131,
UTIME = 132,
MKNOD = 133,
PERSONALITY = 135,
USTAT = 136,
STATFS = 137,
FSTATFS = 138,
SYSFS = 139,
GETPRIORITY = 140,
SETPRIORITY = 141,
SCHED_SETPARAM = 142,
SCHED_GETPARAM = 143,
SCHED_SETSCHEDULER = 144,
SCHED_GETSCHEDULER = 145,
SCHED_GET_PRIORITY_MAX = 146,
SCHED_GET_PRIORITY_MIN = 147,
SCHED_RR_GET_INTERVAL = 148,
MLOCK = 149,
MUNLOCK = 150,
MLOCKALL = 151,
MUNLOCKALL = 152,
VHANGUP = 153,
MODIFY_LDT = 154,
PIVOT_ROOT = 155,
_SYSCTL = 156,
PRCTL = 157,
ARCH_PRCTL = 158,
ADJTIMEX = 159,
SETRLIMIT = 160,
CHROOT = 161,
SYNC = 162,
ACCT = 163,
SETTIMEOFDAY = 164,
MOUNT = 165,
UMOUNT2 = 166,
SWAPON = 167,
SWAPOFF = 168,
REBOOT = 169,
SETHOSTNAME = 170,
SETDOMAINNAME = 171,
IOPL = 172,
IOPERM = 173,
INIT_MODULE = 175,
DELETE_MODULE = 176,
QUOTACTL = 179,
GETTID = 186,
READAHEAD = 187,
SETXATTR = 188,
LSETXATTR = 189,
FSETXATTR = 190,
GETXATTR = 191,
LGETXATTR = 192,
FGETXATTR = 193,
LISTXATTR = 194,
LLISTXATTR = 195,
FLISTXATTR = 196,
REMOVEXATTR = 197,
LREMOVEXATTR = 198,
FREMOVEXATTR = 199,
TKILL = 200,
TIME = 201,
FUTEX = 202,
SCHED_SETAFFINITY = 203,
SCHED_GETAFFINITY = 204,
SET_THREAD_AREA = 205,
IO_SETUP = 206,
IO_DESTROY = 207,
IO_GETEVENTS = 208,
IO_SUBMIT = 209,
IO_CANCEL = 210,
GET_THREAD_AREA = 211,
EPOLL_CREATE = 213,
REMAP_FILE_PAGES = 216,
GETDENTS64 = 217,
SET_TID_ADDRESS = 218,
RESTART_SYSCALL = 219,
SEMTIMEDOP = 220,
FADVISE64 = 221,
TIMER_CREATE = 222,
TIMER_SETTIME = 223,
TIMER_GETTIME = 224,
TIMER_GETOVERRUN = 225,
TIMER_DELETE = 226,
CLOCK_SETTIME = 227,
CLOCK_GETTIME = 228,
CLOCK_GETRES = 229,
CLOCK_NANOSLEEP = 230,
EXIT_GROUP = 231,
EPOLL_WAIT = 232,
EPOLL_CTL = 233,
TGKILL = 234,
UTIMES = 235,
MBIND = 237,
SET_MEMPOLICY = 238,
GET_MEMPOLICY = 239,
MQ_OPEN = 240,
MQ_UNLINK = 241,
MQ_TIMEDSEND = 242,
MQ_TIMEDRECEIVE = 243,
MQ_NOTIFY = 244,
MQ_GETSETATTR = 245,
KEXEC_LOAD = 246,
WAITID = 247,
ADD_KEY = 248,
REQUEST_KEY = 249,
KEYCTL = 250,
IOPRIO_SET = 251,
IOPRIO_GET = 252,
INOTIFY_INIT = 253,
INOTIFY_ADD_WATCH = 254,
INOTIFY_RM_WATCH = 255,
MIGRATE_PAGES = 256,
OPENAT = 257,
MKDIRAT = 258,
MKNODAT = 259,
FCHOWNAT = 260,
FUTIMESAT = 261,
NEWFSTATAT = 262,
UNLINKAT = 263,
RENAMEAT = 264,
LINKAT = 265,
SYMLINKAT = 266,
READLINKAT = 267,
FCHMODAT = 268,
FACCESSAT = 269,
PSELECT6 = 270,
PPOLL = 271,
UNSHARE = 272,
SET_ROBUST_LIST = 273,
GET_ROBUST_LIST = 274,
SPLICE = 275,
TEE = 276,
SYNC_FILE_RANGE = 277,
VMSPLICE = 278,
MOVE_PAGES = 279,
UTIMENSAT = 280,
EPOLL_PWAIT = 281,
SIGNALFD = 282,
TIMERFD_CREATE = 283,
EVENTFD = 284,
FALLOCATE = 285,
TIMERFD_SETTIME = 286,
TIMERFD_GETTIME = 287,
ACCEPT4 = 288,
SIGNALFD4 = 289,
EVENTFD2 = 290,
EPOLL_CREATE1 = 291,
DUP3 = 292,
PIPE2 = 293,
INOTIFY_INIT1 = 294,
PREADV = 295,
PWRITEV = 296,
RT_TGSIGQUEUEINFO = 297,
PERF_EVENT_OPEN = 298,
RECVMMSG = 299,
FANOTIFY_INIT = 300,
FANOTIFY_MARK = 301,
PRLIMIT64 = 302,
NAME_TO_HANDLE_AT = 303,
OPEN_BY_HANDLE_AT = 304,
CLOCK_ADJTIME = 305,
SYNCFS = 306,
SENDMMSG = 307,
SETNS = 308,
GETCPU = 309,
PROCESS_VM_READV = 310,
PROCESS_VM_WRITEV = 311,
KCMP = 312,
FINIT_MODULE = 313,
SCHED_SETATTR = 314,
SCHED_GETATTR = 315,
RENAMEAT2 = 316,
SECCOMP = 317,
GETRANDOM = 318,
MEMFD_CREATE = 319,
KEXEC_FILE_LOAD = 320,
BPF = 321,
EXECVEAT = 322,
USERFAULTFD = 323,
MEMBARRIER = 324,
MLOCK2 = 325,
COPY_FILE_RANGE = 326,
PREADV2 = 327,
PWRITEV2 = 328,
PKEY_MPROTECT = 329,
PKEY_ALLOC = 330,
PKEY_FREE = 331,
STATX = 332,
IO_PGETEVENTS = 333,
RSEQ = 334,
URETPROBE = 335,
UPROBE = 336,
PIDFD_SEND_SIGNAL = 424,
IO_URING_SETUP = 425,
IO_URING_ENTER = 426,
IO_URING_REGISTER = 427,
OPEN_TREE = 428,
MOVE_MOUNT = 429,
FSOPEN = 430,
FSCONFIG = 431,
FSMOUNT = 432,
FSPICK = 433,
PIDFD_OPEN = 434,
CLONE3 = 435,
CLOSE_RANGE = 436,
OPENAT2 = 437,
PIDFD_GETFD = 438,
FACCESSAT2 = 439,
PROCESS_MADVISE = 440,
EPOLL_PWAIT2 = 441,
MOUNT_SETATTR = 442,
QUOTACTL_FD = 443,
LANDLOCK_CREATE_RULESET = 444,
LANDLOCK_ADD_RULE = 445,
LANDLOCK_RESTRICT_SELF = 446,
MEMFD_SECRET = 447,
PROCESS_MRELEASE = 448,
FUTEX_WAITV = 449,
SET_MEMPOLICY_HOME_NODE = 450,
CACHESTAT = 451,
FCHMODAT2 = 452,
MAP_SHADOW_STACK = 453,
FUTEX_WAKE = 454,
FUTEX_WAIT = 455,
FUTEX_REQUEUE = 456,
STATMOUNT = 457,
LISTMOUNT = 458,
LSM_GET_SELF_ATTR = 459,
LSM_SET_SELF_ATTR = 460,
LSM_LIST_MODULES = 461,
MSEAL = 462,
SETXATTRAT = 463,
GETXATTRAT = 464,
LISTXATTRAT = 465,
REMOVEXATTRAT = 466,
OPEN_TREE_ATTR = 467,
FILE_GETATTR = 468,
FILE_SETATTR = 469,
LISTNS = 470,
}
public enum LinuxCompat32Syscall {
RESTART_SYSCALL = 0,
EXIT = 1,
FORK = 2,
READ = 3,
WRITE = 4,
OPEN = 5,
CLOSE = 6,
WAITPID = 7,
CREAT = 8,
LINK = 9,
UNLINK = 10,
EXECVE = 11,
CHDIR = 12,
TIME = 13,
MKNOD = 14,
CHMOD = 15,
LCHOWN = 16,
OLDSTAT = 18,
LSEEK = 19,
GETPID = 20,
MOUNT = 21,
UMOUNT = 22,
SETUID = 23,
GETUID = 24,
STIME = 25,
PTRACE = 26,
ALARM = 27,
OLDFSTAT = 28,
PAUSE = 29,
UTIME = 30,
ACCESS = 33,
NICE = 34,
SYNC = 36,
KILL = 37,
RENAME = 38,
MKDIR = 39,
RMDIR = 40,
DUP = 41,
PIPE = 42,
TIMES = 43,
BRK = 45,
SETGID = 46,
GETGID = 47,
SIGNAL = 48,
GETEUID = 49,
GETEGID = 50,
ACCT = 51,
UMOUNT2 = 52,
IOCTL = 54,
FCNTL = 55,
SETPGID = 57,
OLDOLDUNAME = 59,
UMASK = 60,
CHROOT = 61,
USTAT = 62,
DUP2 = 63,
GETPPID = 64,
GETPGRP = 65,
SETSID = 66,
SIGACTION = 67,
SGETMASK = 68,
SSETMASK = 69,
SETREUID = 70,
SETREGID = 71,
SIGSUSPEND = 72,
SIGPENDING = 73,
SETHOSTNAME = 74,
SETRLIMIT = 75,
GETRLIMIT = 76,
GETRUSAGE = 77,
GETTIMEOFDAY = 78,
SETTIMEOFDAY = 79,
GETGROUPS = 80,
SETGROUPS = 81,
SELECT = 82,
SYMLINK = 83,
OLDLSTAT = 84,
READLINK = 85,
USELIB = 86,
SWAPON = 87,
REBOOT = 88,
READDIR = 89,
MMAP = 90,
MUNMAP = 91,
TRUNCATE = 92,
FTRUNCATE = 93,
FCHMOD = 94,
FCHOWN = 95,
GETPRIORITY = 96,
SETPRIORITY = 97,
STATFS = 99,
FSTATFS = 100,
IOPERM = 101,
SOCKETCALL = 102,
SYSLOG = 103,
SETITIMER = 104,
GETITIMER = 105,
STAT = 106,
LSTAT = 107,
FSTAT = 108,
OLDUNAME = 109,
IOPL = 110,
VHANGUP = 111,
VM86OLD = 113,
WAIT4 = 114,
SWAPOFF = 115,
SYSINFO = 116,
IPC = 117,
FSYNC = 118,
CLONE = 120,
SETDOMAINNAME = 121,
UNAME = 122,
MODIFY_LDT = 123,
ADJTIMEX = 124,
MPROTECT = 125,
SIGPROCMASK = 126,
INIT_MODULE = 128,
DELETE_MODULE = 129,
QUOTACTL = 131,
GETPGID = 132,
FCHDIR = 133,
BDFLUSH = 134,
SYSFS = 135,
PERSONALITY = 136,
SETFSUID = 138,
SETFSGID = 139,
_LLSEEK = 140,
GETDENTS = 141,
_NEWSELECT = 142,
FLOCK = 143,
MSYNC = 144,
READV = 145,
WRITEV = 146,
GETSID = 147,
FDATASYNC = 148,
_SYSCTL = 149,
MLOCK = 150,
MUNLOCK = 151,
MLOCKALL = 152,
MUNLOCKALL = 153,
SCHED_SETPARAM = 154,
SCHED_GETPARAM = 155,
SCHED_SETSCHEDULER = 156,
SCHED_GETSCHEDULER = 157,
SCHED_YIELD = 158,
SCHED_GET_PRIORITY_MAX = 159,
SCHED_GET_PRIORITY_MIN = 160,
SCHED_RR_GET_INTERVAL = 161,
NANOSLEEP = 162,
MREMAP = 163,
SETRESUID = 164,
GETRESUID = 165,
VM86 = 166,
POLL = 168,
SETRESGID = 170,
GETRESGID = 171,
PRCTL = 172,
RT_SIGRETURN = 173,
RT_SIGACTION = 174,
RT_SIGPROCMASK = 175,
RT_SIGPENDING = 176,
RT_SIGTIMEDWAIT = 177,
RT_SIGQUEUEINFO = 178,
RT_SIGSUSPEND = 179,
PREAD64 = 180,
PWRITE64 = 181,
CHOWN = 182,
GETCWD = 183,
CAPGET = 184,
CAPSET = 185,
SIGALTSTACK = 186,
SENDFILE = 187,
VFORK = 190,
UGETRLIMIT = 191,
MMAP2 = 192,
TRUNCATE64 = 193,
FTRUNCATE64 = 194,
LCHOWN32 = 198,
GETUID32 = 199,
GETGID32 = 200,
GETEUID32 = 201,
GETEGID32 = 202,
SETREUID32 = 203,
SETREGID32 = 204,
GETGROUPS32 = 205,
SETGROUPS32 = 206,
FCHOWN32 = 207,
SETRESUID32 = 208,
GETRESUID32 = 209,
SETRESGID32 = 210,
GETRESGID32 = 211,
CHOWN32 = 212,
SETUID32 = 213,
SETGID32 = 214,
SETFSUID32 = 215,
SETFSGID32 = 216,
PIVOT_ROOT = 217,
MINCORE = 218,
MADVISE = 219,
GETDENTS64 = 220,
FCNTL64 = 221,
GETTID = 224,
READAHEAD = 225,
SETXATTR = 226,
LSETXATTR = 227,
FSETXATTR = 228,
GETXATTR = 229,
LGETXATTR = 230,
FGETXATTR = 231,
LISTXATTR = 232,
LLISTXATTR = 233,
FLISTXATTR = 234,
REMOVEXATTR = 235,
LREMOVEXATTR = 236,
FREMOVEXATTR = 237,
TKILL = 238,
SENDFILE64 = 239,
FUTEX = 240,
SCHED_SETAFFINITY = 241,
SCHED_GETAFFINITY = 242,
SET_THREAD_AREA = 243,
GET_THREAD_AREA = 244,
IO_SETUP = 245,
IO_DESTROY = 246,
IO_GETEVENTS = 247,
IO_SUBMIT = 248,
IO_CANCEL = 249,
FADVISE64 = 250,
EXIT_GROUP = 252,
EPOLL_CREATE = 254,
EPOLL_CTL = 255,
EPOLL_WAIT = 256,
REMAP_FILE_PAGES = 257,
SET_TID_ADDRESS = 258,
TIMER_CREATE = 259,
TIMER_SETTIME = 260,
TIMER_GETTIME = 261,
TIMER_GETOVERRUN = 262,
TIMER_DELETE = 263,
CLOCK_SETTIME = 264,
CLOCK_GETTIME = 265,
CLOCK_GETRES = 266,
CLOCK_NANOSLEEP = 267,
STATFS64 = 268,
FSTATFS64 = 269,
TGKILL = 270,
UTIMES = 271,
FADVISE64_64 = 272,
MBIND = 274,
GET_MEMPOLICY = 275,
SET_MEMPOLICY = 276,
MQ_OPEN = 277,
MQ_UNLINK = 278,
MQ_TIMEDSEND = 279,
MQ_TIMEDRECEIVE = 280,
MQ_NOTIFY = 281,
MQ_GETSETATTR = 282,
KEXEC_LOAD = 283,
WAITID = 284,
ADD_KEY = 286,
REQUEST_KEY = 287,
KEYCTL = 288,
IOPRIO_SET = 289,
IOPRIO_GET = 290,
INOTIFY_INIT = 291,
INOTIFY_ADD_WATCH = 292,
INOTIFY_RM_WATCH = 293,
MIGRATE_PAGES = 294,
OPENAT = 295,
MKDIRAT = 296,
MKNODAT = 297,
FCHOWNAT = 298,
FUTIMESAT = 299,
UNLINKAT = 301,
RENAMEAT = 302,
LINKAT = 303,
SYMLINKAT = 304,
READLINKAT = 305,
FCHMODAT = 306,
FACCESSAT = 307,
PSELECT6 = 308,
PPOLL = 309,
UNSHARE = 310,
SET_ROBUST_LIST = 311,
GET_ROBUST_LIST = 312,
SPLICE = 313,
SYNC_FILE_RANGE = 314,
TEE = 315,
VMSPLICE = 316,
MOVE_PAGES = 317,
GETCPU = 318,
EPOLL_PWAIT = 319,
UTIMENSAT = 320,
SIGNALFD = 321,
TIMERFD_CREATE = 322,
EVENTFD = 323,
FALLOCATE = 324,
TIMERFD_SETTIME = 325,
TIMERFD_GETTIME = 326,
SIGNALFD4 = 327,
EVENTFD2 = 328,
EPOLL_CREATE1 = 329,
DUP3 = 330,
PIPE2 = 331,
INOTIFY_INIT1 = 332,
PREADV = 333,
PWRITEV = 334,
RT_TGSIGQUEUEINFO = 335,
PERF_EVENT_OPEN = 336,
RECVMMSG = 337,
FANOTIFY_INIT = 338,
FANOTIFY_MARK = 339,
PRLIMIT64 = 340,
NAME_TO_HANDLE_AT = 341,
OPEN_BY_HANDLE_AT = 342,
CLOCK_ADJTIME = 343,
SYNCFS = 344,
SENDMMSG = 345,
SETNS = 346,
PROCESS_VM_READV = 347,
PROCESS_VM_WRITEV = 348,
KCMP = 349,
FINIT_MODULE = 350,
SCHED_SETATTR = 351,
SCHED_GETATTR = 352,
RENAMEAT2 = 353,
SECCOMP = 354,
GETRANDOM = 355,
MEMFD_CREATE = 356,
BPF = 357,
EXECVEAT = 358,
SOCKET = 359,
SOCKETPAIR = 360,
BIND = 361,
CONNECT = 362,
LISTEN = 363,
ACCEPT4 = 364,
GETSOCKOPT = 365,
SETSOCKOPT = 366,
GETSOCKNAME = 367,
GETPEERNAME = 368,
SENDTO = 369,
SENDMSG = 370,
RECVFROM = 371,
RECVMSG = 372,
SHUTDOWN = 373,
USERFAULTFD = 374,
MEMBARRIER = 375,
MLOCK2 = 376,
COPY_FILE_RANGE = 377,
PREADV2 = 378,
PWRITEV2 = 379,
PKEY_MPROTECT = 380,
PKEY_ALLOC = 381,
PKEY_FREE = 382,
STATX = 383,
ARCH_PRCTL = 384,
IO_PGETEVENTS = 385,
RSEQ = 386,
SEMGET = 393,
SEMCTL = 394,
SHMGET = 395,
SHMCTL = 396,
SHMAT = 397,
SHMDT = 398,
MSGGET = 399,
MSGSND = 400,
MSGRCV = 401,
MSGCTL = 402,
CLOCK_GETTIME64 = 403,
CLOCK_SETTIME64 = 404,
CLOCK_ADJTIME64 = 405,
CLOCK_GETRES_TIME64 = 406,
CLOCK_NANOSLEEP_TIME64 = 407,
TIMER_GETTIME64 = 408,
TIMER_SETTIME64 = 409,
TIMERFD_GETTIME64 = 410,
TIMERFD_SETTIME64 = 411,
UTIMENSAT_TIME64 = 412,
PSELECT6_TIME64 = 413,
PPOLL_TIME64 = 414,
IO_PGETEVENTS_TIME64 = 416,
RECVMMSG_TIME64 = 417,
MQ_TIMEDSEND_TIME64 = 418,
MQ_TIMEDRECEIVE_TIME64 = 419,
SEMTIMEDOP_TIME64 = 420,
RT_SIGTIMEDWAIT_TIME64 = 421,
FUTEX_TIME64 = 422,
SCHED_RR_GET_INTERVAL_TIME64 = 423,
PIDFD_SEND_SIGNAL = 424,
IO_URING_SETUP = 425,
IO_URING_ENTER = 426,
IO_URING_REGISTER = 427,
OPEN_TREE = 428,
MOVE_MOUNT = 429,
FSOPEN = 430,
FSCONFIG = 431,
FSMOUNT = 432,
FSPICK = 433,
PIDFD_OPEN = 434,
CLONE3 = 435,
CLOSE_RANGE = 436,
OPENAT2 = 437,
PIDFD_GETFD = 438,
FACCESSAT2 = 439,
PROCESS_MADVISE = 440,
EPOLL_PWAIT2 = 441,
MOUNT_SETATTR = 442,
QUOTACTL_FD = 443,
LANDLOCK_CREATE_RULESET = 444,
LANDLOCK_ADD_RULE = 445,
LANDLOCK_RESTRICT_SELF = 446,
MEMFD_SECRET = 447,
PROCESS_MRELEASE = 448,
FUTEX_WAITV = 449,
SET_MEMPOLICY_HOME_NODE = 450,
CACHESTAT = 451,
FCHMODAT2 = 452,
MAP_SHADOW_STACK = 453,
FUTEX_WAKE = 454,
FUTEX_WAIT = 455,
FUTEX_REQUEUE = 456,
STATMOUNT = 457,
LISTMOUNT = 458,
LSM_GET_SELF_ATTR = 459,
LSM_SET_SELF_ATTR = 460,
LSM_LIST_MODULES = 461,
MSEAL = 462,
SETXATTRAT = 463,
GETXATTRAT = 464,
LISTXATTRAT = 465,
REMOVEXATTRAT = 466,
OPEN_TREE_ATTR = 467,
FILE_GETATTR = 468,
FILE_SETATTR = 469,
LISTNS = 470,
}
}
-26
View File
@@ -1,26 +0,0 @@
namespace Frida {
[CCode (cheader_filename = "dlfcn.h", cname = "dlopen")]
public void * dlopen (string filename, int flags);
[CCode (cheader_filename = "dlfcn.h", cname = "dlclose")]
public int dlclose (void * handle);
[CCode (cheader_filename = "dlfcn.h", cname = "dlsym")]
public void * dlsym (void * handle, string symbol);
[CCode (cheader_filename = "dlfcn.h", cname = "dlerror")]
public unowned string dlerror ();
[CCode (cheader_filename = "sys/mman.h", cname = "MAP_ANONYMOUS")]
public const int MAP_ANONYMOUS;
[CCode (cheader_filename = "linux-syscall.h", cprefix = "SYS_", has_type_id = false)]
public enum SysCall {
memfd_create,
pidfd_getfd,
pidfd_open,
process_vm_readv,
process_vm_writev,
tgkill,
}
}
+439 -16
View File
@@ -11,27 +11,50 @@ namespace Frida {
return (linux_major == major && linux_minor >= minor) || linux_major > major;
}
public class FileDescriptor : Object, FileDescriptorBased {
public int handle;
public struct DevId {
public uint32 major;
public uint32 minor;
public FileDescriptor (int handle) {
this.handle = handle;
public DevId (uint32 major, uint32 minor) {
this.major = major;
this.minor = minor;
}
~FileDescriptor () {
if (handle != -1)
Posix.close (handle);
public uint64 pack () {
return ((uint64) major << 32) | minor;
}
public int steal () {
int result = handle;
handle = -1;
return result;
public static DevId unpack (uint64 dev) {
return DevId ((uint32) (dev >> 32), (uint32) dev);
}
public int get_fd () {
return handle;
public bool equals (DevId other) {
return major == other.major && minor == other.minor;
}
public uint hash () {
return (uint) (major ^ (minor * 0x9e3779b9));
}
public string to_string () {
return "%x:%x".printf (major, minor);
}
}
public extern unowned LinuxSyscallSignature[] get_syscall_signatures ();
public extern unowned LinuxSyscallSignature[]? get_compat32_syscall_signatures ();
public struct LinuxSyscallSignature {
public uint nr;
public string name;
public uint8 nargs;
public LinuxSyscallArg args[6];
}
public struct LinuxSyscallArg {
public string? type;
public string? name;
}
public sealed class PidFileDescriptor : FileDescriptor {
@@ -65,11 +88,11 @@ namespace Frida {
}
private static int pidfd_open (uint pid, uint flags) {
return Linux.syscall (SysCall.pidfd_open, pid, flags);
return Linux.syscall (LinuxSyscall.PIDFD_OPEN, pid, flags);
}
private static int pidfd_getfd (int pidfd, int targetfd, uint flags) {
return Linux.syscall (SysCall.pidfd_getfd, pidfd, targetfd, flags);
return Linux.syscall (LinuxSyscall.PIDFD_GETFD, pidfd, targetfd, flags);
}
[NoReturn]
@@ -101,7 +124,407 @@ namespace Frida {
}
private int memfd_create (string name, uint flags) {
return Linux.syscall (SysCall.memfd_create, name, flags);
return Linux.syscall (LinuxSyscall.MEMFD_CREATE, name, flags);
}
}
public sealed class BpfObject {
public Programs programs {
get;
}
public Maps maps {
get;
}
internal Libbpf.Object handle;
private char[] kernel_log_buf;
public static BpfObject open (string name, uint8[] blob) throws Error {
var log_buf = new char[64 * 1024];
var opts = Libbpf.Object.OpenOpts ();
opts.sz = sizeof (Libbpf.Object.OpenOpts);
opts.object_name = name;
opts.kernel_log_buf = log_buf;
var handle = Libbpf.Object.open_mem (blob, opts);
if (handle == null)
throw_libbpf_error (errno);
return new BpfObject ((owned) handle, (owned) log_buf);
}
private BpfObject (owned Libbpf.Object handle, owned char[] kernel_log_buf) {
this.handle = (owned) handle;
this.kernel_log_buf = (owned) kernel_log_buf;
_programs = new Programs (this);
_maps = new Maps (this);
}
public void prepare () throws Error {
check_libbpf_result (handle.prepare ());
}
public void load () throws Error {
check_libbpf_result (handle.load (), (string) kernel_log_buf);
}
public sealed class Programs {
private unowned BpfObject parent;
internal Programs (BpfObject parent) {
this.parent = parent;
}
public BpfProgram get_by_name (string name) throws Error {
var p = find_by_name (name);
if (p == null)
throw new Error.INVALID_ARGUMENT ("No program named '%s'", name);
return p;
}
public BpfProgram? find_by_name (string name) {
unowned Libbpf.Program? p = parent.handle.find_program_by_name (name);
if (p == null)
return null;
return new BpfProgram (p, parent);
}
public Iterator iterator () {
return new Iterator (parent);
}
public class Iterator {
private BpfObject parent;
private BpfProgram? current;
internal Iterator (BpfObject parent) {
this.parent = parent;
}
public BpfProgram? next_value () {
unowned Libbpf.Program? p = parent.handle.next_program (current?.handle);
if (p == null)
return null;
current = new BpfProgram (p, parent);
return current;
}
}
}
public sealed class Maps {
private unowned BpfObject parent;
internal Maps (BpfObject parent) {
this.parent = parent;
}
public BpfMap get_by_name (string name) throws Error {
var p = find_by_name (name);
if (p == null)
throw new Error.INVALID_ARGUMENT ("No map named '%s'", name);
return p;
}
public BpfMap? find_by_name (string name) {
unowned Libbpf.Map? p = parent.handle.find_map_by_name (name);
if (p == null)
return null;
return new BpfMap (p, parent);
}
public Iterator iterator () {
return new Iterator (parent);
}
public class Iterator {
private BpfObject parent;
private BpfMap? current;
internal Iterator (BpfObject parent) {
this.parent = parent;
}
public BpfMap? next_value () {
unowned Libbpf.Map? p = parent.handle.next_map (current?.handle);
if (p == null)
return null;
current = new BpfMap (p, parent);
return current;
}
}
}
}
public sealed class BpfProgram {
internal unowned Libbpf.Program handle;
private BpfObject parent;
public string name {
get {
return handle.name;
}
}
internal BpfProgram (Libbpf.Program handle, BpfObject parent) {
this.handle = handle;
this.parent = parent;
}
public BpfLink attach () throws Error {
return parse_attach_result (handle.attach ());
}
public BpfLink attach_perf_event (FileDescriptor pfd) throws Error {
return parse_attach_result (handle.attach_perf_event (pfd.handle));
}
private BpfLink parse_attach_result (owned Libbpf.Link? l) throws Error {
if (l == null)
throw_libbpf_error (errno);
return new BpfLink ((owned) l);
}
}
public sealed class BpfMap {
internal unowned Libbpf.Map handle;
private BpfObject parent;
public string name {
get {
return handle.name;
}
}
public int fd {
get {
return handle.fd;
}
}
public uint32 max_entries {
get {
return handle.max_entries;
}
set {
handle.max_entries = value;
}
}
public uint32 key_size {
get {
return handle.key_size;
}
set {
handle.key_size = value;
}
}
public uint32 value_size {
get {
return handle.value_size;
}
set {
handle.value_size = value;
}
}
internal BpfMap (Libbpf.Map handle, BpfObject parent) {
this.handle = handle;
this.parent = parent;
}
public void update_u32_u8 (uint32 key, uint8 val) throws Error {
update_raw ((uint8[]) &key, (uint8[]) &val);
}
public void update_u32_u32 (uint32 key, uint32 val) throws Error {
update_raw ((uint8[]) &key, (uint8[]) &val);
}
public void remove_u32 (uint32 key) throws Error {
remove_raw ((uint8[]) &key);
}
public void foreach_percpu_value<T> (uint8[] key, PercpuValueFunc<T> func) throws Error {
var ncpus = check_libbpf_result (Libbpf.num_possible_cpus ());
var percpu_stride = round_up_8 (value_size);
uint8[] buf = new uint8[ncpus * percpu_stride];
lookup_raw (key, buf);
for (int cpu = 0; cpu != ncpus; cpu++) {
unowned T val = (T) ((uint8 *) buf + (cpu * percpu_stride));
func (cpu, val);
}
}
public delegate void PercpuValueFunc<T> (uint32 cpu, T val);
public void lookup_raw (uint8[] key, uint8[] val) throws Error {
check_libbpf_result (handle.lookup_elem (key, val));
}
public void update_raw (uint8[] key, uint8[] val) throws Error {
check_libbpf_result (handle.update_elem (key, val));
}
public void remove_raw (uint8[] key) throws Error {
check_libbpf_result (handle.delete_elem (key));
}
}
public sealed class BpfLink {
private Libbpf.Link handle;
internal BpfLink (owned Libbpf.Link handle) {
this.handle = (owned) handle;
}
}
private int check_libbpf_result (int result, string details = "") throws Error {
if (result < 0)
throw_libbpf_error (result, details);
return result;
}
[NoReturn]
private void throw_libbpf_error (int err, string details = "") throws Error {
var message = new StringBuilder (error_message_for_libbpf_error (err));
if (details.length != 0) {
message
.append (":\n")
.append (details.chomp ());
}
if (err.abs () == Posix.EPERM)
throw new Error.PERMISSION_DENIED ("%s", message.str);
else
throw new Error.INVALID_ARGUMENT ("%s", message.str);
}
private string error_message_for_libbpf_error (int err) {
char message[256];
int result = Libbpf.strerror (err, message);
assert (result == 0);
return (string) message;
}
public sealed class BpfRingbufReader : Object {
private BpfMap map;
private uint8 * consumer_map;
private uint8 * producer_map;
private uint8 * producer_page;
private uint8 * data_base;
private uint64 * consumer_pos;
private uint64 * producer_pos;
public BpfRingbufReader (BpfMap map) throws Error {
this.map = map;
var page_size = (size_t) Posix.getpagesize ();
int fd = map.fd;
void * mem = Posix.mmap (null, page_size, Posix.PROT_READ | Posix.PROT_WRITE, Posix.MAP_SHARED, fd, 0);
if (mem == Posix.MAP_FAILED)
throw_errno ("mmap(consumer) failed");
consumer_map = mem;
size_t prod_len = page_size + (2 * map.max_entries);
mem = Posix.mmap (null, prod_len, Posix.PROT_READ, Posix.MAP_SHARED, fd, (Posix.off_t) page_size);
if (mem == Posix.MAP_FAILED)
throw_errno ("mmap(producer+data) failed");
producer_map = mem;
producer_page = producer_map;
data_base = producer_map + page_size;
consumer_pos = consumer_map;
producer_pos = producer_page;
}
~BpfRingbufReader () {
var page_size = (size_t) Posix.getpagesize ();
if (consumer_map != null)
Posix.munmap (consumer_map, page_size);
if (producer_map != null)
Posix.munmap (producer_map, page_size + (2 * map.max_entries));
}
public DrainStatus drain (RecordHandler on_record) {
while (true) {
uint64 prod = Atomics.load_u64_acquire (producer_pos);
uint64 cons = Atomics.load_u64_acquire (consumer_pos);
if (cons >= prod)
return DRAINED;
size_t data_size = map.max_entries;
uint64 mask = data_size - 1;
uint64 off = cons & mask;
uint8 * hdrp = data_base + off;
uint32 hdr_len = Atomics.load_u32_acquire ((uint32 *) hdrp);
uint32 flags_mask = BpfRingbufFlags.BUSY | BpfRingbufFlags.DISCARD;
uint32 flags = hdr_len & flags_mask;
uint32 sample_len = hdr_len & ~flags_mask;
if ((flags & BpfRingbufFlags.BUSY) != 0)
return DRAINED;
assert (sample_len <= data_size - BPF_RINGBUF_HEADER_SIZE);
var total_len = (uint32) round_up_8 (sample_len + BPF_RINGBUF_HEADER_SIZE);
if ((flags & BpfRingbufFlags.DISCARD) != 0) {
Atomics.store_u64_release (consumer_pos, cons + total_len);
continue;
}
unowned uint8[] payload = (uint8[]) (hdrp + BPF_RINGBUF_HEADER_SIZE);
var action = on_record (payload[:sample_len]);
Atomics.store_u64_release (consumer_pos, cons + total_len);
if (action == STOP)
return STOPPED;
}
}
public enum DrainStatus {
DRAINED,
STOPPED,
}
public delegate RecordAction RecordHandler (uint8[] payload);
public enum RecordAction {
CONTINUE,
STOP,
}
}
namespace PerfEvent {
public FileDescriptor open (PerfEventAttr * attr, int pid, int cpu, int group_fd, uint flags) throws Error {
int r = Linux.syscall (LinuxSyscall.PERF_EVENT_OPEN, attr, pid, cpu, group_fd, flags);
if (r == -1)
throw_errno ("perf_event_open() failed");
return new FileDescriptor (r);
}
}
private void throw_errno (string message) throws Error {
throw new Error.NOT_SUPPORTED ("%s (errno=%d: %s)".printf (message, Posix.errno, Posix.strerror (Posix.errno)));
}
private size_t round_up_8 (size_t x) {
return (x + 7) & ~((size_t) 7);
}
}
+43 -4
View File
@@ -13,11 +13,19 @@ base_sources = [
'socket.vala',
'socket-glue.c',
'buffer.vala',
'buffer-glue.c',
'value.vala',
]
extra_vala_args = []
if host_os == 'windows'
base_sources += 'windows.vala'
else
base_sources += 'posix.vala'
extra_vala_args += '--pkg=posix'
endif
if host_os == 'macos'
base_sources += [
'xpc.vala',
@@ -27,27 +35,57 @@ endif
if host_os_family == 'darwin'
base_sources += 'corefoundation.vala'
extra_vala_args += '--pkg=darwin-xnu'
endif
if host_os_family == 'linux'
base_sources += 'linux.vala'
base_sources += [
'linux.vala',
]
extra_vala_args += [
'--pkg=linux',
'--pkg=linux-system',
'--pkg=posix',
'--pkg=frida-atomics',
'--pkg=libbpf',
]
syscall_arch_from_abi = {
'armbe': 'arm',
'armbe8': 'arm',
'armhf': 'arm',
'armv6kz': 'arm',
'arm64be': 'arm64',
'arm64beilp32': 'arm64',
'mipsel': 'mips',
'mips64el': 'mips64',
}
syscall_arch = syscall_arch_from_abi.get(host_abi, host_abi)
base_sources += [
'linux-syscalls' / (syscall_arch + '.vala'),
'linux-syscalls' / (syscall_arch + '-glue.c'),
]
endif
if host_os_family == 'freebsd'
extra_vala_args += '--pkg=freebsd'
endif
extra_deps = []
if host_os_family != 'windows'
extra_vala_args += '--pkg=gio-unix-2.0'
extra_deps += gio_unix_dep
endif
if host_os_family == 'linux'
extra_deps += libbpf_dep
endif
base_vala_args = [gum_vala_args, '--pkg=gio-2.0', '--pkg=json-glib-1.0']
if nice_dep.found()
base_vala_args += '--pkg=nice'
endif
if host_os_family != 'windows'
base_vala_args += [
'--pkg=gio-unix-2.0',
]
endif
if host_os_family == 'darwin'
base_vala_args += [
'--pkg=corefoundation',
@@ -58,6 +96,7 @@ endif
if host_os_family == 'linux'
base_vala_args += [
'--vapidir=' + meson.current_source_dir(),
'--pkg=frida-linux',
'--pkg=gio-unix-2.0',
]
endif
+223
View File
@@ -0,0 +1,223 @@
namespace Frida {
public sealed class StdioPipes : Object {
public OutputStream? input {
get;
construct;
}
public InputStream output {
get;
construct;
}
public InputStream error {
get;
construct;
}
public StdioPipes (FileDescriptor? input, FileDescriptor output, FileDescriptor error) {
Object (
input: (input != null) ? new UnixOutputStream (ensure_nonblocking (input.steal ()), true) : null,
output: new UnixInputStream (ensure_nonblocking (output.steal ()), true),
error: new UnixInputStream (ensure_nonblocking (error.steal ()), true)
);
}
private static int ensure_nonblocking (int fd) {
try {
Unix.set_fd_nonblocking (fd, true);
return fd;
} catch (GLib.Error e) {
assert_not_reached ();
}
}
}
public class FileDescriptor : Object, FileDescriptorBased {
public int handle;
public FileDescriptor (int handle) {
this.handle = handle;
}
~FileDescriptor () {
if (handle != -1)
Posix.close (handle);
}
public int steal () {
int result = handle;
handle = -1;
return result;
}
public int get_fd () {
return handle;
}
public size_t pread (uint8[] buf, uint64 offset) throws Error {
while (true) {
ssize_t res = Posix.pread (handle, buf, buf.length, (Posix.off_t) offset);
if (res == -1) {
if (errno == Posix.EINTR)
continue;
throw new Error.TRANSPORT ("%s", strerror (errno));
}
return res;
}
}
public void pread_all (uint8[] buf, uint64 offset) throws Error {
size_t total = 0;
while (total != buf.length) {
void * dst = (uint8 *) buf + total;
size_t remaining = buf.length - total;
while (true) {
ssize_t res = Posix.pread (handle, dst, remaining, (Posix.off_t) (offset + total));
if (res == -1) {
if (errno == Posix.EINTR)
continue;
throw new Error.TRANSPORT ("%s", strerror (errno));
}
if (res == 0)
throw new Error.TRANSPORT ("Unexpected EOF: read %zu of %zu bytes", total, buf.length);
total += (size_t) res;
break;
}
}
}
public size_t pwrite (uint8[] buf, uint64 offset) throws Error {
while (true) {
ssize_t res = Posix.pwrite (handle, buf, buf.length, (Posix.off_t) offset);
if (res == -1) {
if (errno == Posix.EINTR)
continue;
throw new Error.TRANSPORT ("%s", strerror (errno));
}
return res;
}
}
public void pwrite_all (uint8[] buf, uint64 offset) throws Error {
size_t total = 0;
while (total != buf.length) {
uint8[] chunk = buf[total : buf.length];
while (true) {
ssize_t res = Posix.pwrite (handle, chunk, chunk.length, (Posix.off_t) (offset + total));
if (res == -1) {
if (errno == Posix.EINTR)
continue;
throw new Error.TRANSPORT ("%s", strerror (errno));
}
total += (size_t) res;
break;
}
}
}
}
public StdioPipes? make_stdio_pipes (Stdio stdio, bool in_supported, out FileDescriptor? in_fd, out string? in_name,
out FileDescriptor? out_fd, out string? out_name, out FileDescriptor? err_fd, out string? err_name) throws Error {
if (stdio == PIPE) {
FileDescriptor? in_write = null;
FileDescriptor? out_read, err_read;
if (in_supported) {
make_stdio_pipe (out in_fd, out in_write, out in_name);
} else {
in_fd = null;
in_name = null;
}
make_stdio_pipe (out out_read, out out_fd, out out_name);
make_stdio_pipe (out err_read, out err_fd, out err_name);
return new StdioPipes (in_write, out_read, err_read);
} else {
in_fd = null;
in_name = null;
out_fd = null;
out_name = null;
err_fd = null;
err_name = null;
return null;
}
}
public void make_stdio_pipe (out FileDescriptor read, out FileDescriptor write, out string? name = null) throws Error {
#if HAVE_OPENPTY
int rfd = -1, wfd = -1;
char buf[Posix.Limits.PATH_MAX];
var res =
#if DARWIN
Darwin.XNU.openpty (out rfd, out wfd, buf, null, null)
#elif LINUX
Linux.openpty (out rfd, out wfd, buf, null, null)
#elif FREEBSD
FreeBSD.openpty (out rfd, out wfd, buf, null, null)
#endif
;
if (res == -1)
throw new Error.NOT_SUPPORTED ("Unable to open PTY: %s", strerror (errno));
name = (string) buf;
enable_close_on_exec (rfd);
enable_close_on_exec (wfd);
disable_sigpipe (rfd);
disable_sigpipe (wfd);
configure_terminal_attributes (rfd);
read = new FileDescriptor (rfd);
write = new FileDescriptor (wfd);
#else
name = null;
try {
int fds[2];
Unix.open_pipe (fds, Posix.FD_CLOEXEC);
read = new FileDescriptor (fds[0]);
write = new FileDescriptor (fds[1]);
} catch (GLib.Error e) {
throw new Error.NOT_SUPPORTED ("Unable to open pipe: %s", e.message);
}
#endif
}
#if HAVE_OPENPTY
private void enable_close_on_exec (int fd) {
Posix.fcntl (fd, Posix.F_SETFD, Posix.fcntl (fd, Posix.F_GETFD) | Posix.FD_CLOEXEC);
}
private void disable_sigpipe (int fd) {
#if DARWIN
Posix.fcntl (fd, Darwin.XNU.F_SETNOSIGPIPE, true);
#endif
}
private void configure_terminal_attributes (int fd) {
var tios = Posix.termios ();
Posix.tcgetattr (fd, out tios);
tios.c_oflag &= ~Posix.ONLCR;
tios.c_cflag = (tios.c_cflag & Posix.CLOCAL) | Posix.CS8 | Posix.CREAD | Posix.HUPCL;
tios.c_lflag &= ~Posix.ECHO;
Posix.tcsetattr (fd, 0, tios);
}
#endif
}
+52 -12
View File
@@ -46,7 +46,8 @@ namespace Frida {
}
private GLib.Error? _error;
private Gee.ArrayQueue<CompletionFuncEntry> on_complete;
private Gee.ArrayQueue<CompletionFuncEntry>? on_complete;
private Gee.ArrayQueue<ThenHandlerEntry<T>>? on_then;
public async T wait_async (Cancellable? cancellable) throws Frida.Error, IOError {
if (_ready)
@@ -74,7 +75,21 @@ namespace Frida {
return get_result ();
}
private T get_result () throws Frida.Error, IOError {
public void then (owned FutureCompletionHandler<T> handler) {
if (_ready) {
schedule (() => {
handler (this);
return Source.REMOVE;
});
return;
}
if (on_then == null)
on_then = new Gee.ArrayQueue<ThenHandlerEntry<T>> ();
on_then.offer (new ThenHandlerEntry<T> ((owned) handler));
}
public T get_result () throws Frida.Error, IOError {
if (error != null) {
if (error is Frida.Error)
throw (Frida.Error) error;
@@ -111,19 +126,32 @@ namespace Frida {
internal void transition_to_ready () {
_ready = true;
if (on_complete != null && !on_complete.is_empty) {
var source = new IdleSource ();
source.set_priority (Priority.HIGH);
source.set_callback (() => {
CompletionFuncEntry? entry;
while ((entry = on_complete.poll ()) != null)
entry.func ();
on_complete = null;
return false;
if (on_complete != null || on_then != null) {
schedule (() => {
if (on_complete != null) {
CompletionFuncEntry? entry;
while ((entry = on_complete.poll ()) != null)
entry.func ();
on_complete = null;
}
if (on_then != null) {
ThenHandlerEntry? entry;
while ((entry = on_then.poll ()) != null)
entry.handler (this);
on_then = null;
}
return Source.REMOVE;
});
source.attach (MainContext.get_thread_default ());
}
}
private static void schedule (owned SourceFunc function) {
var source = new IdleSource ();
source.set_callback ((owned) function);
source.attach (MainContext.get_thread_default ());
}
}
private class CompletionFuncEntry {
@@ -133,6 +161,14 @@ namespace Frida {
this.func = (owned) func;
}
}
private class ThenHandlerEntry<T> {
public FutureCompletionHandler<T> handler;
public ThenHandlerEntry (owned FutureCompletionHandler<T> handler) {
this.handler = (owned) handler;
}
}
}
public interface Future<T> : Object {
@@ -140,5 +176,9 @@ namespace Frida {
public abstract T? value { get; }
public abstract GLib.Error? error { get; }
public abstract async T wait_async (Cancellable? cancellable) throws Frida.Error, IOError;
public abstract void then (owned FutureCompletionHandler<T> handler);
public abstract T get_result () throws Frida.Error, IOError;
}
public delegate void FutureCompletionHandler<T> (Future<T> future);
}
+1 -1
View File
@@ -30,7 +30,7 @@ _frida_query_windows_computer_name (void)
return g_utf16_to_utf8 (buffer, -1, NULL, NULL, NULL);
}
#elif defined (HAVE_IOS) || defined (HAVE_TVOS)
#elif defined (HAVE_IOS) || defined (HAVE_TVOS) || defined (HAVE_XROS)
#include <CoreFoundation/CoreFoundation.h>
#include <dlfcn.h>
+16
View File
@@ -749,6 +749,19 @@ namespace Frida {
}
}
[DBus (name = "re.frida.GadgetSession17")]
public interface GadgetSession : Object {
public abstract async void break_and_resume (Cancellable? cancellable) throws GLib.Error;
public abstract async void break_and_detach (Cancellable? cancellable) throws GLib.Error;
}
public enum GadgetBreakpointAction {
INVOKE_RETURN,
RESUME,
DETACH,
PAGE_PLAN,
}
[DBus (name = "re.frida.Channel17")]
public interface Channel : Object {
public abstract async void close (Cancellable? cancellable) throws GLib.Error;
@@ -1952,6 +1965,8 @@ namespace Frida {
id = "watchos";
#elif TVOS
id = "tvos";
#elif XROS
id = "xros";
#elif ANDROID
id = "android";
#elif FREEBSD
@@ -2119,6 +2134,7 @@ namespace Frida {
public const string AGENT_SESSION = "/re/frida/AgentSession";
public const string AGENT_CONTROLLER = "/re/frida/AgentController";
public const string AGENT_MESSAGE_SINK = "/re/frida/AgentMessageSink";
public const string GADGET_SESSION = "/re/frida/GadgetSession";
public const string CHANNEL = "/re/frida/Channel";
public const string SERVICE = "/re/frida/Service";
public const string TRANSPORT_BROKER = "/re/frida/TransportBroker";
+16
View File
@@ -57,6 +57,22 @@ namespace Frida {
push_scope (v);
}
public string[] list_members () throws Error {
var scope = peek_scope ();
if (scope.dict == null)
throw new Error.PROTOCOL ("Dictionary expected, but at %s", scope.val.print (true));
var members = new Gee.ArrayList<string> ();
foreach (var item in scope.val) {
string k;
Variant v;
item.get ("{sv}", out k, out v);
members.add (k);
}
return members.to_array ();
}
public bool has_member (string name) throws Error {
var scope = peek_scope ();
if (scope.dict == null)
+22
View File
@@ -0,0 +1,22 @@
namespace Frida {
public sealed class StdioPipes : Object {
public OutputStream input {
get;
construct;
}
public InputStream output {
get;
construct;
}
public InputStream error {
get;
construct;
}
public StdioPipes (OutputStream input, InputStream output, InputStream error) {
Object (input: input, output: output, error: error);
}
}
}
+166 -1
View File
@@ -1,9 +1,25 @@
#if defined (HAVE_TVOS) || defined (HAVE_WATCHOS)
# include <Availability.h>
# undef __TVOS_PROHIBITED
# define __TVOS_PROHIBITED
# undef __WATCHOS_PROHIBITED
# define __WATCHOS_PROHIBITED
#endif
#include "frida-gadget.h"
#include "frida-base.h"
#import <Foundation/Foundation.h>
#include <gum/gumdarwin.h>
#include <mach-o/loader.h>
#include <objc/runtime.h>
#include <pthread.h>
static void frida_on_breakpoints_steal_attempt (GumInvocationContext * ic, gpointer user_data);
static GumInvocationListener * frida_dont_steal_my_breakpoints;
gchar *
frida_gadget_environment_detect_bundle_id (void)
{
@@ -27,7 +43,7 @@ frida_gadget_environment_detect_bundle_name (void)
gchar *
frida_gadget_environment_detect_documents_dir (void)
{
#if defined (HAVE_IOS) || defined (HAVE_TVOS)
#if defined (HAVE_IOS) || defined (HAVE_TVOS) || defined (HAVE_XROS)
@autoreleasepool
{
NSArray<NSString *> * paths = NSSearchPathForDirectoriesInDomains (NSDocumentDirectory, NSUserDomainMask, YES);
@@ -51,3 +67,152 @@ frida_gadget_environment_set_thread_name (const gchar * name)
/* For now only implemented on i/macOS as Fruity.Injector relies on it there. */
pthread_setname_np (name);
}
void
frida_gadget_environment_detect_darwin_location_fields (GumAddress our_address, gchar ** executable_name, gchar ** our_path,
GumMemoryRange ** our_range)
{
mach_port_t task;
GumDarwinModuleResolver * resolver;
GPtrArray * modules;
guint i;
task = mach_task_self ();
resolver = gum_darwin_module_resolver_new (task, NULL);
if (resolver == NULL)
return;
gum_darwin_module_resolver_fetch_modules (resolver, &modules, NULL);
for (i = 0; i != modules->len; i++)
{
GumModule * module;
const GumMemoryRange * range;
module = g_ptr_array_index (modules, i);
range = gum_module_get_range (module);
if (*executable_name == NULL)
{
gum_mach_header_t * header = GSIZE_TO_POINTER (range->base_address);
if (header->filetype == MH_EXECUTE)
*executable_name = g_strdup (gum_module_get_name (module));
}
if (our_address >= range->base_address && our_address < range->base_address + range->size)
{
if (*our_path == NULL)
*our_path = g_strdup (gum_module_get_path (module));
if (*our_range == NULL)
*our_range = gum_memory_range_copy (range);
}
if (*executable_name != NULL && *our_path != NULL && *our_range != NULL)
break;
}
g_ptr_array_unref (modules);
g_object_unref (resolver);
}
void
frida_gadget_environment_ensure_debugger_breakpoints_only (void)
{
task_set_exception_ports (
mach_task_self (),
EXC_MASK_ALL & ~EXC_MASK_BREAKPOINT,
MACH_PORT_NULL,
EXCEPTION_DEFAULT,
THREAD_STATE_NONE
);
if (gum_process_get_code_signing_policy () == GUM_CODE_SIGNING_OPTIONAL &&
frida_dont_steal_my_breakpoints == NULL &&
gum_darwin_is_debugger_mapping_enforced ())
{
gpointer exceptions_set, exceptions_swap;
GumInterceptor * interceptor;
exceptions_set = &task_set_exception_ports;
exceptions_swap = &task_swap_exception_ports;
frida_dont_steal_my_breakpoints = gum_make_call_listener (frida_on_breakpoints_steal_attempt,
NULL, NULL, NULL);
interceptor = gum_interceptor_obtain ();
gum_interceptor_attach (interceptor, exceptions_set, frida_dont_steal_my_breakpoints,
NULL, GUM_ATTACH_FLAGS_NONE);
gum_interceptor_attach (interceptor, exceptions_swap, frida_dont_steal_my_breakpoints,
NULL, GUM_ATTACH_FLAGS_NONE);
g_object_unref (interceptor);
}
}
void
frida_gadget_environment_allow_stolen_breakpoints (void)
{
GumInterceptor * interceptor;
if (frida_dont_steal_my_breakpoints == NULL)
return;
interceptor = gum_interceptor_obtain ();
gum_interceptor_detach (interceptor, frida_dont_steal_my_breakpoints);
g_object_unref (frida_dont_steal_my_breakpoints);
frida_dont_steal_my_breakpoints = NULL;
g_object_unref (interceptor);
}
static void
frida_on_breakpoints_steal_attempt (GumInvocationContext * ic, gpointer user_data)
{
exception_mask_t exception_mask;
exception_mask = GPOINTER_TO_SIZE (gum_invocation_context_get_nth_argument (ic, 1));
exception_mask &= ~EXC_MASK_BREAKPOINT;
gum_invocation_context_replace_nth_argument (ic, 1, GSIZE_TO_POINTER (exception_mask));
}
void
frida_gadget_environment_break_and_resume (void)
{
#ifdef HAVE_ARM64
asm volatile (
"mov x1, #1337\n\t"
"mov x2, #1337\n\t"
"mov x3, %0\n\t"
"brk #1337\n\t"
:
: "r" ((gsize) FRIDA_GADGET_BREAKPOINT_ACTION_RESUME)
: "x1", "x2", "x3"
);
#else
g_assert_not_reached ();
#endif
}
void
frida_gadget_environment_break_and_detach (void)
{
#ifdef HAVE_ARM64
asm volatile (
"mov x1, #1337\n\t"
"mov x2, #1337\n\t"
"mov x3, %0\n\t"
"brk #1337\n\t"
:
: "r" ((gsize) FRIDA_GADGET_BREAKPOINT_ACTION_DETACH)
: "x1", "x2", "x3"
);
#else
g_assert_not_reached ();
#endif
}
+5 -5
View File
@@ -84,7 +84,9 @@ frida_on_unload (void)
void
frida_gadget_environment_init (void)
{
gum_init_embedded ();
#ifdef _MSC_VER
frida_libc_shim_init ();
#endif
gio_init ();
g_thread_set_garbage_handler (_frida_gadget_on_pending_thread_garbage, NULL);
@@ -136,13 +138,11 @@ frida_gadget_environment_deinit (void)
glib_shutdown ();
gio_deinit ();
gum_deinit_embedded ();
frida_run_atexit_handlers ();
#ifdef HAVE_DARWIN
/* Do what frida_deinit_memory() does on the other platforms. */
gum_internal_heap_unref ();
#if defined (_MSC_VER) || defined (HAVE_DARWIN)
frida_libc_shim_deinit ();
#endif
}
+46 -84
View File
@@ -24,12 +24,6 @@ namespace Frida.Gadget {
default = Gum.CodeSigningPolicy.OPTIONAL;
}
private ObjectClass klass = (ObjectClass) typeof (Config).class_ref ();
public Json.Node serialize_property (string property_name, GLib.Value value, GLib.ParamSpec pspec) {
return default_serialize_property (property_name, value, pspec);
}
public bool deserialize_property (string property_name, out Value value, ParamSpec pspec, Json.Node property_node) {
if (property_name == "interaction" && property_node.get_node_type () == Json.NodeType.OBJECT) {
var interaction_node = property_node.get_object ();
@@ -77,20 +71,6 @@ namespace Frida.Gadget {
value = Value (pspec.value_type);
return false;
}
public unowned ParamSpec? find_property (string name) {
return klass.find_property (name);
}
public new Value get_property (ParamSpec pspec) {
var val = Value (pspec.value_type);
base.get_property (pspec.name, ref val);
return val;
}
public new void set_property (ParamSpec pspec, Value value) {
base.set_property (pspec.name, value);
}
}
private sealed class ScriptInteraction : Object, Json.Serializable {
@@ -112,12 +92,6 @@ namespace Frida.Gadget {
default = Script.ChangeBehavior.IGNORE;
}
private ObjectClass klass = (ObjectClass) typeof (ScriptInteraction).class_ref ();
public Json.Node serialize_property (string property_name, GLib.Value value, GLib.ParamSpec pspec) {
return default_serialize_property (property_name, value, pspec);
}
public bool deserialize_property (string property_name, out Value value, ParamSpec pspec, Json.Node property_node) {
if (property_name == "parameters" && property_node.get_node_type () == Json.NodeType.OBJECT) {
var v = Value (typeof (Json.Node));
@@ -129,20 +103,6 @@ namespace Frida.Gadget {
value = Value (pspec.value_type);
return false;
}
public unowned ParamSpec? find_property (string name) {
return klass.find_property (name);
}
public new Value get_property (ParamSpec pspec) {
var val = Value (pspec.value_type);
base.get_property (pspec.name, ref val);
return val;
}
public new void set_property (ParamSpec pspec, Value value) {
base.set_property (pspec.name, value);
}
}
private sealed class ScriptDirectoryInteraction : Object {
@@ -183,12 +143,6 @@ namespace Frida.Gadget {
default = Script.ChangeBehavior.IGNORE;
}
private ObjectClass klass = (ObjectClass) typeof (ScriptConfig).class_ref ();
public Json.Node serialize_property (string property_name, GLib.Value value, GLib.ParamSpec pspec) {
return default_serialize_property (property_name, value, pspec);
}
public bool deserialize_property (string property_name, out Value value, ParamSpec pspec, Json.Node property_node) {
if (property_name == "parameters" && property_node.get_node_type () == Json.NodeType.OBJECT) {
var v = Value (typeof (Json.Node));
@@ -200,20 +154,6 @@ namespace Frida.Gadget {
value = Value (pspec.value_type);
return false;
}
public unowned ParamSpec? find_property (string name) {
return klass.find_property (name);
}
public new Value get_property (ParamSpec pspec) {
var val = Value (pspec.value_type);
base.get_property (pspec.name, ref val);
return val;
}
public new void set_property (ParamSpec pspec, Value value) {
base.set_property (pspec.name, value);
}
}
private sealed class ProcessFilter : Object {
@@ -299,8 +239,6 @@ namespace Frida.Gadget {
default = make_empty_json_object ();
}
private ObjectClass klass = (ObjectClass) typeof (ConnectInteraction).class_ref ();
public bool deserialize_property (string property_name, out Value value, ParamSpec pspec, Json.Node property_node) {
if (property_name == "parameters" && property_node.get_node_type () == Json.NodeType.OBJECT) {
var v = Value (typeof (Json.Node));
@@ -312,20 +250,6 @@ namespace Frida.Gadget {
value = Value (pspec.value_type);
return false;
}
public unowned ParamSpec? find_property (string name) {
return klass.find_property (name);
}
public new Value get_property (ParamSpec pspec) {
var val = Value (pspec.value_type);
base.get_property (pspec.name, ref val);
return val;
}
public new void set_property (ParamSpec pspec, Value value) {
base.set_property (pspec.name, value);
}
}
private sealed class Location : Object {
@@ -481,6 +405,12 @@ namespace Frida.Gadget {
interceptor = Gum.Interceptor.obtain ();
interceptor.begin_transaction ();
#if DARWIN
if (mapped_range != null)
Environment.ensure_debugger_breakpoints_only ();
#endif
exceptor = Gum.Exceptor.obtain ();
try {
@@ -700,6 +630,11 @@ namespace Frida.Gadget {
controller = null;
exceptor = null;
#if DARWIN
Environment.allow_stolen_breakpoints ();
#endif
interceptor = null;
}
}
@@ -759,7 +694,7 @@ namespace Frida.Gadget {
}
try {
return Json.gobject_from_data (typeof (Config), config_data) as Config;
return (Config) Json.gobject_from_data (typeof (Config), config_data);
} catch (GLib.Error e) {
throw new Error.INVALID_ARGUMENT ("Invalid config: %s", e.message);
}
@@ -767,7 +702,7 @@ namespace Frida.Gadget {
private Config parse_config (string config_data) throws Error {
try {
return Json.gobject_from_data (typeof (Config), config_data) as Config;
return (Config) Json.gobject_from_data (typeof (Config), config_data);
} catch (GLib.Error e) {
throw new Error.INVALID_ARGUMENT ("Invalid config: %s", e.message);
}
@@ -775,21 +710,20 @@ namespace Frida.Gadget {
private Location detect_location (Gum.MemoryRange? mapped_range) {
string? executable_name = null;
string? executable_path = null;
Gum.MemoryRange? executable_range = null;
string? our_path = null;
Gum.MemoryRange? our_range = mapped_range;
Gum.Address our_address = Gum.Address.from_pointer (Gum.strip_code_pointer ((void *) detect_location));
#if DARWIN
Environment.detect_darwin_location_fields (our_address, ref executable_name, ref our_path, ref our_range);
#else
var index = 0;
Gum.Process.enumerate_modules ((details) => {
var range = details.range;
if (index == 0) {
executable_name = details.name;
executable_path = details.path;
executable_range = details.range;
}
if (mapped_range != null)
@@ -805,6 +739,7 @@ namespace Frida.Gadget {
return true;
});
#endif
assert (our_range != null);
@@ -1234,7 +1169,7 @@ namespace Frida.Gadget {
}
try {
return Json.gobject_from_data (typeof (ScriptConfig), data) as ScriptConfig;
return (ScriptConfig) Json.gobject_from_data (typeof (ScriptConfig), data);
} catch (GLib.Error e) {
throw new Error.INVALID_ARGUMENT ("Invalid config: %s", e.message);
}
@@ -1748,7 +1683,7 @@ namespace Frida.Gadget {
}
}
private class ControlChannel : Object, Peer, HostSession {
private class ControlChannel : Object, Peer, HostSession, GadgetSession {
public weak ControlServer parent {
get;
construct;
@@ -1779,6 +1714,9 @@ namespace Frida.Gadget {
HostSession host_session = this;
registrations.add (connection.register_object (Frida.ObjectPath.HOST_SESSION, host_session));
GadgetSession gadget_session = this;
registrations.add (connection.register_object (Frida.ObjectPath.GADGET_SESSION, gadget_session));
AuthenticationService null_auth = new NullAuthenticationService ();
registrations.add (connection.register_object (Frida.ObjectPath.AUTHENTICATION_SERVICE, null_auth));
} catch (IOError e) {
@@ -1941,6 +1879,22 @@ namespace Frida.Gadget {
throw new Error.NOT_SUPPORTED ("Unable to open services when embedded");
}
public async void break_and_resume (Cancellable? cancellable) throws Error, IOError {
#if DARWIN
Environment.break_and_resume ();
#else
throw new Error.NOT_SUPPORTED ("This API is only applicable on Darwin");
#endif
}
public async void break_and_detach (Cancellable? cancellable) throws Error, IOError {
#if DARWIN
Environment.break_and_detach ();
#else
throw new Error.NOT_SUPPORTED ("This API is only applicable on Darwin");
#endif
}
private void validate_pid (uint pid) throws Error {
if (pid != this_process.pid)
throw new Error.NOT_SUPPORTED ("Unable to act on other processes when embedded");
@@ -2176,6 +2130,14 @@ namespace Frida.Gadget {
private extern bool has_objc_class (string name);
private extern void set_thread_name (string name);
#if DARWIN
private extern void detect_darwin_location_fields (Gum.Address our_address, ref string? executable_name,
ref string? our_path, ref Gum.MemoryRange? our_range);
private extern void ensure_debugger_breakpoints_only ();
private extern void allow_stolen_breakpoints ();
private extern void break_and_resume ();
private extern void break_and_detach ();
#endif
}
private extern void log_info (string message);
+2 -2
View File
@@ -69,12 +69,12 @@ raw_gadget = shared_library('frida-gadget-raw', gadget_sources,
)
operations = [
'--move', 'constructor', 'frida_init_memory', 'first',
'--move', 'constructor', 'frida_libc_shim_init', 'first',
'--move', 'constructor', 'frida_on_load', 'last',
]
if host_os_family != 'darwin'
operations += [
'--move', 'destructor', 'frida_deinit_memory', 'first',
'--move', 'destructor', 'frida_libc_shim_deinit', 'first',
'--move', 'destructor', 'frida_on_unload', 'last',
]
endif
+68 -33
View File
@@ -44,11 +44,17 @@ namespace Frida {
#if ANDROID
public sealed class ThreadCountCloaker : Object {
private GetOsThreadStat * get_os_thread_stat_slot;
private static GetOsThreadStat old_get_os_thread_stat_impl;
private ReadFunc * read_slot;
private static ReadFunc old_read_impl;
private static string expected_magic = "%u (".printf (Posix.getpid ());
[CCode (has_target = false)]
private delegate ssize_t GetOsThreadStat (Posix.pid_t tid, void * buf, size_t count);
[CCode (has_target = false)]
private delegate ssize_t ReadFunc (int fd, void * buf, size_t count);
@@ -56,39 +62,64 @@ namespace Frida {
var art = Gum.Process.find_module_by_name ("libart.so");
if (art != null) {
art.enumerate_imports (imp => {
if (imp.name == "read") {
if (imp.name == "_ZN3art15GetOsThreadStatEiPcm" || imp.name == "_ZN3art15GetOsThreadStatEiPcj") {
get_os_thread_stat_slot = (GetOsThreadStat *) imp.slot;
} else if (imp.name == "read") {
read_slot = (ReadFunc *) imp.slot;
return false;
}
return true;
});
if (read_slot != null)
old_read_impl = update_read_slot (on_read);
if (get_os_thread_stat_slot != null) {
old_get_os_thread_stat_impl = (GetOsThreadStat) update_slot ((void **) get_os_thread_stat_slot,
(void *) on_get_os_thread_stat);
}
if (read_slot != null) {
old_read_impl = (ReadFunc) update_slot ((void **) read_slot, (void *) on_read);
}
}
}
~ThreadCountCloaker () {
if (read_slot != null)
update_read_slot (old_read_impl);
public override void dispose () {
if (get_os_thread_stat_slot != null) {
update_slot ((void **) get_os_thread_stat_slot, (void *) old_get_os_thread_stat_impl);
}
if (read_slot != null) {
update_slot ((void **) read_slot, (void *) old_read_impl);
}
base.dispose ();
}
private ReadFunc update_read_slot (ReadFunc new_impl) {
private static void * update_slot (void ** orig, void * new_impl) {
Gum.PageProtection old_prot = READ;
Gum.Memory.query_protection (read_slot, out old_prot);
Gum.Memory.query_protection (orig, out old_prot);
bool is_writable = (old_prot & Gum.PageProtection.WRITE) != 0;
if (!is_writable)
Gum.mprotect (read_slot, sizeof (void *), old_prot | WRITE);
Gum.mprotect (orig, sizeof (void *), old_prot | WRITE);
ReadFunc old_impl = *read_slot;
*read_slot = new_impl;
void * old_impl = *orig;
*orig = new_impl;
if (!is_writable)
Gum.mprotect (read_slot, sizeof (void *), old_prot);
Gum.mprotect (orig, sizeof (void *), old_prot);
return old_impl;
}
private static ssize_t on_get_os_thread_stat (Posix.pid_t tid, void * buf, size_t count) {
ssize_t n = old_get_os_thread_stat_impl (tid, buf, count);
if (tid == Posix.getpid ()) {
try {
n = adjust_thread_count (buf, n, count);
} catch (FileError e) {
}
}
return n;
}
private static ssize_t on_read (int fd, void * buf, size_t count) {
var n = old_read_impl (fd, buf, count);
if (n <= 0)
@@ -101,32 +132,36 @@ namespace Frida {
if (!file_descriptor_is_proc_self_stat (fd))
return n;
unowned string raw_str = (string) buf;
string str = raw_str.substring (0, n);
MatchInfo info;
if (!/^(\d+ \(.+\)(?: [^ ]+){17}) \d+ (.+)/s.match (str, 0, out info))
return n;
string fields_before = info.fetch (1);
string fields_after = info.fetch (2);
// We cannot simply use the value we got from the kernel and subtract the number of cloaked threads,
// as there's a chance the total may have changed in the last moment.
uint num_uncloaked_threads = query_num_uncloaked_threads ();
string adjusted_str = "%s %u %s".printf (fields_before, num_uncloaked_threads, fields_after);
var adjusted_length = adjusted_str.length;
if (adjusted_length > count)
return n;
Memory.copy (buf, adjusted_str, adjusted_length);
n = adjusted_length;
n = adjust_thread_count (buf, n, count);
} catch (FileError e) {
}
return n;
}
private static ssize_t adjust_thread_count (void * buf, ssize_t n, size_t count) throws FileError {
unowned string raw_str = (string) buf;
string str = raw_str.substring (0, n);
MatchInfo info;
if (!/^(\d+ \(.+\)(?: [^ ]+){17}) \d+ (.+)/s.match (str, 0, out info))
return n;
string fields_before = info.fetch (1);
string fields_after = info.fetch (2);
// We cannot simply use the value we got from the kernel and subtract the number of cloaked threads,
// as there's a chance the total may have changed in the last moment.
uint num_uncloaked_threads = query_num_uncloaked_threads ();
string adjusted_str = "%s %u %s".printf (fields_before, num_uncloaked_threads, fields_after);
var adjusted_length = adjusted_str.length;
if (adjusted_length > count)
return n;
Memory.copy (buf, adjusted_str, adjusted_length);
return adjusted_length;
}
private static bool file_content_might_be_from_proc_self_stat (void * content, ssize_t size) {
if (size < expected_magic.length)
return false;
+1692 -68
View File
File diff suppressed because it is too large. Load diff
+3
View File
@@ -1,4 +1,7 @@
namespace Frida {
#if DARWIN
public extern void libc_shim_deinit ();
#endif
public extern void run_atexit_handlers ();
public extern uint get_process_id ();
+72 -22
View File
@@ -12,9 +12,11 @@ if not meson.get_compiler('vala').version().endswith('-frida')
error('''Incompatible Vala compiler detected.
Frida currently relies on features not yet upstream. Grab the Frida-optimized
Vala compiler from:
Vala sources from:
https://github.com/frida/vala''')
https://github.com/frida/vala
and compile them with Meson.''')
endif
c_languages = ['c', 'cpp']
@@ -30,18 +32,34 @@ frida_version = get_option('frida_version')
if frida_version == ''
frida_version = run_command(releng / 'frida_version.py', meson.project_source_root(), check: true).stdout().strip()
endif
tokens = frida_version.split('.')
frida_major_version = tokens[0].to_int()
frida_minor_version = tokens[1].to_int()
if tokens.length() == 4
frida_micro_version = tokens[2].split('-')[0].to_int() - 1
frida_nano_version = tokens[3].to_int() + 1
is_dev = frida_version.contains('-dev.')
if is_dev
dev_parts = frida_version.split('-dev.')
assert(dev_parts.length() == 2)
prefix = dev_parts[0]
frida_nano_version = dev_parts[1].to_int() + 1
else
assert(tokens.length() == 3)
frida_micro_version = tokens[2].to_int()
prefix = frida_version
frida_nano_version = 0
endif
frida_profile = (frida_version != '0.0.0' and frida_nano_version == 0) ? 'prod' : 'dev'
parts = prefix.split('-')
core = parts[0]
has_suffix = parts.length() > 1
core_tokens = core.split('.')
assert(core_tokens.length() == 3)
frida_major_version = core_tokens[0].to_int()
frida_minor_version = core_tokens[1].to_int()
micro_encoded = core_tokens[2].to_int()
if is_dev and not has_suffix
frida_micro_version = micro_encoded - 1
else
frida_micro_version = micro_encoded
endif
api_version = '1.0'
@@ -90,6 +108,12 @@ elif host_machine.cpu_family() == 'mips64'
else
host_abi = 'mips64'
endif
elif host_machine.cpu_family() == 'riscv32'
host_arch = 'riscv'
host_abi = 'riscv32'
elif host_machine.cpu_family() == 'riscv64'
host_arch = 'riscv'
host_abi = 'riscv64'
else
host_arch = host_machine.cpu_family()
host_abi = host_arch
@@ -234,6 +258,7 @@ cpu_defines = [
['arm', 'HAVE_ARM'],
['arm64', 'HAVE_ARM64'],
['mips', 'HAVE_MIPS'],
['riscv', 'HAVE_RISCV'],
]
foreach d : cpu_defines
if d.get(0) == host_arch
@@ -269,12 +294,14 @@ if host_os == 'linux'
#endif
'''
if cc.compiles(glibc_src, name: 'compiling for glibc')
cdata.set('HAVE_GLIBC', 1)
libc = 'glibc'
elif cc.compiles(uclibc_src, name: 'compiling for uClibc')
cdata.set('HAVE_UCLIBC', 1)
libc = 'uclibc'
else
cdata.set('HAVE_MUSL', 1)
libc = 'musl'
endif
cdata.set('HAVE_' + libc.to_upper(), 1)
vala_flags += '--define=' + libc.to_upper()
endif
if get_option('b_sanitize') == 'address'
@@ -288,6 +315,7 @@ gum_dep = dependency('frida-gum-1.0', default_options: [
gumjs_dep = dependency('frida-gumjs-1.0')
gumjs_inspector_dep = dependency('frida-gumjs-inspector-1.0')
glib_version_req = '>=2.74'
glib_options = [
'cocoa=disabled',
'selinux=disabled',
@@ -311,12 +339,12 @@ if optimize_for_prod
gee_options += 'disable-internal-asserts=true'
endif
glib_dep = dependency('glib-2.0', version: '>=2.72', default_options: glib_options)
glib_dep = dependency('glib-2.0', version: glib_version_req, default_options: glib_options)
gobject_dep = dependency('gobject-2.0')
gmodule_dep = dependency('gmodule-2.0')
gio_dep = dependency('gio-2.0')
gee_dep = dependency('gee-0.8', default_options: gee_options)
json_glib_dep = dependency('json-glib-1.0', default_options: [
json_glib_dep = dependency('json-glib-1.0', version: '>=1.8', default_options: [
'introspection=disabled',
'gtk_doc=disabled',
'tests=false',
@@ -340,8 +368,9 @@ quickjs_dep = dependency('quickjs', required: get_option('barebone_backend'), de
'atomics=disabled',
'stack_check=disabled',
])
lzfse_dep = dependency('lzfse', required: get_option('barebone_backend'))
native_glib_dep = dependency('glib-2.0', version: '>=2.74', native: true, default_options: glib_options)
native_glib_dep = dependency('glib-2.0', version: glib_version_req, native: true, default_options: glib_options)
native_gio_dep = dependency('gio-2.0', native: true)
native_gee_dep = dependency('gee-0.8', native: true, default_options: gee_options)
native_brotlienc_dep = dependency('libbrotlienc', native: true)
@@ -352,6 +381,10 @@ else
gio_unix_dep = dependency('gio-unix-2.0')
endif
if host_os_family == 'linux'
libbpf_dep = dependency('libbpf')
endif
if host_os == 'android'
minizip_dep = dependency('minizip', required: false, default_options: [
'zlib=enabled',
@@ -398,6 +431,10 @@ else
endif
have_local_backend = get_option('local_backend').allowed()
have_simmy_backend = get_option('simmy_backend') \
.disable_auto_if(host_os != 'macos') \
.require(host_os == 'macos', error_message: 'Simmy backend is only available on macOS') \
.allowed()
have_fruity_backend = get_option('fruity_backend') \
.disable_auto_if(not host_docks_mobile_devices) \
.allowed()
@@ -406,7 +443,7 @@ have_droidy_backend = get_option('droidy_backend') \
.allowed()
have_socket_backend = get_option('socket_backend').allowed()
have_barebone_backend = get_option('barebone_backend') \
.disable_if(not quickjs_dep.found()) \
.disable_if(not (quickjs_dep.found() and lzfse_dep.found())) \
.disable_auto_if(not host_docks_mobile_devices) \
.allowed()
compiler_backend_opt = get_option('compiler_backend') \
@@ -486,6 +523,7 @@ build_tests = get_option('tests') \
.allowed()
foreach b : [['local', have_local_backend],
['simmy', have_simmy_backend],
['fruity', have_fruity_backend],
['droidy', have_droidy_backend],
['socket', have_socket_backend],
@@ -556,9 +594,6 @@ if have_fruity_backend
'dns=disabled',
'arp=disabled',
'ethernet=enabled',
'tcp_mss=4036',
'tcp_snd_buf=65535',
'tcp_wnd=65535',
]
if optimize_for_prod
lwip_options += 'lwip_debug=disabled'
@@ -574,7 +609,17 @@ if quickjs_dep.found()
backend_reqs_private += 'quickjs'
endif
if host_os_family == 'linux' and cc.has_function('openpty', prefix: '#include <pty.h>')
if lzfse_dep.found()
backend_deps_private += lzfse_dep
backend_reqs_private += 'lzfse'
endif
if host_os_family == 'linux'
backend_deps_private += libbpf_dep
backend_reqs_private += 'libbpf'
endif
if host_os_family in ['darwin', 'freebsd'] or (host_os_family == 'linux' and cc.has_function('openpty', prefix: '#include <pty.h>'))
vala_flags += '--define=HAVE_OPENPTY'
endif
@@ -646,6 +691,9 @@ endif
if host_os in ['ios', 'tvos']
backend_libs_private += ['-Wl,-framework,CoreGraphics', '-Wl,-framework,UIKit']
endif
if host_os_family == 'freebsd'
backend_libs_private += ['-lutil']
endif
if get_option('devkits').length() != 0
if get_option('default_library') != 'static'
@@ -654,6 +702,7 @@ if get_option('devkits').length() != 0
mkdevkit = [python, releng / 'mkdevkit.py']
uninstalled_dir = meson.global_build_root() / 'meson-uninstalled'
devkit_options = [
'--dep-symbol-scope', get_option('devkit_symbol_scope'),
'--cc', '>>>', cc.cmd_array(), '<<<',
'--c-args', '>>>', get_option('c_args'), '<<<',
'--pkg-config', '>>>', find_program('pkg-config'), '<<<',
@@ -778,6 +827,7 @@ endif
summary(
{
'local': have_local_backend,
'simmy': have_simmy_backend,
'fruity': have_fruity_backend,
'droidy': have_droidy_backend,
'socket': have_socket_backend,
+15
View File
@@ -10,6 +10,12 @@ option('local_backend',
description: 'Include backend for the local system',
)
option('simmy_backend',
type: 'feature',
value: 'auto',
description: 'Include the iDevice Simulator backend',
)
option('fruity_backend',
type: 'feature',
value: 'auto',
@@ -150,6 +156,15 @@ option('devkits',
description: 'Devkits to build'
)
option('devkit_symbol_scope',
type: 'combo',
choices: ['prefixed', 'original'],
value: 'prefixed',
description : 'How devkit generation treats third-party symbols:\n'
+ ' - prefixed: add the \'_frida_\' prefix\n'
+ ' - original: keep symbols exactly as upstream\n'
)
option('tests',
type: 'feature',
value: 'auto',
+1 -1
Submodule releng updated: e10baa39a2...7ed66fe687.
+1 -1
View File
@@ -6,7 +6,7 @@ server_sources = [
if host_os_family == 'darwin'
server_sources += ['server-darwin.m']
endif
if host_os in ['ios', 'tvos']
if host_os in ['ios', 'tvos', 'xros']
server_sources += [
'server-ios-tvos.c',
]
+2 -2
View File
@@ -1,7 +1,7 @@
#include "server-glue.h"
#include "frida-core.h"
#if defined (HAVE_IOS) || defined (HAVE_TVOS)
#if defined (HAVE_IOS) || defined (HAVE_TVOS) || defined (HAVE_XROS)
# include "server-ios-tvos.h"
#endif
#ifdef HAVE_ANDROID
@@ -54,7 +54,7 @@ frida_server_environment_set_verbose_logging_enabled (gboolean enabled)
void
frida_server_environment_configure (void)
{
#if defined (HAVE_IOS) || defined (HAVE_TVOS)
#if defined (HAVE_IOS) || defined (HAVE_TVOS) || defined (HAVE_XROS)
_frida_server_ios_tvos_configure ();
#endif
@@ -1,11 +1,15 @@
ANDROID_API_LEVEL ?= 21
ANDROID_SDK_ROOT ?= $(shell echo ~/Library/Android/sdk)
ANDROID_API_LEVEL ?= 19
ANDROID_SDK_ROOT ?= $(shell echo ~/Android/Sdk)
android_platform := android-$(ANDROID_API_LEVEL)
android_jar := $(ANDROID_SDK_ROOT)/platforms/$(android_platform)/android.jar
build/frida-helper.dex: build/frida-helper.jar
dx --dex --output=$@ $<
helper.dex: build/frida-helper.jar
d8 \
--classpath $(android_jar) \
--output build/ \
$<
mv build/classes.dex $@
build/frida-helper.jar: re/frida/Helper.java
javac \
+738
View File
@@ -0,0 +1,738 @@
namespace Frida {
public sealed class AndroidHelperClient : Object, AsyncInitable {
public signal void closed ();
public IOStream stream {
get;
construct;
}
private BufferedInputStream input;
private OutputStream output;
private Cancellable io_cancellable = new Cancellable ();
private State state = CLOSED;
private Gee.Queue<Request> pending_requests = new Gee.ArrayQueue<Request> ();
private ByteArray pending_output = new ByteArray ();
private bool writing = false;
private enum State {
CLOSED,
OPEN
}
private const uint32 MAX_RESPONSE_SIZE = 100 * 1024 * 1024;
public AndroidHelperClient (IOStream stream) {
Object (stream: stream);
}
construct {
input = (BufferedInputStream) Object.new (typeof (BufferedInputStream),
"base-stream", stream.get_input_stream (),
"close-base-stream", false,
"buffer-size", 128 * 1024);
output = stream.get_output_stream ();
state = OPEN;
process_incoming_responses.begin ();
}
public async void close (Cancellable? cancellable) throws IOError {
io_cancellable.cancel ();
var source = new IdleSource ();
source.set_callback (close.callback);
source.attach (MainContext.get_thread_default ());
yield;
try {
yield stream.close_async (Priority.DEFAULT, cancellable);
} catch (IOError e) {
}
ensure_closed ();
}
private void ensure_closed () {
if (state == CLOSED)
return;
state = CLOSED;
closed ();
}
public async HostApplicationInfo get_frontmost_application (FrontmostQueryOptions options,
Cancellable? cancellable) throws Error, IOError {
var stanza = new Json.Builder ();
stanza
.begin_array ()
.add_string_value ("get-frontmost-application")
.add_string_value (options.scope.to_nick ())
.end_array ();
Json.Node response = yield request (stanza.get_root (), cancellable);
if (response.is_null ())
return HostApplicationInfo.empty ();
Json.Reader reader = new Json.Reader (response);
string? identifier = null;
string? name = null;
uint pid = 0;
HashTable<string, Variant> parameters = make_parameters_dict ();
if (reader.read_element (0)) {
identifier = reader.get_string_value ();
reader.end_element ();
}
if (reader.read_element (1)) {
name = reader.get_string_value ();
reader.end_element ();
}
if (reader.read_element (2)) {
pid = (uint) reader.get_int_value ();
reader.end_element ();
}
if (reader.read_element (3)) {
if (reader.is_object ())
add_parameters_from_json (parameters, reader);
reader.end_element ();
}
GLib.Error? error = reader.get_error ();
if (error != null)
throw new Error.PROTOCOL ("%s", error.message);
return HostApplicationInfo (identifier, name, pid, (owned) parameters);
}
public async HostApplicationInfo[] enumerate_applications (ApplicationQueryOptions options, Cancellable? cancellable)
throws Error, IOError {
var stanza = new Json.Builder ();
stanza
.begin_array ()
.add_string_value ("enumerate-applications");
stanza.begin_array ();
options.enumerate_selected_identifiers (identifier => stanza.add_string_value (identifier));
stanza.end_array ();
stanza
.add_string_value (options.scope.to_nick ())
.end_array ();
Json.Node response = yield request (stanza.get_root (), cancellable);
Json.Reader reader = new Json.Reader (response);
int num_apps = reader.count_elements ();
if (num_apps == -1)
throw new Error.PROTOCOL ("Invalid response from helper service");
var result = new HostApplicationInfo[0];
for (int i = 0; i != num_apps; i++) {
reader.read_element (i);
string? identifier = null;
string? name = null;
uint pid = 0;
HashTable<string, Variant> parameters = make_parameters_dict ();
if (reader.read_element (0)) {
identifier = reader.get_string_value ();
reader.end_element ();
}
if (reader.read_element (1)) {
name = reader.get_string_value ();
reader.end_element ();
}
if (reader.read_element (2)) {
pid = (uint) reader.get_int_value ();
reader.end_element ();
}
if (reader.read_element (3)) {
if (reader.is_object ())
add_parameters_from_json (parameters, reader);
reader.end_element ();
}
GLib.Error? error = reader.get_error ();
if (error != null)
throw new Error.PROTOCOL ("%s", error.message);
result += HostApplicationInfo (identifier, name, pid, (owned) parameters);
reader.end_element ();
}
return result;
}
public async HostProcessInfo[] enumerate_processes (ProcessQueryOptions options, Cancellable? cancellable)
throws Error, IOError {
var stanza = new Json.Builder ();
stanza
.begin_array ()
.add_string_value ("enumerate-processes");
stanza.begin_array ();
options.enumerate_selected_pids (pid => stanza.add_int_value (pid));
stanza.end_array ();
stanza
.add_string_value (options.scope.to_nick ())
.end_array ();
Json.Node response = yield request (stanza.get_root (), cancellable);
Json.Reader reader = new Json.Reader (response);
int num_processes = reader.count_elements ();
if (num_processes == -1)
throw new Error.PROTOCOL ("Invalid response from helper service");
var result = new HostProcessInfo[0];
for (int i = 0; i != num_processes; i++) {
reader.read_element (i);
uint pid = 0;
string? name = null;
HashTable<string, Variant> parameters = make_parameters_dict ();
if (reader.read_element (0)) {
pid = (uint) reader.get_int_value ();
reader.end_element ();
}
if (reader.read_element (1)) {
name = reader.get_string_value ();
reader.end_element ();
}
if (reader.read_element (2)) {
if (reader.is_object ())
add_parameters_from_json (parameters, reader);
reader.end_element ();
}
GLib.Error? error = reader.get_error ();
if (error != null)
throw new Error.PROTOCOL ("%s", error.message);
result += HostProcessInfo (pid, name, (owned) parameters);
reader.end_element ();
}
return result;
}
public async string get_process_name (string package, int uid, Cancellable? cancellable) throws Error, IOError {
var stanza = new Json.Builder ();
stanza
.begin_array ()
.add_string_value ("get-process-name")
.add_string_value (package)
.add_int_value (uid)
.end_array ();
Json.Node response = yield request (stanza.get_root (), cancellable);
var r = new Json.Reader (response);
parse_envelope_or_throw (r);
r.read_element (1);
string? process_name = r.get_string_value ();
if (process_name == null)
throw new Error.PROTOCOL ("Malformed response");
return process_name;
}
public async void start_package (string package, PackageEntrypoint entrypoint, Cancellable? cancellable)
throws Error, IOError {
if (entrypoint is DefaultActivityEntrypoint) {
var stanza = new Json.Builder ();
stanza
.begin_array ()
.add_string_value ("start-activity")
.add_string_value (package)
.add_null_value ()
.add_int_value (entrypoint.uid)
.end_array ();
yield request_ok (stanza, cancellable);
return;
}
if (entrypoint is ActivityEntrypoint) {
var e = (ActivityEntrypoint) entrypoint;
var stanza = new Json.Builder ();
stanza
.begin_array ()
.add_string_value ("start-activity")
.add_string_value (package)
.add_string_value (e.activity)
.add_int_value (entrypoint.uid)
.end_array ();
yield request_ok (stanza, cancellable);
return;
}
if (entrypoint is BroadcastReceiverEntrypoint) {
var e = (BroadcastReceiverEntrypoint) entrypoint;
var stanza = new Json.Builder ();
stanza
.begin_array ()
.add_string_value ("send-broadcast")
.add_string_value (package)
.add_string_value (e.receiver)
.add_string_value (e.action)
.add_int_value (entrypoint.uid)
.end_array ();
yield request_ok (stanza, cancellable);
return;
}
assert_not_reached ();
}
public async void stop_package (string package, int uid, Cancellable? cancellable) throws Error, IOError {
var stanza = new Json.Builder ();
stanza
.begin_array ()
.add_string_value ("stop-package")
.add_string_value (package)
.add_int_value (uid)
.end_array ();
Json.Node response = yield request (stanza.get_root (), cancellable);
var r = new Json.Reader (response);
parse_envelope_or_throw (r);
}
public async bool try_stop_package_by_pid (uint pid, Cancellable? cancellable) throws Error, IOError {
var stanza = new Json.Builder ();
stanza
.begin_array ()
.add_string_value ("try-stop-package-by-pid")
.add_int_value ((int) pid)
.end_array ();
Json.Node response = yield request (stanza.get_root (), cancellable);
var r = new Json.Reader (response);
parse_envelope_or_throw (r);
r.read_element (1);
var val = r.get_value ();
if (val == null || val.get_value_type () != typeof (bool))
throw new Error.PROTOCOL ("Malformed response");
return r.get_boolean_value ();
}
private void parse_envelope_or_throw (Json.Reader r) throws Error {
r.read_element (0);
string? kind = r.get_string_value ();
if (kind == null)
throw new Error.PROTOCOL ("Malformed response");
r.end_element ();
if (kind == "ok")
return;
if (kind == "error") {
r.read_element (1);
string? code = r.get_string_value ();
if (code == null)
throw new Error.PROTOCOL ("Malformed response");
r.end_element ();
r.read_element (2);
string? message = r.get_string_value ();
if (message == null)
throw new Error.PROTOCOL ("Malformed response");
r.end_element ();
if (code == "INVALID_ARGUMENT")
throw new Error.INVALID_ARGUMENT ("%s", message);
throw new Error.NOT_SUPPORTED ("%s", message);
}
throw new Error.PROTOCOL ("Malformed response");
}
private static void add_parameters_from_json (HashTable<string, Variant> parameters, Json.Reader reader) throws Error {
foreach (string name in reader.list_members ()) {
reader.read_member (name);
if (reader.is_value ()) {
Json.Node val = reader.get_value ();
parameters[name] = variant_from_json_value (val);
} else if (reader.is_array ()) {
int length = reader.count_elements ();
if (length == 0)
throw new Error.PROTOCOL ("Unexpected JSON array element shape");
if (name == "$icons") {
var icons = new VariantBuilder (new VariantType.array (VariantType.VARDICT));
for (int i = 0; i != length; i++) {
reader.read_element (i);
string? png_str = reader.get_string_value ();
if (png_str == null)
throw new Error.PROTOCOL ("Unexpected JSON icon type");
var png = new Bytes.take (Base64.decode (png_str));
icons.open (VariantType.VARDICT);
icons.add ("{sv}", "format", new Variant.string ("png"));
icons.add ("{sv}", "image", Variant.new_from_data (new VariantType ("ay"),
png.get_data (), true, png));
icons.close ();
reader.end_element ();
}
parameters["icons"] = icons.end ();
} else {
reader.read_element (0);
if (!reader.is_value ())
throw new Error.PROTOCOL ("Unexpected JSON array element type");
Variant first_element = variant_from_json_value (reader.get_value ());
reader.end_element ();
var builder = new VariantBuilder (new VariantType.array (first_element.get_type ()));
builder.add_value (first_element);
for (int i = 1; i != length; i++) {
reader.read_element (i);
if (!reader.is_value ())
throw new Error.PROTOCOL ("Unexpected JSON array element type");
builder.add_value (variant_from_json_value (reader.get_value ()));
reader.end_element ();
}
parameters[name] = builder.end ();
}
} else {
throw new Error.PROTOCOL ("Unexpected JSON type");
}
reader.end_member ();
}
}
private static Variant variant_from_json_value (Json.Node node) throws Error {
Type type = node.get_value_type ();
if (type == typeof (string))
return new Variant.string (node.get_string ());
if (type == typeof (int64))
return new Variant.int64 (node.get_int ());
if (type == typeof (bool))
return new Variant.boolean (node.get_boolean ());
throw new Error.PROTOCOL ("Unexpected JSON type: %s", type.name ());
}
public async Json.Node request (Json.Node stanza, Cancellable? cancellable) throws Error, IOError {
if (state == CLOSED)
throw new Error.INVALID_OPERATION ("Helper client is closed");
var r = new Request (request.callback);
pending_requests.offer (r);
var cancel_source = new CancellableSource (cancellable);
cancel_source.set_callback (() => {
r.complete_with_error (new IOError.CANCELLED ("Operation was cancelled"));
return false;
});
cancel_source.attach (MainContext.get_thread_default ());
write_request (stanza);
yield;
cancel_source.destroy ();
cancellable.set_error_if_cancelled ();
GLib.Error? e = r.error;
if (e != null) {
if (e is Error)
throw (Error) e;
if (e is IOError.CANCELLED)
throw (IOError) e;
throw new Error.TRANSPORT ("%s", e.message);
}
return r.response;
}
private async void request_ok (Json.Builder stanza, Cancellable? cancellable) throws Error, IOError {
Json.Node response = yield request (stanza.get_root (), cancellable);
var r = new Json.Reader (response);
parse_envelope_or_throw (r);
}
private void write_request (Json.Node request) {
string request_str = Json.to_string (request, false);
uint8[] request_data = request_str.data;
uint offset = pending_output.len;
pending_output.set_size ((uint) (offset + sizeof (uint32) + request_data.length));
uint8 * blob = (uint8 *) pending_output.data + offset;
uint32 * size = blob;
*size = request_data.length.to_big_endian ();
Memory.copy (blob + 4, request_data, request_data.length);
if (!writing) {
writing = true;
var source = new IdleSource ();
source.set_callback (() => {
process_pending_output.begin ();
return false;
});
source.attach (MainContext.get_thread_default ());
}
}
private async void process_pending_output () {
while (pending_output.len > 0) {
uint8[] batch = pending_output.steal ();
size_t bytes_written;
try {
yield output.write_all_async (batch, Priority.DEFAULT, io_cancellable, out bytes_written);
} catch (GLib.Error e) {
break;
}
}
writing = false;
}
private async void process_incoming_responses () {
while (true) {
try {
Json.Node response = yield read_response ();
Request? request = pending_requests.poll ();
if (request == null)
throw new Error.PROTOCOL ("Unexpected response");
request.complete_with_response (response);
} catch (GLib.Error e) {
foreach (Request r in pending_requests)
r.complete_with_error (e);
pending_requests.clear ();
ensure_closed ();
return;
}
}
}
private async Json.Node read_response () throws GLib.Error {
size_t header_size = sizeof (uint32);
if (input.get_available () < header_size)
yield fill_until_n_bytes_available (header_size, io_cancellable);
uint32 response_size = 0;
unowned uint8[] response_size_buf = ((uint8[]) &response_size)[0:4];
input.peek (response_size_buf);
response_size = uint32.from_big_endian (response_size);
if (response_size < 1 || response_size > MAX_RESPONSE_SIZE)
throw new Error.PROTOCOL ("Invalid response size");
size_t frame_size = header_size + response_size;
if (input.get_available () < frame_size)
yield fill_until_n_bytes_available (frame_size, io_cancellable);
var response_data = new uint8[response_size + 1];
response_data.length = (int) response_size;
input.peek (response_data, header_size);
input.skip (frame_size, io_cancellable);
return Json.from_string ((string) response_data);
}
private async void fill_until_n_bytes_available (size_t minimum, Cancellable? cancellable) throws GLib.Error {
size_t available = input.get_available ();
while (available < minimum) {
if (input.get_buffer_size () < minimum)
input.set_buffer_size (minimum);
ssize_t n = yield input.fill_async ((ssize_t) (input.get_buffer_size () - available),
Priority.DEFAULT, cancellable);
if (n == 0)
throw new IOError.CONNECTION_CLOSED ("Connection closed");
available += n;
}
}
private class Request {
private SourceFunc? handler;
public Json.Node? response;
public GLib.Error? error;
public Request (owned SourceFunc handler) {
this.handler = (owned) handler;
}
public void complete_with_response (Json.Node r) {
if (handler == null)
return;
response = r;
handler ();
handler = null;
}
public void complete_with_error (GLib.Error e) {
if (handler == null)
return;
error = e;
handler ();
handler = null;
}
}
}
public abstract class PackageEntrypoint : Object {
public int uid {
get;
set;
}
public static PackageEntrypoint parse (string package, HostSpawnOptions options) throws Error {
PackageEntrypoint? entrypoint = null;
HashTable<string, Variant> aux = options.aux;
Variant? activity_value = aux["activity"];
if (activity_value != null) {
if (!activity_value.is_of_type (VariantType.STRING))
throw new Error.INVALID_ARGUMENT ("The 'activity' option must be a string");
string activity = canonicalize_class_name (activity_value.get_string (), package);
if (aux.contains ("action")) {
throw new Error.INVALID_ARGUMENT (
"The 'action' option should only be specified when a 'receiver' is specified");
}
entrypoint = new ActivityEntrypoint (activity);
}
Variant? receiver_value = aux["receiver"];
if (receiver_value != null) {
if (!receiver_value.is_of_type (VariantType.STRING))
throw new Error.INVALID_ARGUMENT ("The 'receiver' option must be a string");
string receiver = canonicalize_class_name (receiver_value.get_string (), package);
if (entrypoint != null) {
throw new Error.INVALID_ARGUMENT (
"Only one of 'activity' or 'receiver' (with 'action') may be specified");
}
Variant? action_value = aux["action"];
if (action_value == null)
throw new Error.INVALID_ARGUMENT ("The 'action' option is required when 'receiver' is specified");
if (!action_value.is_of_type (VariantType.STRING))
throw new Error.INVALID_ARGUMENT ("The 'action' option must be a string");
string action = action_value.get_string ();
entrypoint = new BroadcastReceiverEntrypoint (receiver, action);
}
if (entrypoint == null)
entrypoint = new DefaultActivityEntrypoint ();
Variant? uid_value = aux["uid"];
if (uid_value != null) {
if (!uid_value.is_of_type (VariantType.INT64))
throw new Error.INVALID_ARGUMENT ("The 'uid' option must be an integer");
entrypoint.uid = (int) uid_value.get_int64 ();
}
return entrypoint;
}
}
public sealed class DefaultActivityEntrypoint : PackageEntrypoint {
public DefaultActivityEntrypoint () {
Object ();
}
}
public sealed class ActivityEntrypoint : PackageEntrypoint {
public string activity {
get;
construct;
}
public ActivityEntrypoint (string activity) {
Object (activity: activity);
}
}
public sealed class BroadcastReceiverEntrypoint : PackageEntrypoint {
public string receiver {
get;
construct;
}
public string action {
get;
construct;
}
public BroadcastReceiverEntrypoint (string receiver, string action) {
Object (receiver: receiver, action: action);
}
}
private static string canonicalize_class_name (string klass, string package) {
var result = new StringBuilder (klass);
if (klass.has_prefix (".")) {
result.prepend (package);
} else if (klass.index_of (".") == -1) {
result.prepend_c ('.');
result.prepend (package);
}
return result.str;
}
}
Binary file not shown.
+2
View File
@@ -0,0 +1,2 @@
backend_sources += files('client.vala')
android_helper_dex = files('helper.dex')
File diff suppressed because it is too large. Load diff
File renamed without changes.
+12 -3
View File
@@ -238,7 +238,8 @@ def emit_gir(api: ApiSpec, core_gir: str, base_gir: str, output_dir: Path) -> st
for elem in core_elements + base_elements:
if tag_name == "class":
for child in list(elem):
if (child.tag == CORE_TAG_IMPLEMENTS and child.get("name") == "FridaBase.AgentMessageSink") \
if (child.tag == CORE_TAG_IMPLEMENTS and child.get("name") in {"Frida.HostSessionHub", "Frida.AgentMessageSink",
"FridaBase.AgentMessageSink"}) \
or child.tag == CORE_TAG_FIELD \
or child.get("name").startswith("_"):
elem.remove(child)
@@ -327,11 +328,15 @@ def parse_api(frida_version, frida_version_components, api_version, toplevel_cod
}
internal_type_prefixes = [
"AgentMessageKind",
"DrainStatus",
"Fruity",
"HostSession",
"LinuxCompat32Syscall",
"LinuxSyscall",
"MessageType",
"PeerSetup",
"PortConflictBehavior",
"RecordAction",
"ResultCode",
"SpawnStartState",
"State",
@@ -501,7 +506,7 @@ def parse_api(frida_version, frida_version_components, api_version, toplevel_cod
def function_is_public(name):
return not name.startswith("_") and \
not name.startswith("throw_") and \
name not in [
name not in {
"generate_certificate",
"get_dbus_context",
"invalidate_dbus_context",
@@ -512,7 +517,11 @@ def function_is_public(name):
"parse_socket_address",
"negotiate_connection",
"check_kernel_version",
]
"get_syscall_signatures",
"get_compat32_syscall_signatures",
"make_stdio_pipes",
"make_stdio_pipe",
}
def parse_vala_object_types(source) -> List[ApiObjectType]:
return [ApiObjectType(m.group(3), m.group(2)) for m in OBJECT_TYPE_PATTERN.finditer(source, re.MULTILINE)]
+503
View File
@@ -0,0 +1,503 @@
[CCode (gir_namespace = "FridaBarebone", gir_version = "1.0")]
namespace Frida.Barebone {
public sealed class AgentConnection : Object, AsyncInitable {
public signal void script_message (AgentScriptId id, string json, Bytes? data);
private Cancellable io_cancellable = new Cancellable ();
private SocketConnection hostlink;
private BufferedInputStream input;
private OutputStream output;
private AgentConfig agent_config;
private ImageConfig? image_config;
private Machine machine;
private Allocator allocator;
private Allocation elf_allocation;
private Allocation config_allocation;
private Callback mprotect_callback;
private Callback remap_writable_pages_callback;
private Gee.Map<uint16, Promise<Variant>> pending_requests = new Gee.HashMap<uint16, Promise<Variant>> ();
private uint16 next_request_id = 1;
private const int COMMAND_TIMEOUT_MS = 25000;
public static async AgentConnection open (AgentConfig agent_config, ImageConfig? image_config, Machine machine,
Allocator allocator, Cancellable? cancellable) throws Error, IOError {
var connection = new AgentConnection () {
agent_config = agent_config,
image_config = image_config,
machine = machine,
allocator = allocator,
};
try {
yield connection.init_async (Priority.DEFAULT, cancellable);
} catch (GLib.Error e) {
throw_api_error (e);
}
return connection;
}
private async bool init_async (int io_priority, Cancellable? cancellable) throws Error, IOError {
HostlinkTransportConfig? transport_config = agent_config.transport as HostlinkTransportConfig;
if (transport_config == null)
throw new Error.NOT_SUPPORTED ("Unsupported transport config: only hostlink is supported for now");
var qmp = yield QmpClient.open (transport_config.qmp, 0, cancellable);
var link = yield qmp.open_hostlink (cancellable);
hostlink = link.connection;
input = (BufferedInputStream) Object.new (typeof (BufferedInputStream),
"base-stream", hostlink.get_input_stream (),
"close-base-stream", false,
"buffer-size", 128 * 1024);
output = hostlink.get_output_stream ();
var gdb = machine.gdb;
ByteOrder byte_order = gdb.byte_order;
uint pointer_size = gdb.pointer_size;
uint64 kernel_base;
Layout layout;
if (image_config != null) {
kernel_base = image_config.base.address;
layout = yield Layout.load_from_symbol_source (File.new_for_path (image_config.file), kernel_base,
byte_order, pointer_size, cancellable);
} else {
kernel_base = 0;
layout = new Layout.empty ();
}
if (kernel_base == 0)
throw new Error.NOT_SUPPORTED ("Missing kernel_base");
var symbols = new Gee.HashMap<string, SymbolInfo> ();
var hash_builder = new SymbolHashBuilder ();
foreach (var s in layout.symbols) {
symbols[s.name] = s;
hash_builder.add_symbol (s);
}
if (image_config != null) {
foreach (var e in image_config.symbols.entries) {
unowned string name = e.key;
if (!symbols.has_key (name)) {
var s = new SymbolInfo () {
name = name,
offset = (uint32) e.value,
symbol_type = 0xf,
section = 0x10, // FIXME
};
symbols[name] = s;
hash_builder.add_symbol (s);
}
}
}
SymbolInfo? thread_block = symbols["thread_block"];
if (thread_block == null)
throw new Error.NOT_SUPPORTED ("Missing symbol for thread_block");
var config_builder = new VariantBuilder (new VariantType ("(tuta(ssuuuu)ay)"));
config_builder.add ("t", link.mmio);
config_builder.add ("u", link.irq);
config_builder.add ("t", kernel_base);
config_builder.open (new VariantType ("a(ssuuuu)"));
foreach (var m in layout.modules) {
config_builder.add ("(ssuuuu)",
m.name,
m.version,
m.offset,
m.size,
m.start_func_offset,
m.stop_func_offset
);
}
config_builder.close ();
Bytes symbol_data = hash_builder.build (byte_order);
config_builder.add_value (Variant.new_from_data (new VariantType ("ay"), symbol_data.get_data (), true,
symbol_data));
Gum.ElfModule elf;
try {
elf = new Gum.ElfModule.from_file (agent_config.path);
} catch (Gum.Error e) {
throw new Error.INVALID_ARGUMENT ("%s", e.message);
}
var raw_elf = gdb.make_buffer (new Bytes (elf.get_file_data ()));
var missing_symbols = new Gee.ArrayList<string> ();
elf.enumerate_symbols (s => {
unowned Gum.ElfSectionDetails? sect = s.section;
if (sect != null && sect.name == ".kernel_addrs") {
string name = s.name[1:];
SymbolInfo? info = symbols[name];
if (info != null) {
size_t file_offset = (size_t) (sect.offset + (s.address - sect.address));
raw_elf.write_pointer (file_offset, kernel_base + info.offset);
} else {
missing_symbols.add (name);
}
}
return true;
});
if (!missing_symbols.is_empty) {
throw new Error.INVALID_ARGUMENT ("Missing symbols for: %s",
string.joinv (", ", missing_symbols.to_array ()));
}
yield machine.enter_exception_level (1, 1000, cancellable);
var bp = yield gdb.add_breakpoint (SOFT, kernel_base + thread_block.offset, 4, cancellable);
GDB.Breakpoint? hit_breakpoint = null;
do {
var exception = yield gdb.continue_until_exception (cancellable);
hit_breakpoint = exception.breakpoint;
} while (hit_breakpoint != bp);
yield bp.remove (cancellable);
size_t page_size = yield machine.query_page_size (cancellable);
elf_allocation = yield inject_elf (elf, raw_elf.bytes, page_size, machine, allocator, cancellable);
uint64 start_address = 0;
uint64 remap_writable_pages_address = 0;
uint64 mprotect_address = 0;
uint64 base_va = elf_allocation.virtual_address;
elf.enumerate_symbols (e => {
if (e.name == "_start")
start_address = base_va + e.address;
else if (e.name == "gum_barebone_try_remap_writable_pages")
remap_writable_pages_address = base_va + e.address;
else if (e.name == "gum_try_mprotect")
mprotect_address = base_va + e.address;
else
return true;
return start_address == 0 || mprotect_address == 0 || remap_writable_pages_address == 0;
});
if (start_address == 0)
throw new Error.INVALID_ARGUMENT ("Invalid agent: no _start symbol found");
if (remap_writable_pages_address == 0)
throw new Error.INVALID_ARGUMENT ("Invalid agent: no gum_barebone_try_remap_writable_pages symbol found");
if (mprotect_address == 0)
throw new Error.INVALID_ARGUMENT ("Invalid agent: no gum_try_mprotect symbol found");
remap_writable_pages_callback = yield new Callback (remap_writable_pages_address,
new RemapWritablePagesHandler (machine), machine, cancellable);
mprotect_callback = yield new Callback (mprotect_address, new MemoryProtectHandler (machine), machine, cancellable);
var config_blob = config_builder.end ().get_data_as_bytes ();
config_allocation = yield allocator.allocate (config_blob.get_size (), 8, cancellable);
yield gdb.write_byte_array (config_allocation.virtual_address, config_blob, cancellable);
yield machine.invoke (start_address, {
config_allocation.virtual_address,
config_allocation.size
},
cancellable);
yield gdb.continue (cancellable);
process_incoming_messages.begin ();
return true;
}
public async void close (Cancellable? cancellable) throws IOError {
io_cancellable.cancel ();
}
public async AgentScriptId create_script (string source, Cancellable? cancellable) throws Error, IOError {
var payload = new Variant ("s", source);
var response = yield execute_command (Command.CREATE_SCRIPT, payload, cancellable);
if (!response.check_format_string ("u", false))
throw new Error.PROTOCOL ("Invalid create_script response format");
uint32 script_handle;
response.get ("u", out script_handle);
return AgentScriptId (script_handle);
}
public async void load_script (AgentScriptId script_id, Cancellable? cancellable) throws Error, IOError {
var payload = new Variant ("u", script_id.handle);
yield execute_command (Command.LOAD_SCRIPT, payload, cancellable);
}
public async void destroy_script (AgentScriptId script_id, Cancellable? cancellable) throws Error, IOError {
var payload = new Variant ("u", script_id.handle);
yield execute_command (Command.DESTROY_SCRIPT, payload, cancellable);
}
public async void post_script_message (AgentScriptId script_id, string message, Bytes? data, Cancellable? cancellable)
throws Error, IOError {
var payload = new Variant ("(us)", script_id.handle, message);
// TODO: Include data.
yield execute_command (Command.POST_SCRIPT_MESSAGE, payload, cancellable);
}
private async Variant execute_command (Command command, Variant payload, Cancellable? cancellable) throws Error, IOError {
uint16 request_id = next_request_id++;
var command_message = new Variant ("(yqv)", (uint8) command, request_id, payload);
if (machine.gdb.byte_order != ByteOrder.HOST)
command_message = command_message.byteswap ();
var command_bytes = command_message.get_data_as_bytes ();
var builder = machine.gdb.make_buffer_builder ();
Bytes frame = builder
.append_uint32 ((uint32) command_bytes.get_size ())
.append_bytes (command_bytes)
.build ();
var promise = new Promise<Variant> ();
pending_requests[request_id] = promise;
try {
yield output.write_all_async (frame.get_data (), Priority.DEFAULT, cancellable, null);
} catch (GLib.Error e) {
pending_requests.unset (request_id);
throw new Error.TRANSPORT ("%s", e.message);
}
var timeout_source = new TimeoutSource (COMMAND_TIMEOUT_MS);
timeout_source.set_callback (() => {
Promise<Variant>? p;
if (pending_requests.unset (request_id, out p))
p.reject (new Error.TIMED_OUT ("Command timed out"));
return Source.REMOVE;
});
timeout_source.attach (MainContext.get_thread_default ());
try {
return yield promise.future.wait_async (cancellable);
} finally {
timeout_source.destroy ();
}
}
private async void process_incoming_messages () {
var byte_order = machine.gdb.byte_order;
try {
while (true) {
size_t header_size = 4;
if (input.get_available () < header_size)
yield fill_until_n_bytes_available (header_size);
uint32 body_size = 0;
unowned uint8[] size_buf = ((uint8[]) &body_size)[:4];
input.peek (size_buf);
body_size = uint32.from_little_endian (body_size);
size_t full_size = header_size + body_size;
if (input.get_available () < full_size)
yield fill_until_n_bytes_available (full_size);
var body = new uint8[body_size];
input.peek (body, header_size);
input.skip (full_size, io_cancellable);
var raw_message = new Bytes.take ((owned) body);
var message = Variant.new_from_data (new VariantType ("(yqv)"), raw_message.get_data (), false,
raw_message);
if (byte_order != ByteOrder.HOST)
message = message.byteswap ();
if (!message.check_format_string ("(yqv)", false))
throw new Error.PROTOCOL ("Invalid message format");
uint8 command_code;
uint16 request_id;
Variant payload;
message.get ("(yqv)", out command_code, out request_id, out payload);
if (command_code == Command.SCRIPT_MESSAGE) {
if (!payload.check_format_string ("(us)", false))
throw new Error.PROTOCOL ("Invalid script message payload format");
uint32 script_handle;
unowned string json;
payload.get ("(u&s)", out script_handle, out json);
script_message (AgentScriptId (script_handle), json, null);
} else if (command_code == Command.REPLY) {
Promise<Variant>? promise;
if (pending_requests.unset (request_id, out promise))
promise.resolve (payload);
}
}
} catch (GLib.Error e) {
}
}
private async void fill_until_n_bytes_available (size_t minimum) throws Error, IOError {
size_t available = input.get_available ();
while (available < minimum) {
if (input.get_buffer_size () < minimum)
input.set_buffer_size (minimum);
ssize_t n;
try {
n = yield input.fill_async ((ssize_t) (input.get_buffer_size () - available), Priority.DEFAULT,
io_cancellable);
} catch (GLib.Error e) {
throw new Error.TRANSPORT ("Connection closed");
}
if (n == 0)
throw new Error.TRANSPORT ("Connection closed");
available += n;
}
}
private class RemapWritablePagesHandler : Object, CallbackHandler {
public signal void output (string message);
public uint arity {
get { return 2; }
}
private Machine machine;
public RemapWritablePagesHandler (Machine machine) {
this.machine = machine;
}
public async uint64 handle_invocation (uint64[] args, CallFrame frame, Cancellable? cancellable)
throws Error, IOError {
var pages = args[0];
var num_pages = (uint) args[1];
var physical_addresses = new Gee.ArrayList<uint64?> ();
var gdb = machine.gdb;
var reader = new BufferReader (yield gdb.read_buffer (pages, num_pages * gdb.pointer_size, cancellable));
for (uint i = 0; i != num_pages; i++)
physical_addresses.add (reader.read_pointer ());
Allocation allocation = yield machine.allocate_pages (physical_addresses, cancellable);
// TODO: Handle cleanup.
return allocation.virtual_address;
}
}
private class MemoryProtectHandler : Object, CallbackHandler {
public signal void output (string message);
public uint arity {
get { return 3; }
}
private Machine machine;
public MemoryProtectHandler (Machine machine) {
this.machine = machine;
}
public async uint64 handle_invocation (uint64[] args, CallFrame frame, Cancellable? cancellable)
throws Error, IOError {
var address = args[0];
var size = (size_t) args[1];
var prot = (Gum.PageProtection) args[2];
try {
yield machine.protect_pages (address, size, prot, cancellable);
return 1;
} catch (GLib.Error e) {
return 0;
}
}
}
private enum Command {
CREATE_SCRIPT = 1,
LOAD_SCRIPT = 2,
DESTROY_SCRIPT = 3,
POST_SCRIPT_MESSAGE = 4,
REPLY = 128,
SCRIPT_MESSAGE = 129
}
private enum Status {
IDLE,
BUSY,
DATA_READY,
ERROR
}
}
private class SymbolHashBuilder : Object {
private Gee.Map<string, Gee.List<SymbolInfo>> symbol_table = new Gee.TreeMap<string, Gee.List<SymbolInfo>> ();
public void add_symbol (SymbolInfo symbol) {
var symbol_list = symbol_table[symbol.name];
if (symbol_list == null) {
symbol_list = new Gee.ArrayList<SymbolInfo> ();
symbol_table[symbol.name] = symbol_list;
}
symbol_list.add (symbol);
}
public Bytes build (ByteOrder byte_order) {
var builder = new BufferBuilder (byte_order);
var all_symbols = new Gee.ArrayList<SymbolInfo> ();
foreach (var entry in symbol_table.entries) {
foreach (var symbol in entry.value)
all_symbols.add (symbol);
}
uint total_symbols = all_symbols.size;
builder.append_uint32 (total_symbols);
var name_index_offset = builder.offset;
builder.skip (total_symbols * 4);
var addr_index_offset = builder.offset;
builder.skip (total_symbols * 4);
var symbol_offsets = new uint32[total_symbols];
for (uint i = 0; i != total_symbols; i++) {
var symbol = all_symbols[(int) i];
builder.align (4);
symbol_offsets[i] = (uint32) builder.offset;
builder.append_uint32 (symbol.offset);
// TODO: Only include details we need.
builder.append_uint8 (symbol.symbol_type);
builder.append_uint8 (symbol.section);
builder.append_uint16 (symbol.description);
builder.append_string (symbol.name, StringTerminator.NUL);
}
for (uint i = 0; i != total_symbols; i++)
builder.write_uint32 (name_index_offset + (i * 4), symbol_offsets[i]);
var addr_sorted_symbols = new Gee.ArrayList<int> ();
for (uint i = 0; i != total_symbols; i++)
addr_sorted_symbols.add ((int) i);
addr_sorted_symbols.sort ((a, b) => {
var symbol_a = all_symbols[a];
var symbol_b = all_symbols[b];
if (symbol_a.offset < symbol_b.offset)
return -1;
if (symbol_a.offset > symbol_b.offset)
return 1;
return 0;
});
for (uint i = 0; i != total_symbols; i++) {
int original_index = addr_sorted_symbols[(int) i];
uint symbol_data_offset = symbol_offsets[original_index];
builder.write_uint32 (addr_index_offset + (i * 4), symbol_data_offset);
}
return builder.build ();
}
}
}
+2
View File
@@ -0,0 +1,2 @@
[build]
target = "aarch64-unknown-none"
+296
View File
@@ -0,0 +1,296 @@
# This file is automatically @generated by Cargo.
# It is not intended for manual editing.
version = 4
[[package]]
name = "aho-corasick"
version = "1.1.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916"
dependencies = [
"memchr",
]
[[package]]
name = "bindgen"
version = "0.72.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4f72209734318d0b619a5e0f5129918b848c416e122a3c4ce054e03cb87b726f"
dependencies = [
"bitflags",
"cexpr",
"clang-sys",
"itertools",
"log",
"prettyplease",
"proc-macro2",
"quote",
"regex",
"rustc-hash",
"shlex",
"syn",
]
[[package]]
name = "bitflags"
version = "2.9.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1b8e56985ec62d17e9c1001dc89c88ecd7dc08e47eba5ec7c29c7b5eeecde967"
[[package]]
name = "cc"
version = "1.2.27"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d487aa071b5f64da6f19a3e848e3578944b726ee5a4854b82172f02aa876bfdc"
dependencies = [
"shlex",
]
[[package]]
name = "cexpr"
version = "0.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6fac387a98bb7c37292057cffc56d62ecb629900026402633ae9160df93a8766"
dependencies = [
"nom",
]
[[package]]
name = "cfg-if"
version = "1.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9555578bc9e57714c812a1f84e4fc5b4d21fcb063490c624de019f7464c91268"
[[package]]
name = "clang-sys"
version = "1.8.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0b023947811758c97c59bf9d1c188fd619ad4718dcaa767947df1cadb14f39f4"
dependencies = [
"glob",
"libc",
"libloading",
]
[[package]]
name = "either"
version = "1.15.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "48c757948c5ede0e46177b7add2e67155f70e33c07fea8284df6576da70b3719"
[[package]]
name = "frida-barebone-agent"
version = "1.0.0"
dependencies = [
"bindgen",
"cc",
]
[[package]]
name = "glob"
version = "0.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a8d1add55171497b4705a648c6b583acafb01d58050a51727785f0b2c8e0a2b2"
[[package]]
name = "itertools"
version = "0.13.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "413ee7dfc52ee1a4949ceeb7dbc8a33f2d6c088194d9f922fb8318faf1f01186"
dependencies = [
"either",
]
[[package]]
name = "libc"
version = "0.2.174"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1171693293099992e19cddea4e8b849964e9846f4acee11b3948bcc337be8776"
[[package]]
name = "libloading"
version = "0.8.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "07033963ba89ebaf1584d767badaa2e8fcec21aedea6b8c0346d487d49c28667"
dependencies = [
"cfg-if",
"windows-targets",
]
[[package]]
name = "log"
version = "0.4.27"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "13dc2df351e3202783a1fe0d44375f7295ffb4049267b0f3018346dc122a1d94"
[[package]]
name = "memchr"
version = "2.7.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "32a282da65faaf38286cf3be983213fcf1d2e2a58700e808f83f4ea9a4804bc0"
[[package]]
name = "minimal-lexical"
version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a"
[[package]]
name = "nom"
version = "7.1.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a"
dependencies = [
"memchr",
"minimal-lexical",
]
[[package]]
name = "prettyplease"
version = "0.2.35"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "061c1221631e079b26479d25bbf2275bfe5917ae8419cd7e34f13bfc2aa7539a"
dependencies = [
"proc-macro2",
"syn",
]
[[package]]
name = "proc-macro2"
version = "1.0.95"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "02b3e5e68a3a1a02aad3ec490a98007cbc13c37cbe84a3cd7b8e406d76e7f778"
dependencies = [
"unicode-ident",
]
[[package]]
name = "quote"
version = "1.0.40"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1885c039570dc00dcb4ff087a89e185fd56bae234ddc7f056a945bf36467248d"
dependencies = [
"proc-macro2",
]
[[package]]
name = "regex"
version = "1.11.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191"
dependencies = [
"aho-corasick",
"memchr",
"regex-automata",
"regex-syntax",
]
[[package]]
name = "regex-automata"
version = "0.4.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "809e8dc61f6de73b46c85f4c96486310fe304c434cfa43669d7b40f711150908"
dependencies = [
"aho-corasick",
"memchr",
"regex-syntax",
]
[[package]]
name = "regex-syntax"
version = "0.8.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c"
[[package]]
name = "rustc-hash"
version = "2.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "357703d41365b4b27c590e3ed91eabb1b663f07c4c084095e60cbed4362dff0d"
[[package]]
name = "shlex"
version = "1.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64"
[[package]]
name = "syn"
version = "2.0.104"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "17b6f705963418cdb9927482fa304bc562ece2fdd4f616084c50b7023b435a40"
dependencies = [
"proc-macro2",
"quote",
"unicode-ident",
]
[[package]]
name = "unicode-ident"
version = "1.0.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5a5f39404a5da50712a4c1eecf25e90dd62b613502b7e925fd4e4d19b5c96512"
[[package]]
name = "windows-targets"
version = "0.53.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c66f69fcc9ce11da9966ddb31a40968cad001c5bedeb5c2b82ede4253ab48aef"
dependencies = [
"windows_aarch64_gnullvm",
"windows_aarch64_msvc",
"windows_i686_gnu",
"windows_i686_gnullvm",
"windows_i686_msvc",
"windows_x86_64_gnu",
"windows_x86_64_gnullvm",
"windows_x86_64_msvc",
]
[[package]]
name = "windows_aarch64_gnullvm"
version = "0.53.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "86b8d5f90ddd19cb4a147a5fa63ca848db3df085e25fee3cc10b39b6eebae764"
[[package]]
name = "windows_aarch64_msvc"
version = "0.53.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c7651a1f62a11b8cbd5e0d42526e55f2c99886c77e007179efff86c2b137e66c"
[[package]]
name = "windows_i686_gnu"
version = "0.53.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c1dc67659d35f387f5f6c479dc4e28f1d4bb90ddd1a5d3da2e5d97b42d6272c3"
[[package]]
name = "windows_i686_gnullvm"
version = "0.53.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9ce6ccbdedbf6d6354471319e781c0dfef054c81fbc7cf83f338a4296c0cae11"
[[package]]
name = "windows_i686_msvc"
version = "0.53.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "581fee95406bb13382d2f65cd4a908ca7b1e4c2f1917f143ba16efe98a589b5d"
[[package]]
name = "windows_x86_64_gnu"
version = "0.53.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2e55b5ac9ea33f2fc1716d1742db15574fd6fc8dadc51caab1c16a3d3b4190ba"
[[package]]
name = "windows_x86_64_gnullvm"
version = "0.53.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0a6e035dd0599267ce1ee132e51c27dd29437f63325753051e71dd9e42406c57"
[[package]]
name = "windows_x86_64_msvc"
version = "0.53.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "271414315aff87387382ec3d271b52d7ae78726f5d44ac98b4f4030c91880486"
+19
View File
@@ -0,0 +1,19 @@
[package]
name = "frida-barebone-agent"
version = "1.0.0"
edition = "2024"
build = "build.rs"
[profile.release]
panic = "abort"
opt-level = "z"
overflow-checks = false
lto = true
codegen-units = 1
[profile.dev]
panic = "abort"
[build-dependencies]
cc = "1.2"
bindgen = "0.72.0"
+43
View File
@@ -0,0 +1,43 @@
## Getting the C toolchain
npm install -g xpm
xpm install
export PATH=$PWD/xpacks/.bin:$PATH
## How to build Gum
./configure \
--host=aarch64-none-elf \
--enable-gumjs \
--with-devkits=gum,gumjs \
--with-devkit-symbol-scope=original
make
export GUMJS_DEVKIT_DIR=$PWD/build/bindings/gumjs/devkit
## Building
export PATH=$PWD/xpacks/.bin:$PATH
export CC_aarch64_unknown_none=aarch64-none-elf-gcc
export AR_aarch64_unknown_none=aarch64-none-elf-ar
export RANLIB_aarch64_unknown_none=aarch64-none-elf-ranlib
## Development loop
export FRIDA_BAREBONE_CONFIG=$PWD/etc/xnu.json
cargo build --release && make -C ~/src/frida-python && killall -9 qemu-system-aarch64 && sleep 2 && frida -D barebone -p 0
## Speeding up loop
./configure \
-- \
-Dfrida-core:compat=disabled \
-Dfrida-core:local_backend=disabled \
-Dfrida-core:fruity_backend=disabled \
-Dfrida-core:droidy_backend=disabled \
-Dfrida-core:socket_backend=disabled \
-Dfrida-core:compiler_backend=disabled \
-Dfrida-core:gadget=disabled \
-Dfrida-core:server=disabled \
-Dfrida-core:portal=disabled \
-Dfrida-core:inject=disabled \
-Dfrida-core:tests=enabled
+51
View File
@@ -0,0 +1,51 @@
SECTIONS {
.text : {
*(.text.entrypoint)
*(.text*)
}
.rodata : {
*(.rodata*)
}
.kernel_addrs : ALIGN(8) {
. = ALIGN(8);
_panic = .; . += 8;
_IOLog = .; . += 8;
_kalloc = .; . += 8;
_kfree = .; . += 8;
_kernel_thread_start = .; . += 8;
_assert_wait = .; . += 8;
_assert_wait_timeout = .; . += 8;
_thread_block = .; . += 8;
_thread_wakeup = .; . += 8;
_mach_absolute_time = .; . += 8;
_absolutetime_to_nanoseconds = .; . += 8;
_clock_get_calendar_microtime = .; . += 8;
_ml_io_map = .; . += 8;
_ml_vtophys = .; . += 8;
__ZN9IOService11getPlatformEv = .; . += 8;
__ZN9IOServiceC2Ev = .; . += 8;
__ZN8OSSymbol17withCStringNoCopyEPKc = .; . += 8;
__ZN6OSData9withBytesEPKvj = .; . += 8;
}
.data.rel.ro : {
*(.data.rel.ro*)
}
.got : {
*(.got*)
}
.bss : {
*(.bss*)
}
. = ALIGN(8);
_heap_start = .;
}
VERSION {
{
global:
_start;
local:
*;
};
}
+126
View File
@@ -0,0 +1,126 @@
use std::{
env, fs,
path::{Path, PathBuf},
process::{Command, Stdio},
};
fn main() {
let out_dir = PathBuf::from(env::var("OUT_DIR").unwrap());
let devkit_dir = PathBuf::from(env::var("GUMJS_DEVKIT_DIR").unwrap());
let cc_str = env::var("CC_aarch64_unknown_none")
.or_else(|_| env::var("CC"))
.unwrap_or_else(|_| "cc".to_string());
let cc = Path::new(&cc_str);
let cc_include_paths = detect_gcc_include_paths(cc);
let cc_library_paths = detect_gcc_library_paths(cc);
let cc_clang_args: Vec<String> = cc_include_paths
.iter()
.flat_map(|path| vec!["-isystem".to_string(), path.to_string_lossy().into_owned()])
.collect();
let bindings = bindgen::Builder::default()
.use_core()
.header(devkit_dir.join("frida-gumjs.h").to_str().unwrap())
.clang_arg("-nostdinc")
.clang_arg("-target")
.clang_arg("aarch64-none-elf")
.clang_args(cc_clang_args)
.clang_arg(format!("-I{}", devkit_dir.to_str().unwrap()))
.merge_extern_blocks(true)
.generate()
.expect("Unable to generate bindings");
bindings
.write_to_file(out_dir.join("bindings.rs"))
.expect("Couldn't write bindings");
println!(
"cargo:rustc-link-search=native={}",
devkit_dir.to_str().unwrap()
);
println!("cargo:rustc-link-lib=static=frida-gumjs");
for path in cc_library_paths {
println!("cargo:rustc-link-search=native={}", path.to_string_lossy());
}
println!("cargo:rustc-link-lib=static=c");
println!("cargo:rustc-link-lib=static=m");
println!("cargo:rustc-link-arg=--export-dynamic");
println!("cargo:rustc-link-arg=--emit-relocs");
println!("cargo:rustc-link-arg=--script=agent.lds");
println!("cargo:rustc-link-arg=--gc-sections");
println!("cargo:rerun-if-changed=build.rs");
}
pub fn detect_gcc_include_paths(gcc: &Path) -> Vec<PathBuf> {
let out = Command::new(gcc)
.args(["-xc", "-E", "-v", "-"])
.stdin(Stdio::null())
.output()
.expect("Failed to execute GCC to detect include paths");
let stderr = String::from_utf8_lossy(&out.stderr);
let mut grab = false;
let mut paths = Vec::<PathBuf>::new();
for line in stderr.lines() {
if line.starts_with("#include <...> search starts here:") {
grab = true;
continue;
}
if line.starts_with("End of search list.") {
break;
}
if !grab {
continue;
}
let raw = line.trim();
if raw.is_empty() {
continue;
}
let p = Path::new(raw);
if p.exists() {
let canonical = fs::canonicalize(p).expect("Failed to canonicalize include path");
if !paths.contains(&canonical) {
paths.push(canonical);
}
}
}
paths
}
pub fn detect_gcc_library_paths(gcc: &Path) -> Vec<PathBuf> {
let out = Command::new(gcc).arg("-print-search-dirs").output()
.expect("Failed to execute GCC to detect library paths");
let stdout = String::from_utf8_lossy(&out.stdout);
let line = stdout.lines().find(|l| l.starts_with("libraries:"))
.expect("Failed to find libraries line in GCC output");
let raw_dirs = line.trim_start_matches("libraries: =");
let sep = if cfg!(windows) { ';' } else { ':' };
let mut paths = Vec::new();
for raw in raw_dirs.split(sep) {
if raw.is_empty() {
continue;
}
let p = Path::new(raw);
if !p.exists() {
continue;
}
let canonical = fs::canonicalize(p).expect("Failed to canonicalize library path");
if !paths.contains(&canonical) {
paths.push(canonical);
}
}
paths
}
+8
View File
@@ -0,0 +1,8 @@
export FRIDA_BAREBONE_CONFIG=$PWD/etc/xnu.json
export PYTHONPATH=$HOME/src/frida-python
export PATH=$PWD/xpacks/.bin:$PATH
export CC_aarch64_unknown_none=aarch64-none-elf-gcc
export AR_aarch64_unknown_none=aarch64-none-elf-ar
export RANLIB_aarch64_unknown_none=aarch64-none-elf-ranlib
export GUMJS_DEVKIT_DIR=/home/oleavr/src/frida-gum/build/bindings/gumjs/devkit
+6
View File
@@ -0,0 +1,6 @@
{
"connection": {
"host": "127.0.0.1",
"port": 9000
}
}
+18
View File
@@ -0,0 +1,18 @@
{
"connection": {
"host": "127.0.0.1",
"port": 9000
},
"allocator": {
"mode": "physical",
"physical_base": "0x8ec9b4000"
},
"agent": {
"path": "/Users/oleavr/src/frida-core/src/barebone/agent/target/aarch64-unknown-none/debug/frida-barebone-agent",
"transport": {
"type": "ram",
"path": "/Volumes/RAM Disk/ios-dram",
"base_address": "0x800000000"
}
}
}
+42
View File
@@ -0,0 +1,42 @@
{
"connection": {
"host": "127.0.0.1",
"port": 9000
},
"allocator": {
"mode": "target-functions",
"alloc_function": "0xfffffff007a3c278",
"free_function": "0xfffffff007a3c338"
},
"agent": {
"path": "/Users/oleavr/src/frida-core/src/barebone/agent/target/aarch64-unknown-none/release/frida-barebone-agent",
"transport": {
"type": "hostlink",
"qmp": "unix:/Users/oleavr/src/frida-barebone-ios/qmp.sock"
}
},
"image": {
"file": "/Users/oleavr/src/frida-barebone-ios/iPhone11_8_iPhone12_1_14.0_18A5351d_Restore/kernelcache.research.iphone12b",
"base": "0xfffffff007004000",
"symbols": {
"IOLog": "0xfedb68",
"_ZN6OSData9withBytesEPKvj": "0xf88588",
"_ZN8OSSymbol17withCStringNoCopyEPKc": "0xfc05dc",
"_ZN9IOService11getPlatformEv": "0x101ad48",
"_ZN9IOServiceC2Ev": "0x1018318",
"absolutetime_to_nanoseconds": "0xb5d1e4",
"assert_wait": "0xa4d294",
"assert_wait_timeout": "0xa4d430",
"clock_get_calendar_microtime": "0xa1f32c",
"kalloc": "0xa38278",
"kernel_thread_start": "0xa70674",
"kfree": "0xa38338",
"mach_absolute_time": "0xb5ccc0",
"ml_io_map": "0xb57a04",
"ml_vtophys": "0xb584a0",
"panic": "0x27d7944",
"thread_block": "0xa51728",
"thread_wakeup": "0xa54ea0"
}
}
}
@@ -0,0 +1,34 @@
const _copyinstr = new NativeFunction(
DebugSymbol.getFunctionByName('copyinstr'),
'int',
['pointer', 'pointer', 'size_t', 'pointer']);
const { pointerSize } = Process;
Interceptor.attach(DebugSymbol.getFunctionByName('__mac_execve'), {
onEnter(args) {
const fname = copyinstr(args[1].readPointer());
console.log(`>>> __mac_execve() fname=${fname}`);
},
onLeave(retval) {
console.log(`<<< __mac_execve() => ${retval.toInt32()}`);
}
});
Interceptor.attach(DebugSymbol.getFunctionByName('posix_spawn'), {
onEnter(args) {
const path = copyinstr(args[1].add(pointerSize).readPointer());
console.log(`>>> posix_spawn() path=${path}`);
},
onLeave(retval) {
console.log(`<<< posix_spawn() => ${retval.toInt32()}`);
}
});
function copyinstr(userAddr) {
const bufSize = 4096;
const buf = Memory.alloc(bufSize);
const actual = Memory.alloc(pointerSize);
if (_copyinstr(userAddr, buf, bufSize, actual) !== 0)
throw new Error('copyinstr failed');
return buf.readUtf8String();
}
+10
View File
@@ -0,0 +1,10 @@
console.log("Agent loading");
const cm = new CModule(File.readAllBytes("./target/aarch64-unknown-none/release/frida-barebone-agent"));
//const cm = new CModule(File.readAllBytes("./target/aarch64-unknown-none/debug/frida-barebone-agent"));
const start = new NativeFunction(cm._start, "pointer", []);
const bufferPhysicalAddress = start();
console.log("Ready! Buffer is at physical address:", bufferPhysicalAddress);
$gdb.continue();
Object.assign(globalThis, { cm, start });
+19
View File
@@ -0,0 +1,19 @@
{
"name": "frida-barebone-agent",
"version": "1.0.0",
"description": "xPack configuration for frida-barebone-agent",
"xpack": {
"minimumXpmRequired": "0.20.8",
"dependencies": {},
"devDependencies": {
"@xpack-dev-tools/aarch64-none-elf-gcc": {
"specifier": "14.2.1-1.1.1",
"local": "link",
"platforms": "all"
}
},
"properties": {},
"actions": {},
"buildConfigurations": {}
}
}
+46
View File
@@ -0,0 +1,46 @@
use core::ptr;
use crate::bindings::{g_wait_is_set, gint64, gpointer};
use crate::xnu;
const G_WAIT_INFINITE: gint64 = -1;
pub static mut WAKEUP_TOKEN: u64 = 0;
#[unsafe(no_mangle)]
pub extern "C" fn g_get_monotonic_time() -> gint64 {
let abstime = xnu::mach_absolute_time();
let time = xnu::absolutetime_to_nanoseconds(abstime);
(time / 1000) as gint64
}
#[unsafe(no_mangle)]
pub extern "C" fn g_wait_sleep(token: gpointer, timeout_us: gint64) {
let wait_event = ptr::addr_of_mut!(WAKEUP_TOKEN) as *const u8;
let wait_result = if timeout_us == G_WAIT_INFINITE {
xnu::assert_wait(wait_event, xnu::THREAD_INTERRUPTIBLE)
} else {
xnu::assert_wait_timeout(
wait_event,
xnu::THREAD_INTERRUPTIBLE,
(timeout_us * 1000) as u32,
1, // TODO
)
};
if wait_result != xnu::THREAD_WAITING {
panic!("assert_wait_timeout failed: {}", wait_result);
}
if unsafe { g_wait_is_set(token) != 0 } {
xnu::thread_wakeup(wait_event);
return;
}
xnu::thread_block(None);
}
#[unsafe(no_mangle)]
pub extern "C" fn g_wait_wake(_token: gpointer) {
xnu::thread_wakeup(ptr::addr_of_mut!(WAKEUP_TOKEN) as *const u8);
}
+609
View File
@@ -0,0 +1,609 @@
use crate::bindings::GCond;
use crate::bindings::GMutex;
use crate::bindings::GPrivate;
use crate::bindings::GRWLock;
use crate::bindings::GRecMutex;
use crate::bindings::GSystemThread;
use crate::bindings::GThreadFunc;
use crate::bindings::{gpointer, gulong};
use alloc::boxed::Box;
use alloc::collections::BTreeMap;
use core::arch::asm;
use core::ffi::c_void;
use core::sync::atomic::{AtomicU32, AtomicU64, Ordering};
// Our implementation structures that overlay the opaque GLib structures
#[repr(C, align(8))]
struct MutexImpl {
lock: AtomicU32,
_padding: [u8; core::mem::size_of::<GMutex>() - core::mem::size_of::<AtomicU32>()],
}
#[repr(C, align(8))]
struct RecMutexImpl {
owner: AtomicU64, // Thread ID of the owner (uses the 'p' field)
count: AtomicU32, // Recursion count (uses i[0])
_unused: u32, // Unused (uses i[1])
}
#[repr(C, align(8))]
struct RWLockImpl {
state: AtomicU32, // Lock state (readers count + writer bit)
_padding: [u8; core::mem::size_of::<GRWLock>() - core::mem::size_of::<AtomicU32>()],
}
#[repr(C, align(8))]
struct CondImpl {
signal: AtomicU32, // Signal state
_padding: [u8; core::mem::size_of::<GCond>() - core::mem::size_of::<AtomicU32>()],
}
const _: () = assert!(core::mem::size_of::<MutexImpl>() == core::mem::size_of::<GMutex>());
const _: () = assert!(core::mem::align_of::<MutexImpl>() == core::mem::align_of::<GMutex>());
const _: () = assert!(core::mem::size_of::<RecMutexImpl>() == core::mem::size_of::<GRecMutex>());
const _: () = assert!(core::mem::align_of::<RecMutexImpl>() == core::mem::align_of::<GRecMutex>());
const _: () = assert!(core::mem::size_of::<RWLockImpl>() == core::mem::size_of::<GRWLock>());
const _: () = assert!(core::mem::align_of::<RWLockImpl>() == core::mem::align_of::<GRWLock>());
const _: () = assert!(core::mem::size_of::<CondImpl>() == core::mem::size_of::<GCond>());
const _: () = assert!(core::mem::align_of::<CondImpl>() == core::mem::align_of::<GCond>());
// System thread implementation
#[repr(C)]
struct SystemThreadImpl {
mutex: GMutex, // Protects the thread state
cond: GCond, // Signals thread completion
thread_id: AtomicU64, // XNU thread ID
func: GThreadFunc, // Thread function
data: gpointer, // User data
finished: AtomicU32, // Whether thread has finished (0 = running, 1 = finished)
detached: AtomicU32, // Whether thread is detached (1) or joinable (0)
}
// Thread wrapper data passed to XNU kernel thread
#[repr(C)]
struct ThreadWrapperData {
func: GThreadFunc,
data: gpointer,
system_thread: *mut SystemThreadImpl,
}
unsafe fn mutex_impl<'a>(mutex: *mut GMutex) -> &'a mut MutexImpl {
unsafe { &mut *(mutex as *mut MutexImpl) }
}
unsafe fn rec_mutex_impl<'a>(rec_mutex: *mut GRecMutex) -> &'a mut RecMutexImpl {
unsafe { &mut *(rec_mutex as *mut RecMutexImpl) }
}
unsafe fn rw_lock_impl<'a>(rw_lock: *mut GRWLock) -> &'a mut RWLockImpl {
unsafe { &mut *(rw_lock as *mut RWLockImpl) }
}
unsafe fn cond_impl<'a>(cond: *mut GCond) -> &'a mut CondImpl {
unsafe { &mut *(cond as *mut CondImpl) }
}
// TODO: Clean up Thread-Local Storage (TLS) entries when threads exit
static mut TLS_STORAGE: Option<Box<BTreeMap<(u64, *mut GPrivate), *mut c_void>>> = None;
static TLS_LOCK: AtomicU32 = AtomicU32::new(0);
#[unsafe(no_mangle)]
pub extern "C" fn g_mutex_init(mutex: *mut GMutex) {
unsafe {
let impl_ = mutex_impl(mutex);
impl_.lock.store(0, Ordering::Relaxed);
}
}
#[unsafe(no_mangle)]
pub extern "C" fn g_mutex_clear(_mutex: *mut GMutex) {}
#[unsafe(no_mangle)]
pub extern "C" fn g_mutex_lock(mutex: *mut GMutex) {
unsafe {
let impl_ = mutex_impl(mutex);
lock_acquire(&impl_.lock);
}
}
#[unsafe(no_mangle)]
pub extern "C" fn g_mutex_unlock(mutex: *mut GMutex) {
unsafe {
let impl_ = mutex_impl(mutex);
lock_release(&impl_.lock);
}
}
#[unsafe(no_mangle)]
pub extern "C" fn g_mutex_trylock(mutex: *mut GMutex) -> u32 {
unsafe {
let impl_ = mutex_impl(mutex);
if lock_try_acquire(&impl_.lock) {
1
} else {
0
}
}
}
#[unsafe(no_mangle)]
pub extern "C" fn g_rec_mutex_init(rec_mutex: *mut GRecMutex) {
unsafe {
let impl_ = rec_mutex_impl(rec_mutex);
impl_.owner.store(0, Ordering::Relaxed);
impl_.count.store(0, Ordering::Relaxed);
}
}
#[unsafe(no_mangle)]
pub extern "C" fn g_rec_mutex_clear(_rec_mutex: *mut GRecMutex) {
}
#[unsafe(no_mangle)]
pub extern "C" fn g_rec_mutex_lock(rec_mutex: *mut GRecMutex) {
unsafe {
let impl_ = rec_mutex_impl(rec_mutex);
let current_thread = get_current_thread_id();
loop {
if rec_mutex_try_acquire(impl_, current_thread) {
break;
}
rec_mutex_wait(impl_);
}
}
}
#[unsafe(no_mangle)]
pub extern "C" fn g_rec_mutex_trylock(rec_mutex: *mut GRecMutex) -> u32 {
unsafe {
let impl_ = rec_mutex_impl(rec_mutex);
let current_thread = get_current_thread_id();
if rec_mutex_try_acquire(impl_, current_thread) {
1
} else {
0
}
}
}
#[unsafe(no_mangle)]
pub extern "C" fn g_rec_mutex_unlock(rec_mutex: *mut GRecMutex) {
unsafe {
let impl_ = rec_mutex_impl(rec_mutex);
loop {
let current_count = impl_.count.load(Ordering::Relaxed);
if current_count == 1 {
if impl_.count
.compare_exchange_weak(1, 0, Ordering::Release, Ordering::Relaxed)
.is_ok()
{
impl_.owner.store(0, Ordering::Relaxed);
lock_notify_all();
break;
}
} else {
if impl_.count
.compare_exchange_weak(current_count, current_count - 1, Ordering::Release, Ordering::Relaxed)
.is_ok()
{
break;
}
}
}
}
}
unsafe fn rec_mutex_try_acquire(impl_: &mut RecMutexImpl, current_thread: u64) -> bool {
let current_count = impl_.count.load(Ordering::Relaxed);
if current_count == 0 {
if impl_.count
.compare_exchange_weak(0, 1, Ordering::Acquire, Ordering::Relaxed)
.is_ok()
{
impl_.owner.store(current_thread, Ordering::Relaxed);
return true;
}
} else {
let current_owner = impl_.owner.load(Ordering::Relaxed);
if current_owner == current_thread {
if impl_.count
.compare_exchange_weak(
current_count,
current_count + 1,
Ordering::Acquire,
Ordering::Relaxed,
)
.is_ok()
{
return true;
}
}
}
false
}
unsafe fn rec_mutex_wait(impl_: &mut RecMutexImpl) {
while impl_.count.load(Ordering::Relaxed) != 0 {
unsafe { lock_wait_primitive() };
}
}
// Read-Write Lock implementation
// We use a simple scheme where the atomic value represents:
// - 0: unlocked
// - 1-0x7FFFFFFF: number of readers holding the lock
// - 0x80000000: writer lock held
const RW_WRITER_LOCK_BIT: u32 = 0x80000000;
#[unsafe(no_mangle)]
pub extern "C" fn g_rw_lock_init(rw_lock: *mut GRWLock) {
unsafe {
let impl_ = rw_lock_impl(rw_lock);
impl_.state.store(0, Ordering::Relaxed);
}
}
#[unsafe(no_mangle)]
pub extern "C" fn g_rw_lock_clear(_rw_lock: *mut GRWLock) {}
#[unsafe(no_mangle)]
pub extern "C" fn g_rw_lock_writer_lock(rw_lock: *mut GRWLock) {
unsafe {
let impl_ = rw_lock_impl(rw_lock);
loop {
if rw_lock_writer_try_acquire(impl_) {
break;
}
rw_lock_wait_for_all(impl_);
}
}
}
#[unsafe(no_mangle)]
pub extern "C" fn g_rw_lock_writer_trylock(rw_lock: *mut GRWLock) -> u32 {
unsafe {
let impl_ = rw_lock_impl(rw_lock);
if rw_lock_writer_try_acquire(impl_) {
1
} else {
0
}
}
}
#[unsafe(no_mangle)]
pub extern "C" fn g_rw_lock_writer_unlock(rw_lock: *mut GRWLock) {
unsafe {
let impl_ = rw_lock_impl(rw_lock);
impl_.state.store(0, Ordering::Release);
lock_notify_all();
}
}
#[unsafe(no_mangle)]
pub extern "C" fn g_rw_lock_reader_lock(rw_lock: *mut GRWLock) {
unsafe {
let impl_ = rw_lock_impl(rw_lock);
loop {
let current = impl_.state.load(Ordering::Relaxed);
if current & RW_WRITER_LOCK_BIT != 0 {
rw_lock_wait_for_writers(impl_);
continue;
}
if impl_.state
.compare_exchange_weak(current, current + 1, Ordering::Acquire, Ordering::Relaxed)
.is_ok()
{
break;
}
}
}
}
#[unsafe(no_mangle)]
pub extern "C" fn g_rw_lock_reader_trylock(rw_lock: *mut GRWLock) -> u32 {
unsafe {
let impl_ = rw_lock_impl(rw_lock);
if rw_lock_reader_try_acquire(impl_) {
1
} else {
0
}
}
}
#[unsafe(no_mangle)]
pub extern "C" fn g_rw_lock_reader_unlock(rw_lock: *mut GRWLock) {
unsafe {
let impl_ = rw_lock_impl(rw_lock);
loop {
let current = impl_.state.load(Ordering::Relaxed);
if impl_.state
.compare_exchange_weak(current, current - 1, Ordering::Release, Ordering::Relaxed)
.is_ok()
{
if current - 1 == 0 {
lock_notify_all();
}
break;
}
}
}
}
unsafe fn rw_lock_writer_try_acquire(impl_: &mut RWLockImpl) -> bool {
impl_.state
.compare_exchange_weak(0, RW_WRITER_LOCK_BIT, Ordering::Acquire, Ordering::Relaxed)
.is_ok()
}
unsafe fn rw_lock_reader_try_acquire(impl_: &mut RWLockImpl) -> bool {
let current = impl_.state.load(Ordering::Relaxed);
if current & RW_WRITER_LOCK_BIT != 0 {
return false;
}
impl_.state
.compare_exchange_weak(current, current + 1, Ordering::Acquire, Ordering::Relaxed)
.is_ok()
}
unsafe fn rw_lock_wait_for_writers(impl_: &mut RWLockImpl) {
while impl_.state.load(Ordering::Relaxed) & RW_WRITER_LOCK_BIT != 0 {
unsafe { lock_wait_primitive() };
}
}
unsafe fn rw_lock_wait_for_all(impl_: &mut RWLockImpl) {
while impl_.state.load(Ordering::Relaxed) != 0 {
unsafe { lock_wait_primitive() };
}
}
#[unsafe(no_mangle)]
pub extern "C" fn g_cond_init(cond: *mut GCond) {
unsafe {
let impl_ = cond_impl(cond);
impl_.signal.store(0, Ordering::Relaxed);
}
}
#[unsafe(no_mangle)]
pub extern "C" fn g_cond_clear(_cond: *mut GCond) {}
#[unsafe(no_mangle)]
pub extern "C" fn g_cond_wait(cond: *mut GCond, mutex: *mut GMutex) {
unsafe {
g_mutex_unlock(mutex);
let impl_ = cond_impl(cond);
while impl_.signal.load(Ordering::Acquire) == 0 {
lock_wait_primitive();
}
g_mutex_lock(mutex);
}
}
#[unsafe(no_mangle)]
pub extern "C" fn g_cond_signal(cond: *mut GCond) {
unsafe {
let impl_ = cond_impl(cond);
impl_.signal.store(1, Ordering::Release);
lock_notify_all();
}
}
#[unsafe(no_mangle)]
pub extern "C" fn g_cond_broadcast(cond: *mut GCond) {
unsafe {
let impl_ = cond_impl(cond);
impl_.signal.store(1, Ordering::Release);
lock_notify_all();
}
}
#[unsafe(no_mangle)]
pub extern "C" fn g_cond_wait_until(cond: *mut GCond, mutex: *mut GMutex, _end_time: i64) -> u32 {
// TODO: Implement proper timeout handling
g_cond_wait(cond, mutex);
1
}
#[unsafe(no_mangle)]
pub extern "C" fn g_private_get(key: *mut GPrivate) -> *mut c_void {
unsafe {
let thread_id = get_current_thread_id();
lock_acquire(&TLS_LOCK);
ensure_tls_storage();
let storage_ptr = core::ptr::addr_of_mut!(TLS_STORAGE);
let storage = (*storage_ptr).as_ref().unwrap();
let value = storage
.get(&(thread_id, key))
.copied()
.unwrap_or(core::ptr::null_mut());
lock_release(&TLS_LOCK);
value
}
}
#[unsafe(no_mangle)]
pub extern "C" fn g_private_set(key: *mut GPrivate, value: *mut c_void) {
unsafe {
let thread_id = get_current_thread_id();
lock_acquire(&TLS_LOCK);
ensure_tls_storage();
let storage_ptr = core::ptr::addr_of_mut!(TLS_STORAGE);
let storage = (*storage_ptr).as_mut().unwrap();
storage.insert((thread_id, key), value);
lock_release(&TLS_LOCK);
}
}
unsafe fn ensure_tls_storage() {
let storage_ptr = core::ptr::addr_of_mut!(TLS_STORAGE);
unsafe {
if (*storage_ptr).is_none() {
*storage_ptr = Some(Box::new(BTreeMap::new()));
}
}
}
#[unsafe(no_mangle)]
pub extern "C" fn _g_system_thread_create(
_stack_size: gulong,
_name: *const core::ffi::c_char,
func: GThreadFunc,
data: gpointer,
) -> *mut GSystemThread {
unsafe {
let system_thread = crate::xnu::kalloc(core::mem::size_of::<SystemThreadImpl>()) as *mut SystemThreadImpl;
g_mutex_init(&mut (*system_thread).mutex);
g_cond_init(&mut (*system_thread).cond);
(*system_thread).thread_id.store(0, Ordering::Relaxed);
(*system_thread).func = func;
(*system_thread).data = data;
(*system_thread).finished.store(0, Ordering::Relaxed);
(*system_thread).detached.store(0, Ordering::Relaxed);
let wrapper_data = crate::xnu::kalloc(core::mem::size_of::<ThreadWrapperData>()) as *mut ThreadWrapperData;
(*wrapper_data).func = func;
(*wrapper_data).data = data;
(*wrapper_data).system_thread = system_thread;
let _xnu_result = crate::xnu::kernel_thread_start(thread_wrapper, wrapper_data as *mut c_void);
system_thread as *mut GSystemThread
}
}
extern "C" fn thread_wrapper(parameter: *mut c_void, _wait_result: i32) {
unsafe {
let wrapper_data = parameter as *mut ThreadWrapperData;
let func = (*wrapper_data).func;
let data = (*wrapper_data).data;
let system_thread = (*wrapper_data).system_thread;
let current_thread_id = get_current_thread_id();
(*system_thread).thread_id.store(current_thread_id, Ordering::Relaxed);
func.unwrap()(data);
g_mutex_lock(&mut (*system_thread).mutex);
(*system_thread).finished.store(1, Ordering::Relaxed);
g_cond_signal(&mut (*system_thread).cond);
let detached = (*system_thread).detached.load(Ordering::Relaxed);
g_mutex_unlock(&mut (*system_thread).mutex);
if detached != 0 {
cleanup_system_thread(system_thread);
}
cleanup_wrapper_data(wrapper_data);
}
}
#[unsafe(no_mangle)]
pub extern "C" fn _g_system_thread_detach(thread: *mut GSystemThread) {
unsafe {
let system_thread = thread as *mut SystemThreadImpl;
g_mutex_lock(&mut (*system_thread).mutex);
(*system_thread).detached.store(1, Ordering::Relaxed);
let finished = (*system_thread).finished.load(Ordering::Relaxed);
g_mutex_unlock(&mut (*system_thread).mutex);
if finished != 0 {
cleanup_system_thread(system_thread);
}
}
}
#[unsafe(no_mangle)]
pub extern "C" fn _g_system_thread_wait(thread: *mut GSystemThread) {
unsafe {
let system_thread = thread as *mut SystemThreadImpl;
loop {
let thread_id = (*system_thread).thread_id.load(Ordering::Acquire);
if thread_id != 0 {
break;
}
core::hint::spin_loop();
}
g_mutex_lock(&mut (*system_thread).mutex);
while (*system_thread).finished.load(Ordering::Relaxed) == 0 {
g_cond_wait(&mut (*system_thread).cond, &mut (*system_thread).mutex);
}
g_mutex_unlock(&mut (*system_thread).mutex);
cleanup_system_thread(system_thread);
}
}
unsafe fn cleanup_system_thread(system_thread: *mut SystemThreadImpl) {
crate::xnu::free(system_thread as *mut u8, core::mem::size_of::<SystemThreadImpl>());
}
unsafe fn cleanup_wrapper_data(wrapper_data: *mut ThreadWrapperData) {
crate::xnu::free(wrapper_data as *mut u8, core::mem::size_of::<ThreadWrapperData>());
}
unsafe fn lock_acquire(lock: &AtomicU32) {
loop {
if unsafe { lock_try_acquire(lock) } {
break;
}
unsafe { lock_wait(lock) };
}
}
unsafe fn lock_try_acquire(lock: &AtomicU32) -> bool {
lock.compare_exchange_weak(0, 1, Ordering::Acquire, Ordering::Relaxed)
.is_ok()
}
unsafe fn lock_release(lock: &AtomicU32) {
lock.store(0, Ordering::Release);
unsafe { lock_notify_all() };
}
unsafe fn lock_wait(lock: &AtomicU32) {
while lock.load(Ordering::Relaxed) != 0 {
unsafe { lock_wait_primitive() };
}
}
unsafe fn lock_wait_primitive() {
unsafe {
asm!("wfe", options(nomem, nostack));
}
}
unsafe fn lock_notify_all() {
unsafe {
asm!("sev", options(nomem, nostack));
}
}
pub unsafe fn get_current_thread_id() -> u64 {
let thread_ptr: u64;
unsafe {
asm!("mrs {}, tpidr_el1", out(reg) thread_ptr, options(nomem, nostack));
}
thread_ptr
}
+457
View File
@@ -0,0 +1,457 @@
use crate::{
bindings::{
_GInterfaceInfo, _GTypeInfo, _GumPageProtection_GUM_PAGE_EXECUTE,
_GumRwxSupport_GUM_RWX_NONE, GArray, GObject, GObjectClass, GPrivate, GType,
GumDebugSymbolDetails, GumExportDetails, GumExportType_GUM_EXPORT_FUNCTION,
GumFoundExportFunc, GumMemoryRange, GumModule, GumModuleInterface, GumModuleRegistry,
GumPageProtection, GumRwxSupport, GumThreadId, GumTlsKey, g_array_append_vals, g_array_new,
g_free, g_object_get_type, g_object_new, g_object_unref, g_once_init_enter,
g_once_init_leave, g_strdup, g_type_add_interface_static, g_type_class_peek_parent,
g_type_register_static, gboolean, gchar, gconstpointer, gpointer, gsize, guint,
gum_barebone_register_module,
gum_barebone_try_remap_writable_pages as _gum_barebone_try_remap_writable_pages,
gum_module_get_type, gum_mprotect, gum_query_page_size,
},
gthread, libc, xnu,
};
use alloc::boxed::Box;
use alloc::ffi::CString;
use alloc::format;
use core::ptr;
use core::{ffi::CStr, ptr::read_volatile};
#[unsafe(no_mangle)]
pub extern "C" fn gum_process_get_current_thread_id() -> GumThreadId {
unsafe { gthread::get_current_thread_id() }
}
#[unsafe(no_mangle)]
pub extern "C" fn gum_barebone_query_page_size() -> guint {
unsafe {
let tcr_el1: u64;
core::arch::asm!("mrs {}, tcr_el1", out(reg) tcr_el1, options(nomem, nostack));
let tg0 = (tcr_el1 >> 14) & 0x3;
match tg0 {
0b00 => 4096,
0b01 => 65536,
0b10 => 16384,
_ => 4096,
}
}
}
#[unsafe(no_mangle)]
pub extern "C" fn gum_query_rwx_support() -> GumRwxSupport {
_GumRwxSupport_GUM_RWX_NONE
}
#[unsafe(no_mangle)]
pub extern "C" fn gum_memory_can_remap_writable() -> gboolean {
1
}
#[unsafe(no_mangle)]
pub extern "C" fn gum_memory_try_remap_writable_pages(
first_page: gpointer,
n_pages: guint,
) -> gpointer {
unsafe {
let page_size = gum_query_page_size() as usize;
let mut physical_addrs = alloc::vec::Vec::with_capacity(n_pages as usize);
let mut current_page = first_page as u64;
for _ in 0..n_pages {
let phys_addr = xnu::ml_vtophys(current_page);
physical_addrs.push(phys_addr as gpointer);
current_page += page_size as u64;
}
_gum_barebone_try_remap_writable_pages(
physical_addrs.as_ptr() as *mut *const core::ffi::c_void,
physical_addrs.len() as guint,
)
}
}
#[unsafe(no_mangle)]
#[inline(never)]
pub extern "C" fn gum_barebone_try_remap_writable_pages(
addrs: *const gpointer,
n_addrs: guint,
) -> gpointer {
unsafe {
read_volatile(&n_addrs);
read_volatile(addrs)
}
}
#[unsafe(no_mangle)]
pub extern "C" fn gum_try_mprotect(
_address: gpointer,
_size: gsize,
_prot: GumPageProtection,
) -> gboolean {
1
}
#[unsafe(no_mangle)]
pub extern "C" fn gum_memory_allocate(
_address: gpointer,
size: gsize,
_alignment: gsize,
prot: GumPageProtection,
) -> gpointer {
let ptr = crate::xnu::kalloc(size as usize);
unsafe {
core::ptr::write_bytes(ptr, 0, size as usize);
if (prot & _GumPageProtection_GUM_PAGE_EXECUTE) != 0 {
gum_mprotect(ptr as gpointer, size, prot);
}
}
ptr as gpointer
}
#[unsafe(no_mangle)]
pub extern "C" fn gum_memory_free(address: gpointer, size: gsize) -> gboolean {
crate::xnu::free(address as *mut u8, size as usize);
1
}
#[unsafe(no_mangle)]
pub extern "C" fn gum_clear_cache(address: gpointer, size: gsize) {
unsafe {
let start = address as *const u8;
let end = start.add(size as usize);
libc::__clear_cache(start, end);
}
}
#[unsafe(no_mangle)]
pub extern "C" fn gum_tls_key_new() -> GumTlsKey {
Box::into_raw(Box::new(unsafe { core::mem::zeroed::<GPrivate>() })) as GumTlsKey
}
#[unsafe(no_mangle)]
pub extern "C" fn gum_tls_key_free(key: GumTlsKey) {
unsafe {
let _ = Box::from_raw(key as *mut GPrivate);
}
}
#[unsafe(no_mangle)]
pub extern "C" fn gum_tls_key_get_value(key: GumTlsKey) -> gpointer {
gthread::g_private_get(key as *mut GPrivate)
}
#[unsafe(no_mangle)]
pub extern "C" fn gum_tls_key_set_value(key: GumTlsKey, value: gpointer) {
gthread::g_private_set(key as *mut GPrivate, value)
}
#[unsafe(no_mangle)]
pub extern "C" fn gum_barebone_on_registry_activating(registry: *mut GumModuleRegistry) {
let kernel_base = crate::xnu::get_kernel_base();
unsafe {
let module_infos = core::ptr::addr_of!(crate::MODULE_INFO);
let module_infos = &*module_infos;
let mut i = 0;
for module_info in module_infos.iter() {
let module_base = kernel_base + module_info.offset as u64;
let module_path = if i == 0 {
"/System/Library/Kernels/kernel"
} else {
&format!(
"/System/Library/Extensions/{}.kext/{}",
module_info.name, module_info.name
)
};
let module_range = GumMemoryRange {
base_address: module_base,
size: module_info.size as u64,
};
let module = gum_native_module_new(&module_path, &module_info.version, &module_range);
gum_barebone_register_module(registry, module);
g_object_unref(module as gpointer);
i += 1;
}
}
}
#[repr(C)]
pub struct GumNativeModule {
parent: GObject,
name: *mut gchar,
version: *mut gchar,
path: *mut gchar,
range: GumMemoryRange,
}
#[repr(C)]
#[allow(dead_code)]
pub struct GumNativeModuleClass {
parent_class: GObjectClass,
}
static mut GUM_NATIVE_MODULE_TYPE: gsize = 0;
static mut GUM_NATIVE_MODULE_PARENT_CLASS: *mut GObjectClass = core::ptr::null_mut();
fn gum_native_module_get_type() -> GType {
unsafe {
if g_once_init_enter(
core::ptr::addr_of_mut!(GUM_NATIVE_MODULE_TYPE) as *mut ::core::ffi::c_void
) != 0
{
let type_name = c"GumNativeModule".as_ptr() as *const gchar;
let type_info = _GTypeInfo {
class_size: core::mem::size_of::<GObjectClass>() as u16,
base_init: None,
base_finalize: None,
class_init: Some(gum_native_module_class_init),
class_finalize: None,
class_data: core::ptr::null(),
instance_size: core::mem::size_of::<GumNativeModule>() as u16,
n_preallocs: 0,
instance_init: None,
value_table: core::ptr::null(),
};
let new_type = g_type_register_static(g_object_get_type(), type_name, &type_info, 0);
let interface_info = _GInterfaceInfo {
interface_init: Some(gum_native_module_iface_init),
interface_finalize: None,
interface_data: core::ptr::null_mut(),
};
g_type_add_interface_static(new_type, gum_module_get_type(), &interface_info);
g_once_init_leave(
core::ptr::addr_of_mut!(GUM_NATIVE_MODULE_TYPE) as *mut ::core::ffi::c_void,
new_type as gsize,
);
}
GUM_NATIVE_MODULE_TYPE as GType
}
}
unsafe extern "C" fn gum_native_module_class_init(klass: gpointer, _class_data: gpointer) {
unsafe {
let object_class = klass as *mut GObjectClass;
GUM_NATIVE_MODULE_PARENT_CLASS = g_type_class_peek_parent(klass) as *mut GObjectClass;
(*object_class).finalize = Some(gum_native_module_finalize);
}
}
extern "C" fn gum_native_module_iface_init(g_iface: gpointer, _iface_data: gpointer) {
unsafe {
let iface = g_iface as *mut GumModuleInterface;
(*iface).get_name = Some(gum_native_module_get_name);
(*iface).get_version = Some(gum_native_module_get_version);
(*iface).get_path = Some(gum_native_module_get_path);
(*iface).get_range = Some(gum_native_module_get_range);
(*iface).enumerate_exports = Some(gum_native_module_enumerate_exports);
}
}
unsafe extern "C" fn gum_native_module_finalize(object: *mut GObject) {
unsafe {
let module = object as *mut GumNativeModule;
g_free((*module).path as gpointer);
(*GUM_NATIVE_MODULE_PARENT_CLASS).finalize.unwrap()(object);
}
}
fn gum_native_module_new(path: &str, version: &str, range: &GumMemoryRange) -> *mut GumModule {
unsafe {
let path_cstr = CString::new(path).unwrap();
let version_cstr = CString::new(version).unwrap();
let module =
g_object_new(gum_native_module_get_type(), ptr::null()) as *mut GumNativeModule;
(*module).path = g_strdup(path_cstr.as_ptr());
(*module).name = (*module).path.add(path.rfind('/').unwrap() + 1);
(*module).version = g_strdup(version_cstr.as_ptr());
(*module).range = *range;
module as *mut GumModule
}
}
extern "C" fn gum_native_module_get_name(module: *mut GumModule) -> *const gchar {
unsafe {
let native_module = module as *mut GumNativeModule;
(*native_module).name as *const gchar
}
}
extern "C" fn gum_native_module_get_version(module: *mut GumModule) -> *const gchar {
unsafe {
let native_module = module as *mut GumNativeModule;
(*native_module).version as *const gchar
}
}
extern "C" fn gum_native_module_get_path(module: *mut GumModule) -> *const gchar {
unsafe {
let native_module = module as *mut GumNativeModule;
(*native_module).path as *const gchar
}
}
extern "C" fn gum_native_module_get_range(module: *mut GumModule) -> *const GumMemoryRange {
unsafe {
let native_module = module as *mut GumNativeModule;
&(*native_module).range as *const GumMemoryRange
}
}
unsafe extern "C" fn gum_native_module_enumerate_exports(
self_: *mut GumModule,
func: GumFoundExportFunc,
user_data: gpointer,
) {
unsafe {
let module = self_ as *mut GumNativeModule;
let module_range = &(*module).range;
let symbol_table = core::ptr::addr_of!(crate::SYMBOL_TABLE);
let symbol_table = &*symbol_table;
const N_EXT: u8 = 0x01; // External symbol flag
const N_TYPE: u8 = 0x0e; // Type mask
const N_SECT: u8 = 0x0e; // Defined in section
let start_address = module_range.base_address;
let end_address = module_range.base_address + module_range.size;
for symbol_ref in symbol_table.iter_symbols_in_range(start_address, end_address) {
let is_external = (symbol_ref.symbol_type() & N_EXT) != 0;
let is_defined = (symbol_ref.symbol_type() & N_TYPE) == N_SECT;
if !is_external || !is_defined {
continue;
}
let export_type = GumExportType_GUM_EXPORT_FUNCTION;
let export_details = GumExportDetails {
type_: export_type,
name: g_strdup(symbol_ref.name_ptr()),
address: symbol_ref.address(),
};
let should_continue =
func.unwrap()(&export_details as *const GumExportDetails, user_data);
if should_continue == 0 {
break;
}
}
}
}
#[unsafe(no_mangle)]
pub extern "C" fn gum_symbol_details_from_address(
address: gpointer,
details: *mut GumDebugSymbolDetails,
) -> gboolean {
unsafe {
let table = core::ptr::addr_of!(crate::SYMBOL_TABLE).read();
if let Some(symbol) = table.find_symbol_by_address(address as u64) {
let name_bytes = symbol.name().as_bytes();
let copy_len = core::cmp::min(name_bytes.len(), 2048);
core::ptr::copy_nonoverlapping(
name_bytes.as_ptr(),
(*details).symbol_name.as_mut_ptr() as *mut u8,
copy_len,
);
(*details).symbol_name[copy_len] = 0;
(*details).address = symbol.address();
(*details).module_name[0] = 0;
(*details).file_name[0] = 0;
(*details).line_number = 0;
(*details).column = 0;
return 1;
}
0
}
}
#[unsafe(no_mangle)]
pub extern "C" fn gum_symbol_name_from_address(address: gpointer) -> *mut gchar {
unsafe {
let table = core::ptr::addr_of!(crate::SYMBOL_TABLE).read();
let name_ptr = table.find_symbol_name_ptr_by_address(address as u64);
g_strdup(name_ptr as *const gchar)
}
}
#[unsafe(no_mangle)]
pub extern "C" fn gum_find_function(name: *const gchar) -> gpointer {
unsafe {
let target_name = CStr::from_ptr(name).to_string_lossy();
let table = core::ptr::addr_of!(crate::SYMBOL_TABLE).read();
if let Some(symbol) = table.find_symbol_by_name(&target_name) {
return symbol.address() as gpointer;
}
core::ptr::null_mut()
}
}
#[unsafe(no_mangle)]
pub extern "C" fn gum_find_functions_named(name: *const gchar) -> *mut GArray {
unsafe {
let array = g_array_new(0, 0, core::mem::size_of::<gpointer>() as guint);
let target_name = CStr::from_ptr(name).to_string_lossy();
let table = core::ptr::addr_of!(crate::SYMBOL_TABLE).read();
let symbols = table.find_symbols_by_name(&target_name);
for symbol in symbols {
let addr = symbol.address() as gpointer;
g_array_append_vals(array, &addr as *const gpointer as gconstpointer, 1);
}
array
}
}
#[unsafe(no_mangle)]
pub extern "C" fn gum_find_functions_matching(pattern: *const gchar) -> *mut GArray {
unsafe {
let array = g_array_new(0, 0, core::mem::size_of::<gpointer>() as guint);
let glob_pattern = CStr::from_ptr(pattern).to_string_lossy();
let table = core::ptr::addr_of!(crate::SYMBOL_TABLE).read();
let symbols = table.find_symbols_matching_glob(&glob_pattern);
for symbol in symbols {
let addr = symbol.address() as gpointer;
g_array_append_vals(array, &addr as *const gpointer as gconstpointer, 1);
}
array
}
}
#[unsafe(no_mangle)]
pub extern "C" fn gum_load_symbols(_path: *const gchar) -> gboolean {
0
}
+763
View File
@@ -0,0 +1,763 @@
use core::cell::UnsafeCell;
use core::ffi::c_void;
use core::mem::size_of;
use core::ptr::{read_volatile, write_volatile};
use core::sync::atomic::{AtomicUsize, Ordering};
use crate::gum::gum_barebone_query_page_size;
use crate::xnu;
const MMIO_SIZE: u64 = 0x200;
static PAGE_SIZE: AtomicUsize = AtomicUsize::new(0);
const QSZ: u16 = 64;
const MAGIC: usize = 0x000;
const VERSION: usize = 0x004;
const DEVICE: usize = 0x008;
const STATUS: usize = 0x070;
const DEVFEAT: usize = 0x010;
const DEVFEAT_SEL: usize = 0x014;
const DRVFEAT: usize = 0x020;
const DRVFEAT_SEL: usize = 0x024;
const QSEL: usize = 0x030;
const QNUM_MAX: usize = 0x034;
const QNUM: usize = 0x038;
const QREADY: usize = 0x044;
const QDESC_LO: usize = 0x080;
const QDESC_HI: usize = 0x084;
const QAVAIL_LO: usize = 0x090;
const QAVAIL_HI: usize = 0x094;
const QUSED_LO: usize = 0x0a0;
const QUSED_HI: usize = 0x0a4;
const QNOTIFY: usize = 0x050;
const ISR: usize = 0x060;
const ISR_ACK: usize = 0x064;
const ST_ACK: u32 = 1;
const ST_DRV: u32 = 2;
const ST_DRV_OK: u32 = 4;
const ST_FEAT_OK: u32 = 8;
const ST_FAILED: u32 = 0x80;
const DEV_ID_CONSOLE: u32 = 3;
const F_VERSION_1: u64 = 1u64 << 32;
const F_MULTIPORT: u64 = 1u64 << 1;
const INT_VRING: u32 = 1;
const Q_RX0: u16 = 0;
const Q_TX0: u16 = 1;
const Q_CTRL_RX: u16 = 2;
const Q_CTRL_TX: u16 = 3;
#[repr(C)]
#[derive(Copy, Clone)]
struct VConsCtrl {
id: u32,
event: u16,
value: u16,
}
const EV_DEVICE_READY: u16 = 0;
const EV_DEVICE_ADD: u16 = 1;
const EV_PORT_READY: u16 = 3;
const EV_PORT_OPEN: u16 = 6;
const EV_CONSOLE_PORT: u16 = 4;
#[repr(C)]
struct Desc {
addr: u64,
len: u32,
flags: u16,
next: u16,
}
const D_NEXT: u16 = 1;
const D_WRITE: u16 = 2;
#[repr(C)]
#[derive(Copy, Clone)]
struct Avail {
flags: u16,
idx: u16,
}
#[repr(C)]
#[derive(Copy, Clone)]
struct UsedElem {
id: u32,
len: u32,
}
#[repr(C)]
#[derive(Copy, Clone)]
struct Used {
flags: u16,
idx: u16,
}
#[derive(Copy, Clone)]
struct DmaPage {
va: *mut u8,
pa: u64,
}
fn dma_page_alloc() -> DmaPage {
let len = PAGE_SIZE.load(Ordering::Relaxed);
let va = xnu::kalloc(len);
let pa = xnu::ml_vtophys(va as u64);
DmaPage { va, pa }
}
fn dma_page_free(p: DmaPage) {
let len = PAGE_SIZE.load(Ordering::Relaxed);
xnu::free(p.va, len);
}
struct Vq {
sel: u16,
size: u16,
desc_va: *mut u8,
avail_va: *mut u8,
used_va: *mut u8,
avail_idx: u16,
used_idx: u16,
free_head: u16,
free_cnt: u16,
}
impl Vq {
fn new(mmio: *mut u8, sel: u16, size: u16) -> Self {
w32(mmio, QSEL, sel as u32);
let max = r32(mmio, QNUM_MAX) as u16;
debug_assert!(max >= size && max != 0);
w32(mmio, QNUM, size as u32);
let d = dma_page_alloc();
let a = dma_page_alloc();
let u = dma_page_alloc();
let ps = PAGE_SIZE.load(core::sync::atomic::Ordering::Relaxed);
unsafe {
core::ptr::write_bytes(d.va, 0, ps);
core::ptr::write_bytes(a.va, 0, ps);
core::ptr::write_bytes(u.va, 0, ps);
}
w64(mmio, QDESC_LO, QDESC_HI, d.pa);
w64(mmio, QAVAIL_LO, QAVAIL_HI, a.pa);
w64(mmio, QUSED_LO, QUSED_HI, u.pa);
let dp = d.va as *mut Desc;
for i in 0..size {
unsafe {
(*dp.add(i as usize)).flags = 0;
(*dp.add(i as usize)).next = if i + 1 < size { i + 1 } else { 0xFFFF };
}
}
w32(mmio, QREADY, 1);
Self {
sel,
size,
desc_va: d.va,
avail_va: a.va,
used_va: u.va,
avail_idx: 0,
used_idx: 0,
free_head: 0,
free_cnt: size,
}
}
fn alloc(&mut self) -> u16 {
debug_assert!(self.free_cnt > 0);
let h = self.free_head;
let dp = self.desc_va as *mut Desc;
unsafe {
self.free_head = (*dp.add(h as usize)).next;
}
self.free_cnt -= 1;
h
}
fn free_chain(&mut self, mut idx: u16) {
let dp = self.desc_va as *mut Desc;
loop {
self.free_cnt += 1;
let (flags, next) = unsafe {
let p = dp.add(idx as usize);
((*p).flags, (*p).next)
};
if (flags & D_NEXT) == 0 {
break;
}
idx = next;
}
unsafe {
(*dp.add(idx as usize)).next = self.free_head;
}
self.free_head = idx;
}
fn push_avail(&mut self, head: u16) {
let ap = self.avail_va as *mut Avail;
let ring = unsafe { (ap as *mut u8).add(size_of::<Avail>()) as *mut u16 };
let slot = (self.avail_idx % self.size) as usize;
unsafe {
*ring.add(slot) = head;
}
wmb();
self.avail_idx = self.avail_idx.wrapping_add(1);
unsafe {
(*ap).idx = self.avail_idx;
}
}
fn pop_used(&mut self) -> Option<UsedElem> {
let up = self.used_va as *mut Used;
if unsafe { (*up).idx } == self.used_idx {
return None;
}
let ring = unsafe { (up as *mut u8).add(size_of::<Used>()) as *mut UsedElem };
let elem = unsafe { *ring.add((self.used_idx % self.size) as usize) };
self.used_idx = self.used_idx.wrapping_add(1);
Some(elem)
}
}
struct Inner {
mmio: *mut u8,
ctrl_rx: Vq,
ctrl_tx: Vq,
port_id: Option<u32>,
rx: Option<Vq>,
tx: Option<Vq>,
rx_need: usize,
rx_have: usize,
rx_lenbuf: [u8; 4],
rx_lenhave: usize,
rx_buf: Option<&'static mut [u8]>,
tx_head: *mut TxNode,
tx_tail: *mut TxNode,
ctrl_rx_pages: [Option<DmaPage>; QSZ as usize],
data_rx_pages: [Option<DmaPage>; QSZ as usize],
tx_pages: [Option<DmaPage>; QSZ as usize],
wake_token: *const u8,
on_rx: Option<fn(&[u8])>,
}
#[repr(C)]
struct TxNode {
next: *mut TxNode,
frame: &'static [u8],
}
pub struct Hostlink {
state: UnsafeCell<Inner>,
}
unsafe impl Send for Hostlink {}
impl Hostlink {
pub fn init(mmio_base: u64, irq_line: u32, on_rx: Option<fn(&[u8])>, wake_token: *const u8) -> Result<Self, ()> {
let page_size = gum_barebone_query_page_size();
PAGE_SIZE.store(page_size as usize, Ordering::Relaxed);
let mmio = xnu::ml_io_map(mmio_base, MMIO_SIZE) as *mut u8;
if mmio.is_null() {
return Err(());
}
w32(mmio, STATUS, 0);
w32(mmio, STATUS, ST_ACK | ST_DRV);
let magic_ok = r32(mmio, MAGIC) == 0x7472_6976;
let version_ok = r32(mmio, VERSION) == 2;
let device_ok = r32(mmio, DEVICE) == DEV_ID_CONSOLE;
if !(magic_ok && version_ok && device_ok) {
w32(mmio, STATUS, ST_FAILED);
return Err(());
}
let dev_lo = feat_get(mmio, 0) as u64;
let dev_hi = (feat_get(mmio, 1) as u64) << 32;
let mut drv: u64 = 0;
if (dev_hi & F_VERSION_1) != 0 {
drv |= F_VERSION_1;
}
if (dev_lo & F_MULTIPORT) != 0 {
drv |= F_MULTIPORT;
}
feat_set(mmio, 0, (drv & 0xffff_ffff) as u32);
feat_set(mmio, 1, (drv >> 32) as u32);
w32(mmio, STATUS, r32(mmio, STATUS) | ST_FEAT_OK);
let feats_ok = (r32(mmio, STATUS) & ST_FEAT_OK) != 0;
if !feats_ok {
w32(mmio, STATUS, ST_FAILED);
return Err(());
}
let ctrl_rx = Vq::new(mmio, Q_CTRL_RX, QSZ);
let ctrl_tx = Vq::new(mmio, Q_CTRL_TX, QSZ);
w32(mmio, STATUS, r32(mmio, STATUS) | ST_DRV_OK);
xnu::install_interrupt_handler(
irq_line,
wake_token as *mut c_void,
isr_wake,
core::ptr::null_mut(),
);
let inner = Inner {
mmio,
ctrl_rx,
ctrl_tx,
port_id: None,
rx: None,
tx: None,
rx_need: 0,
rx_have: 0,
rx_lenbuf: [0; 4],
rx_lenhave: 0,
rx_buf: None,
tx_head: core::ptr::null_mut(),
tx_tail: core::ptr::null_mut(),
ctrl_rx_pages: [None; QSZ as usize],
data_rx_pages: [None; QSZ as usize],
tx_pages: [None; QSZ as usize],
wake_token,
on_rx,
};
let hl = Hostlink {
state: UnsafeCell::new(inner),
};
hl.ctrl_prime_rx(8);
hl.ctrl_send(VConsCtrl {
id: 0,
event: EV_DEVICE_READY,
value: 1,
});
Ok(hl)
}
pub fn send(&self, payload: &[u8]) {
let s = unsafe { &mut *self.state.get() };
let total = 4 + payload.len();
let buf = xnu::kalloc(total);
unsafe {
let len = payload.len() as u32;
*buf.add(0) = (len & 0xFF) as u8;
*buf.add(1) = ((len >> 8) & 0xFF) as u8;
*buf.add(2) = ((len >> 16) & 0xFF) as u8;
*buf.add(3) = ((len >> 24) & 0xFF) as u8;
core::ptr::copy_nonoverlapping(payload.as_ptr(), buf.add(4), payload.len());
}
let frame: &'static [u8] = unsafe { core::slice::from_raw_parts(buf, total) };
let node = xnu::kalloc(size_of::<TxNode>()) as *mut TxNode;
unsafe {
(*node).next = core::ptr::null_mut();
(*node).frame = frame;
}
if s.tx_tail.is_null() {
s.tx_head = node;
s.tx_tail = node;
} else {
unsafe {
(*s.tx_tail).next = node;
}
s.tx_tail = node;
}
xnu::thread_wakeup(s.wake_token);
}
pub fn process(&self) {
let s = unsafe { &mut *self.state.get() };
if (r32(s.mmio, ISR) & INT_VRING) != 0 {
w32(s.mmio, ISR_ACK, INT_VRING);
}
self.ctrl_complete();
self.ctrl_prime_rx(QSZ as usize);
self.data_rx_complete();
self.data_tx_complete();
self.data_tx_push();
self.data_rx_refill();
}
fn ctrl_prime_rx(&self, count: usize) {
let s = unsafe { &mut *self.state.get() };
let mut posted = 0usize;
while posted < count {
if s.ctrl_rx.free_cnt == 0 {
break;
}
let pg = dma_page_alloc();
let h = s.ctrl_rx.alloc();
let d = s.ctrl_rx.desc_va as *mut Desc;
unsafe {
(*d.add(h as usize)).addr = pg.pa;
(*d.add(h as usize)).len = PAGE_SIZE.load(Ordering::Relaxed) as u32;
(*d.add(h as usize)).flags = D_WRITE;
(*d.add(h as usize)).next = 0;
}
s.ctrl_rx_pages[h as usize] = Some(pg);
s.ctrl_rx.push_avail(h);
posted += 1;
}
let sel = s.ctrl_rx.sel;
self.kick(sel);
}
fn ctrl_send(&self, msg: VConsCtrl) {
let s = unsafe { &mut *self.state.get() };
let pg = dma_page_alloc();
unsafe {
core::ptr::write(pg.va as *mut VConsCtrl, msg);
}
let h = s.ctrl_tx.alloc();
let d = s.ctrl_tx.desc_va as *mut Desc;
unsafe {
(*d.add(h as usize)).addr = pg.pa;
(*d.add(h as usize)).len = size_of::<VConsCtrl>() as u32;
(*d.add(h as usize)).flags = 0;
(*d.add(h as usize)).next = 0;
}
s.tx_pages[h as usize] = Some(pg);
s.ctrl_tx.push_avail(h);
let sel = s.ctrl_tx.sel;
self.kick(sel);
}
fn ctrl_complete(&self) {
let s = unsafe { &mut *self.state.get() };
while let Some(u) = s.ctrl_rx.pop_used() {
let h = u.id as u16;
if let Some(pg) = s.ctrl_rx_pages[h as usize].take() {
let ev = unsafe { *(pg.va as *const VConsCtrl) };
dma_page_free(pg);
match ev.event {
EV_DEVICE_ADD | EV_CONSOLE_PORT => {
if s.port_id.is_none() {
self.setup_data_port(ev.id);
self.ctrl_send(VConsCtrl {
id: ev.id,
event: EV_PORT_READY,
value: 1,
});
self.ctrl_send(VConsCtrl {
id: ev.id,
event: EV_PORT_OPEN,
value: 1,
});
}
}
_ => {}
}
let pg2 = dma_page_alloc();
let d = s.ctrl_rx.desc_va as *mut Desc;
unsafe {
(*d.add(h as usize)).addr = pg2.pa;
(*d.add(h as usize)).len = PAGE_SIZE.load(Ordering::Relaxed) as u32;
(*d.add(h as usize)).flags = D_WRITE;
(*d.add(h as usize)).next = 0;
}
s.ctrl_rx_pages[h as usize] = Some(pg2);
s.ctrl_rx.push_avail(h);
}
}
let sel = s.ctrl_rx.sel;
self.kick(sel);
while let Some(u) = s.ctrl_tx.pop_used() {
let head = u.id as u16;
if let Some(pg) = s.tx_pages[head as usize].take() {
dma_page_free(pg);
}
s.ctrl_tx.free_chain(head);
}
}
fn setup_data_port(&self, id: u32) {
let s = unsafe { &mut *self.state.get() };
if s.port_id.is_some() {
return;
}
let (rx_i, tx_i) = if id == 0 {
(Q_RX0, Q_TX0)
} else {
let base = 4 + ((id as u16 - 1) * 2);
(base, base + 1)
};
let rx = Vq::new(s.mmio, rx_i, QSZ);
let tx = Vq::new(s.mmio, tx_i, QSZ);
s.rx = Some(rx);
s.tx = Some(tx);
s.port_id = Some(id);
self.data_rx_refill();
}
fn data_rx_refill(&self) {
let s = unsafe { &mut *self.state.get() };
let Some(rxq) = s.rx.as_mut() else {
return;
};
while rxq.free_cnt > 0 {
let h = rxq.alloc();
let pg = dma_page_alloc();
let d = rxq.desc_va as *mut Desc;
unsafe {
(*d.add(h as usize)).addr = pg.pa;
(*d.add(h as usize)).len = PAGE_SIZE.load(Ordering::Relaxed) as u32;
(*d.add(h as usize)).flags = D_WRITE;
(*d.add(h as usize)).next = 0;
}
s.data_rx_pages[h as usize] = Some(pg);
rxq.push_avail(h);
}
let sel = rxq.sel;
self.kick(sel);
}
fn data_rx_complete(&self) {
let s = unsafe { &mut *self.state.get() };
let Some(rxq) = s.rx.as_mut() else {
return;
};
while let Some(u) = rxq.pop_used() {
let h = u.id as u16;
let n = u.len as usize;
if let Some(pg) = s.data_rx_pages[h as usize].take() {
{
let bytes = unsafe { core::slice::from_raw_parts(pg.va, n) };
self.feed_rx_stream(bytes);
}
dma_page_free(pg);
let pg2 = dma_page_alloc();
let d = rxq.desc_va as *mut Desc;
unsafe {
(*d.add(h as usize)).addr = pg2.pa;
(*d.add(h as usize)).len = PAGE_SIZE.load(Ordering::Relaxed) as u32;
(*d.add(h as usize)).flags = D_WRITE;
(*d.add(h as usize)).next = 0;
}
s.data_rx_pages[h as usize] = Some(pg2);
rxq.push_avail(h);
}
}
let sel = rxq.sel;
self.kick(sel);
}
fn feed_rx_stream(&self, mut chunk: &[u8]) {
let s = unsafe { &mut *self.state.get() };
while !chunk.is_empty() {
if s.rx_lenhave < 4 {
let need = 4 - s.rx_lenhave;
let take = core::cmp::min(need, chunk.len());
s.rx_lenbuf[s.rx_lenhave..s.rx_lenhave + take].copy_from_slice(&chunk[..take]);
s.rx_lenhave += take;
chunk = &chunk[take..];
if s.rx_lenhave < 4 {
return;
}
let len = (s.rx_lenbuf[0] as usize)
| ((s.rx_lenbuf[1] as usize) << 8)
| ((s.rx_lenbuf[2] as usize) << 16)
| ((s.rx_lenbuf[3] as usize) << 24);
if s.rx_buf.is_none() && len > 0 {
let buf = xnu::kalloc(len);
let slice: &'static mut [u8] =
unsafe { core::slice::from_raw_parts_mut(buf, len) };
s.rx_buf = Some(slice);
s.rx_need = len;
s.rx_have = 0;
}
}
let need = s.rx_need.saturating_sub(s.rx_have);
let take = core::cmp::min(need, chunk.len());
if let Some(ref mut buf) = s.rx_buf {
unsafe {
core::ptr::copy_nonoverlapping(
chunk.as_ptr(),
buf.as_mut_ptr().wrapping_add(s.rx_have),
take,
);
}
}
s.rx_have += take;
chunk = &chunk[take..];
if s.rx_have == s.rx_need {
if let (Some(cb), Some(buf)) = (s.on_rx, &s.rx_buf) {
cb(&buf[..]);
}
s.rx_buf = None;
s.rx_need = 0;
s.rx_have = 0;
s.rx_lenhave = 0;
}
}
}
fn data_tx_complete(&self) {
let s = unsafe { &mut *self.state.get() };
let Some(txq) = s.tx.as_mut() else {
return;
};
while let Some(u) = txq.pop_used() {
let mut i = u.id as u16;
loop {
if let Some(pg) = s.tx_pages[i as usize].take() {
dma_page_free(pg);
}
let d = txq.desc_va as *mut Desc;
let (f, n) = unsafe {
let p = d.add(i as usize);
((*p).flags, (*p).next)
};
if (f & D_NEXT) == 0 {
break;
}
i = n;
}
txq.free_chain(u.id as u16);
}
}
fn data_tx_push(&self) {
let s = unsafe { &mut *self.state.get() };
let Some(txq) = s.tx.as_mut() else {
return;
};
loop {
let node = if s.tx_head.is_null() {
core::ptr::null_mut()
} else {
let n = s.tx_head;
s.tx_head = unsafe { (*n).next };
if s.tx_head.is_null() {
s.tx_tail = core::ptr::null_mut();
}
n
};
if node.is_null() {
break;
}
let frame = unsafe { (*node).frame };
let mut off = 0usize;
let mut head: Option<u16> = None;
let mut prev = 0u16;
while off < frame.len() {
if txq.free_cnt == 0 {
break;
}
let page = PAGE_SIZE.load(Ordering::Relaxed);
let chunk = core::cmp::min(page, frame.len() - off);
let pg = dma_page_alloc();
unsafe {
core::ptr::copy_nonoverlapping(frame.as_ptr().add(off), pg.va, chunk);
}
let i = txq.alloc();
let d = txq.desc_va as *mut Desc;
unsafe {
(*d.add(i as usize)).addr = pg.pa;
(*d.add(i as usize)).len = chunk as u32;
(*d.add(i as usize)).flags = 0;
(*d.add(i as usize)).next = 0;
}
s.tx_pages[i as usize] = Some(pg);
if let Some(_h) = head {
unsafe {
(*d.add(prev as usize)).flags |= D_NEXT;
(*d.add(prev as usize)).next = i;
}
prev = i;
} else {
head = Some(i);
prev = i;
}
off += chunk;
}
if let Some(h) = head {
let sel = txq.sel;
txq.push_avail(h);
self.kick(sel);
}
xnu::free(frame.as_ptr() as *mut u8, frame.len());
xnu::free(node as *mut u8, core::mem::size_of::<TxNode>());
}
}
fn kick(&self, sel: u16) {
let s = unsafe { &*self.state.get() };
wmb();
w32(s.mmio, QSEL, sel as u32);
w32(s.mmio, QNOTIFY, sel as u32);
}
}
extern "C" fn isr_wake(token: *mut c_void, _refcon: *mut c_void, _nub: *mut c_void, _src: i32) {
xnu::thread_wakeup(token as *const u8);
}
fn r32(mmio: *mut u8, off: usize) -> u32 {
unsafe { read_volatile(mmio.add(off) as *const u32) }
}
fn w32(mmio: *mut u8, off: usize, val: u32) {
unsafe { write_volatile(mmio.add(off) as *mut u32, val) }
}
fn w64(mmio: *mut u8, lo: usize, hi: usize, v: u64) {
w32(mmio, lo, (v & 0xffff_ffff) as u32);
w32(mmio, hi, (v >> 32) as u32);
}
fn feat_get(mmio: *mut u8, sel: u32) -> u32 {
w32(mmio, DEVFEAT_SEL, sel);
r32(mmio, DEVFEAT)
}
fn feat_set(mmio: *mut u8, sel: u32, v: u32) {
w32(mmio, DRVFEAT_SEL, sel);
w32(mmio, DRVFEAT, v)
}
fn wmb() {
unsafe { core::arch::asm!("dmb ishst", options(nostack, preserves_flags)) }
}
+153
View File
@@ -0,0 +1,153 @@
use core::ptr;
use crate::bindings::{GMutex, GRecMutex};
use crate::gthread;
static mut MALLOC_LOCK: GRecMutex = unsafe { core::mem::zeroed() };
#[unsafe(no_mangle)]
pub extern "C" fn __malloc_lock(_reent: *mut core::ffi::c_void) {
gthread::g_rec_mutex_lock(ptr::addr_of_mut!(MALLOC_LOCK));
}
#[unsafe(no_mangle)]
pub extern "C" fn __malloc_unlock(_reent: *mut core::ffi::c_void) {
gthread::g_rec_mutex_unlock(ptr::addr_of_mut!(MALLOC_LOCK));
}
#[unsafe(no_mangle)]
pub extern "C" fn _fini() {
}
#[unsafe(no_mangle)]
pub extern "C" fn _exit(_status: i32) -> ! {
loop {}
}
#[unsafe(no_mangle)]
pub extern "C" fn _kill(_pid: i32, _sig: i32) -> i32 {
-1
}
#[unsafe(no_mangle)]
pub extern "C" fn _sbrk(incr: isize) -> *mut u8 {
const HEAP_SIZE: usize = 32 * 1024 * 1024; // 32 MB
static mut HEAP_START: *mut u8 = ptr::null_mut();
static mut HEAP_CURRENT: *mut u8 = ptr::null_mut();
static mut HEAP_MUTEX: GMutex = unsafe { core::mem::zeroed() };
unsafe {
gthread::g_mutex_lock(ptr::addr_of_mut!(HEAP_MUTEX));
if HEAP_START.is_null() {
HEAP_START = crate::xnu::kalloc(HEAP_SIZE);
if HEAP_START.is_null() {
gthread::g_mutex_unlock(ptr::addr_of_mut!(HEAP_MUTEX));
panic!("Failed to allocate 32 MB heap");
}
HEAP_CURRENT = HEAP_START;
}
let prev_heap_current = HEAP_CURRENT;
let new_heap_current = HEAP_CURRENT.add(incr as usize);
if new_heap_current > HEAP_START.add(HEAP_SIZE) {
gthread::g_mutex_unlock(ptr::addr_of_mut!(HEAP_MUTEX));
panic!("Heap exhausted: requested {} bytes, {} bytes remaining",
incr,
HEAP_START.add(HEAP_SIZE).offset_from(HEAP_CURRENT));
}
HEAP_CURRENT = new_heap_current;
gthread::g_mutex_unlock(ptr::addr_of_mut!(HEAP_MUTEX));
prev_heap_current
}
}
#[unsafe(no_mangle)]
pub extern "C" fn _getpid() -> i32 {
0
}
#[repr(C)]
struct Timeval {
tv_sec: i64,
tv_usec: i64,
}
#[unsafe(no_mangle)]
pub extern "C" fn _gettimeofday(tp: *mut core::ffi::c_void, _tzp: *mut core::ffi::c_void) -> i32 {
let (secs, microsecs) = crate::xnu::clock_get_calendar_microtime();
let timeval = Timeval {
tv_sec: secs as i64,
tv_usec: microsecs as i64,
};
unsafe {
ptr::copy_nonoverlapping(
&timeval as *const Timeval as *const u8,
tp as *mut u8,
core::mem::size_of::<Timeval>(),
);
}
0
}
#[unsafe(no_mangle)]
pub extern "C" fn _isatty(_fd: i32) -> i32 {
1
}
#[unsafe(no_mangle)]
pub extern "C" fn _open(_path: *const u8, _flags: i32, _mode: i32) -> i32 {
-1
}
#[unsafe(no_mangle)]
pub extern "C" fn _close(_fd: i32) -> i32 {
0
}
#[unsafe(no_mangle)]
pub extern "C" fn _read(_fd: i32, _buf: *mut u8, _count: usize) -> isize {
0
}
#[unsafe(no_mangle)]
pub extern "C" fn _write(_fd: i32, _buf: *const u8, count: usize) -> isize {
count as isize
}
#[unsafe(no_mangle)]
pub extern "C" fn _lseek(_fd: i32, _offset: isize, _whence: i32) -> isize {
0
}
#[unsafe(no_mangle)]
pub extern "C" fn _fstat(_fd: i32, _st: *mut core::ffi::c_void) -> i32 {
0
}
#[unsafe(no_mangle)]
pub extern "C" fn _link(_old: *const u8, _new: *const u8) -> i32 {
-1
}
#[unsafe(no_mangle)]
pub extern "C" fn _unlink(_path: *const u8) -> i32 {
-1
}
#[unsafe(no_mangle)]
pub extern "C" fn __clear_cache(_start: *const u8, _end: *const u8) {
// On AArch64, we need to flush the instruction cache
// This is a simplified implementation for the kernel environment
unsafe {
core::arch::asm!(
"ic iallu", // Invalidate all instruction caches
"dsb sy", // Data synchronization barrier
"isb", // Instruction synchronization barrier
options(nomem, nostack),
);
}
}
+544
View File
@@ -0,0 +1,544 @@
#![no_main]
#![no_std]
use alloc::boxed::Box;
use alloc::collections::BTreeMap;
use alloc::format;
use alloc::string::String;
use alloc::vec::Vec;
use core::alloc::{GlobalAlloc, Layout};
use core::ffi::{CStr, c_void};
use core::ptr;
use core::ptr::null_mut;
use core::sync::atomic::{AtomicU32, Ordering};
use bindings::{
GBytes, GCancellable, GError, GVariant, GVariantIter, GumScript, g_error_free, g_free,
g_main_context_default, g_main_context_iteration, g_memdup2, g_object_unref,
g_variant_check_format_string, g_variant_get, g_variant_get_child_value, g_variant_get_data,
g_variant_get_size, g_variant_get_string, g_variant_get_uint32, g_variant_get_uint64,
g_variant_iter_init, g_variant_iter_next, g_variant_new, g_variant_new_from_data,
g_variant_new_string, g_variant_new_tuple, g_variant_new_uint32, g_variant_type_free,
g_variant_type_new, g_variant_unref, gchar, gpointer, gsize, gum_script_backend_create_sync,
gum_script_backend_obtain_qjs, gum_script_load_sync, gum_script_post,
gum_script_set_message_handler, gum_script_unload_sync,
};
use hostlink_virtio::Hostlink;
use symbols::SymbolTable;
mod glib;
mod gthread;
mod gum;
mod hostlink_virtio;
mod libc;
mod pac;
mod symbols;
mod xnu;
mod bindings {
#![allow(
dead_code,
improper_ctypes,
non_camel_case_types,
non_snake_case,
non_upper_case_globals,
unused_imports
)]
include!(concat!(env!("OUT_DIR"), "/bindings.rs"));
}
#[repr(u8)]
#[derive(PartialEq, Eq, Clone, Copy, Debug)]
pub enum FridaCommand {
CreateScript = 1,
LoadScript = 2,
DestroyScript = 3,
PostScriptMessage = 4,
Reply = 128,
ScriptMessage = 129,
}
impl core::fmt::Display for FridaCommand {
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
match self {
FridaCommand::CreateScript => write!(f, "CreateScript"),
FridaCommand::LoadScript => write!(f, "LoadScript"),
FridaCommand::DestroyScript => write!(f, "DestroyScript"),
FridaCommand::PostScriptMessage => write!(f, "PostScriptMessage"),
FridaCommand::Reply => write!(f, "Reply"),
FridaCommand::ScriptMessage => write!(f, "ScriptMessage"),
}
}
}
#[derive(Debug)]
struct HandlerResponse {
variant: *mut GVariant,
}
impl HandlerResponse {
fn success(variant: *mut GVariant) -> Self {
Self { variant }
}
fn success_empty() -> Self {
let variant = unsafe { g_variant_new_tuple(ptr::null(), 0) };
Self { variant }
}
fn error(message: &str) -> Self {
let mut c_message = String::from(message);
c_message.push('\0');
let error_variant = unsafe { g_variant_new_string(c_message.as_ptr()) };
Self {
variant: error_variant,
}
}
}
static mut CONFIG_DATA: &'static [u8] = &[];
pub static mut MODULE_INFO: Vec<ModuleInfo> = Vec::new();
pub static mut SYMBOL_TABLE: SymbolTable = SymbolTable::empty();
static mut TRANSPORT_DRIVER: *mut Hostlink = core::ptr::null_mut();
#[inline(always)]
fn transport_set(driver: Hostlink) {
unsafe {
let boxed = Box::into_raw(Box::new(driver));
TRANSPORT_DRIVER = boxed;
}
}
#[inline(always)]
fn transport_get_unchecked() -> &'static Hostlink {
unsafe {
debug_assert!(!TRANSPORT_DRIVER.is_null());
&*TRANSPORT_DRIVER
}
}
static mut SCRIPTS: BTreeMap<u32, *mut GumScript> = BTreeMap::new();
static NEXT_SCRIPT_ID: AtomicU32 = AtomicU32::new(1);
#[derive(Debug, Clone)]
pub struct ModuleInfo {
pub name: String,
pub version: String,
pub offset: u32,
pub size: u32,
pub start_func_offset: u32,
pub stop_func_offset: u32,
}
#[unsafe(no_mangle)]
pub unsafe extern "C" fn _start(config_data: *const u8, config_size: usize) {
unsafe {
CONFIG_DATA = core::slice::from_raw_parts(config_data, config_size);
xnu::kernel_thread_start(frida_agent_worker, 12345usize as *mut core::ffi::c_void);
}
}
unsafe extern "C" fn frida_agent_worker(_parameter: *mut core::ffi::c_void, _wait_result: i32) {
unsafe {
bindings::g_set_panic_handler(Some(frida_panic_handler), ptr::null_mut());
bindings::gum_init_embedded();
bindings::g_log_set_default_handler(Some(frida_log_handler), ptr::null_mut());
let (mmio, irq, kernel_base, module_info, symbol_table) =
parse_config(core::ptr::addr_of!(CONFIG_DATA).read());
xnu::set_kernel_base(kernel_base);
MODULE_INFO = module_info;
SYMBOL_TABLE = symbol_table;
transport_set(
Hostlink::init(
mmio,
irq,
Some(on_frame_from_host),
ptr::addr_of_mut!(glib::WAKEUP_TOKEN) as *const u8,
)
.unwrap(),
);
let main_context = g_main_context_default();
loop {
transport_get_unchecked().process();
g_main_context_iteration(main_context, 1);
}
}
}
fn on_frame_from_host(frame: &[u8]) {
if let Some(variant) = deserialize_message(&frame) {
process_incoming_message(variant);
unsafe {
g_variant_unref(variant);
}
}
}
unsafe fn parse_config(config: &[u8]) -> (u64, u32, u64, Vec<ModuleInfo>, SymbolTable) {
unsafe {
let type_string = c"(tuta(ssuuuu)ay)".as_ptr() as *const gchar;
let variant_type = g_variant_type_new(type_string);
let root_variant = g_variant_new_from_data(
variant_type,
config.as_ptr() as *const core::ffi::c_void,
config.len() as gsize,
1,
None,
ptr::null_mut(),
);
let hostlink_mmio_variant = g_variant_get_child_value(root_variant, 0);
let hostlink_mmio = g_variant_get_uint64(hostlink_mmio_variant);
let hostlink_irq_variant = g_variant_get_child_value(root_variant, 1);
let hostlink_irq = g_variant_get_uint32(hostlink_irq_variant);
let kernel_base_variant = g_variant_get_child_value(root_variant, 2);
let kernel_base = g_variant_get_uint64(kernel_base_variant);
xnu::set_kernel_base(kernel_base);
let module_info_variant = g_variant_get_child_value(root_variant, 3);
let mut iter: GVariantIter = core::mem::zeroed();
g_variant_iter_init(&mut iter as *mut GVariantIter, module_info_variant);
let mut module_info: Vec<ModuleInfo> = Vec::new();
let mut raw_name: *mut gchar = null_mut();
let mut raw_version: *mut gchar = null_mut();
let mut offset: u32 = 0;
let mut size: u32 = 0;
let mut start_func_offset: u32 = 0;
let mut stop_func_offset: u32 = 0;
while g_variant_iter_next(
&mut iter as *mut GVariantIter,
c"(&s&suuuu)".as_ptr(),
&mut raw_name,
&mut raw_version,
&mut offset,
&mut size,
&mut start_func_offset,
&mut stop_func_offset,
) != 0
{
module_info.push(ModuleInfo {
name: String::from(CStr::from_ptr(raw_name).to_str().unwrap()),
version: String::from(CStr::from_ptr(raw_version).to_str().unwrap()),
offset,
size,
start_func_offset,
stop_func_offset,
});
}
let symbol_array_variant = g_variant_get_child_value(root_variant, 4);
let symbol_data_ptr = g_variant_get_data(symbol_array_variant) as *const u8;
let symbol_data_size = g_variant_get_size(symbol_array_variant) as usize;
let symbol_table = SymbolTable::new(core::slice::from_raw_parts(
symbol_data_ptr,
symbol_data_size,
));
g_variant_unref(symbol_array_variant);
g_variant_unref(module_info_variant);
g_variant_unref(kernel_base_variant);
g_variant_unref(hostlink_irq_variant);
g_variant_unref(hostlink_mmio_variant);
g_variant_unref(root_variant);
g_variant_type_free(variant_type);
(
hostlink_mmio,
hostlink_irq,
kernel_base,
module_info,
symbol_table,
)
}
}
unsafe fn serialize_message(variant: *mut GVariant) -> Option<Vec<u8>> {
unsafe {
let size = g_variant_get_size(variant) as usize;
if size == 0 {
return None;
}
let data_ptr = g_variant_get_data(variant) as *const u8;
let mut result = Vec::with_capacity(size);
result.resize(size, 0);
core::ptr::copy_nonoverlapping(data_ptr, result.as_mut_ptr(), size);
Some(result)
}
}
fn deserialize_message(data: &[u8]) -> Option<*mut GVariant> {
unsafe {
if data.is_empty() {
return None;
}
let variant_type = g_variant_type_new(c"(yqv)".as_ptr());
let data_copy = g_memdup2(data.as_ptr() as *const c_void, data.len() as u64);
let variant = g_variant_new_from_data(
variant_type,
data_copy,
data.len() as u64,
0,
Some(g_free),
data_copy,
);
g_variant_type_free(variant_type);
if variant.is_null() {
None
} else {
Some(variant)
}
}
}
fn process_incoming_message(variant: *mut GVariant) {
{
let mut cmd_value: u8 = 0;
let mut request_id: u16 = 0;
let mut payload_variant: *mut GVariant = ptr::null_mut();
let cmd = unsafe {
g_variant_get(
variant,
c"(yqv)".as_ptr(),
&mut cmd_value,
&mut request_id,
&mut payload_variant,
);
core::mem::transmute::<u8, FridaCommand>(cmd_value)
};
let response = match cmd {
FridaCommand::CreateScript => handle_create_script(payload_variant),
FridaCommand::LoadScript => handle_load_script(payload_variant),
FridaCommand::DestroyScript => handle_destroy_script(payload_variant),
FridaCommand::PostScriptMessage => handle_post_script_message(payload_variant),
_ => HandlerResponse::error("Unknown command"),
};
send_command_reply(request_id, response);
unsafe { g_variant_unref(payload_variant) };
}
}
fn send_command_reply(request_id: u16, response: HandlerResponse) {
unsafe {
let message = g_variant_new(
c"(yqv)".as_ptr(),
FridaCommand::Reply as u8 as u32,
request_id as u32,
response.variant,
);
if let Some(serialized) = serialize_message(message) {
transport_get_unchecked().send(&serialized);
}
g_variant_unref(message);
}
}
fn handle_create_script(payload_variant: *mut GVariant) -> HandlerResponse {
unsafe {
if g_variant_check_format_string(payload_variant, c"s".as_ptr(), 0) == 0 {
return HandlerResponse::error("Invalid payload format: expected string");
}
let source = g_variant_get_string(payload_variant, core::ptr::null_mut());
let backend = gum_script_backend_obtain_qjs();
let cancellable: *mut GCancellable = ptr::null_mut();
let mut error: *mut GError = ptr::null_mut();
let script = gum_script_backend_create_sync(
backend,
c"agent.js".as_ptr(),
source,
ptr::null_mut(),
cancellable,
&mut error,
);
if !error.is_null() {
let error_msg = CStr::from_ptr((*error).message).to_str().unwrap();
let error_string = String::from(error_msg);
g_error_free(error);
return HandlerResponse::error(&error_string);
}
let script_id = NEXT_SCRIPT_ID.fetch_add(1, Ordering::Relaxed);
let script_id_ptr = Box::into_raw(Box::new(script_id));
gum_script_set_message_handler(
script,
Some(frida_message_handler),
script_id_ptr as *mut c_void,
None,
);
core::ptr::addr_of_mut!(SCRIPTS)
.as_mut()
.unwrap()
.insert(script_id, script);
HandlerResponse::success(g_variant_new_uint32(script_id))
}
}
unsafe extern "C" fn frida_message_handler(
message: *const gchar,
_data: *mut GBytes,
user_data: gpointer,
) {
unsafe {
let script_id = *(user_data as *const u32);
let message_variant = g_variant_new(
c"(yqv)".as_ptr(),
FridaCommand::ScriptMessage as u8 as u32,
0u32,
g_variant_new(c"(us)".as_ptr(), script_id, message),
);
if let Some(serialized) = serialize_message(message_variant) {
transport_get_unchecked().send(&serialized);
}
g_variant_unref(message_variant);
}
}
fn handle_load_script(payload_variant: *mut GVariant) -> HandlerResponse {
unsafe {
if g_variant_check_format_string(payload_variant, c"u".as_ptr(), 0) == 0 {
return HandlerResponse::error("Invalid payload format: expected uint32");
}
let script_id = g_variant_get_uint32(payload_variant);
let Some(script) = get_script_by_id(script_id) else {
return HandlerResponse::error(&format!("Script with ID {} not found", script_id));
};
gum_script_load_sync(script, ptr::null_mut());
HandlerResponse::success_empty()
}
}
fn handle_destroy_script(payload_variant: *mut GVariant) -> HandlerResponse {
unsafe {
if g_variant_check_format_string(payload_variant, c"u".as_ptr(), 0) == 0 {
return HandlerResponse::error("Invalid payload format: expected uint32");
}
let script_id = g_variant_get_uint32(payload_variant);
let scripts = core::ptr::addr_of_mut!(SCRIPTS).as_mut().unwrap();
let Some(script) = scripts.remove(&script_id) else {
return HandlerResponse::error(&format!("Script with ID {} not found", script_id));
};
gum_script_unload_sync(script, ptr::null_mut());
g_object_unref(script as *mut c_void);
HandlerResponse::success_empty()
}
}
fn handle_post_script_message(payload_variant: *mut GVariant) -> HandlerResponse {
unsafe {
if g_variant_check_format_string(payload_variant, c"(us)".as_ptr(), 0) == 0 {
return HandlerResponse::error("Invalid payload format: expected (uint32, string)");
}
let mut script_id: u32 = 0;
let mut message: *const gchar = ptr::null();
g_variant_get(
payload_variant,
c"(u&s)".as_ptr(),
&mut script_id,
&mut message,
);
let Some(script) = get_script_by_id(script_id) else {
return HandlerResponse::error(&format!("Script with ID {} not found", script_id));
};
gum_script_post(script, message, ptr::null_mut());
HandlerResponse::success_empty()
}
}
unsafe fn get_script_by_id(script_id: u32) -> Option<*mut GumScript> {
unsafe {
let scripts = core::ptr::addr_of_mut!(SCRIPTS).as_mut().unwrap();
scripts.get(&script_id).copied()
}
}
unsafe extern "C" fn frida_panic_handler(message: *const u8, _user_data: *mut core::ffi::c_void) {
let msg = unsafe { core::ffi::CStr::from_ptr(message).to_str().unwrap() };
panic!("[Frida] {}", msg);
}
unsafe extern "C" fn frida_log_handler(
_log_domain: *const core::ffi::c_char,
_log_level: i32,
message: *const core::ffi::c_char,
_user_data: *mut core::ffi::c_void,
) {
let msg = unsafe { core::ffi::CStr::from_ptr(message).to_str().unwrap() };
kprintln!("[Frida] {}", msg);
}
#[panic_handler]
fn panic(info: &core::panic::PanicInfo<'_>) -> ! {
let mut s = format!("{}", info);
s.push('\0');
xnu::panic(s.as_str());
loop {}
}
pub struct XnuAllocator;
unsafe impl GlobalAlloc for XnuAllocator {
unsafe fn alloc(&self, layout: Layout) -> *mut u8 {
xnu::kalloc(layout.size())
}
unsafe fn dealloc(&self, ptr: *mut u8, layout: Layout) {
xnu::free(ptr, layout.size());
}
}
#[global_allocator]
static GLOBAL: XnuAllocator = XnuAllocator;
extern crate alloc;
#[macro_export]
macro_rules! kprintln {
($($arg:tt)*) => {{
use core::fmt::Write;
let mut buf = alloc::string::String::new();
write!(&mut buf, $($arg)*).unwrap();
buf.push('\n');
buf.push('\0');
crate::xnu::io_log(&buf)
}};
}
+28
View File
@@ -0,0 +1,28 @@
use core::arch::asm;
pub unsafe fn ptrauth_sign(ptr: *const u8, discriminator: usize) -> *const u8 {
let signed: usize;
unsafe {
asm!(
".inst 0xdac10020", // pacia x0, x1
in("x0") ptr as usize,
in("x1") discriminator,
lateout("x0") signed,
options(nomem, nostack),
);
}
signed as *const u8
}
pub unsafe fn ptrauth_strip_data(ptr: *const u8) -> *const u8 {
let stripped: usize;
unsafe {
asm!(
".inst 0xdac143e0", // xpaci x0
in("x0") ptr as usize,
lateout("x0") stripped,
options(nomem, nostack),
);
}
stripped as *const u8
}
+443
View File
@@ -0,0 +1,443 @@
use crate::bindings::{
GPatternSpec, g_pattern_spec_free, g_pattern_spec_match_string, g_pattern_spec_new,
};
use crate::xnu::get_kernel_base;
use alloc::ffi::CString;
use core::cmp::Ordering;
use core::ffi::{CStr, c_char};
use core::mem::size_of;
use core::ptr;
pub struct SymbolTable {
data: &'static [u8],
symbol_count: usize,
}
impl SymbolTable {
pub const fn empty() -> Self {
Self {
data: &[],
symbol_count: 0,
}
}
pub fn new(data: &'static [u8]) -> Self {
if data.len() < 4 {
return Self::empty();
}
let symbol_count = unsafe { *(data.as_ptr() as *const u32) as usize };
Self { data, symbol_count }
}
pub fn is_empty(&self) -> bool {
self.symbol_count == 0
}
pub fn symbol_count(&self) -> usize {
self.symbol_count
}
pub fn find_symbol_by_name(&self, name: &str) -> Option<SymbolRef> {
let (_, entry) = self.binary_search_by_name(name)?;
Some(SymbolRef {
symbol_table: self,
entry,
kernel_base: get_kernel_base(),
})
}
pub fn find_symbols_by_name(&self, name: &str) -> SymbolsByNameIterator {
let (found_index, _) = match self.binary_search_by_name(name) {
Some(result) => result,
None => return SymbolsByNameIterator::empty(self),
};
let mut start = found_index;
let mut end = found_index;
while start > 0 {
let entry = self.get_symbol_entry_by_name_index(start - 1);
let symbol_name = entry.name(self);
if symbol_name == name {
start -= 1;
} else {
break;
}
}
while end + 1 < self.symbol_count {
let entry = self.get_symbol_entry_by_name_index(end + 1);
let symbol_name = entry.name(self);
if symbol_name == name {
end += 1;
} else {
break;
}
}
SymbolsByNameIterator {
symbol_table: self,
current_index: start,
end_index: end + 1,
kernel_base: get_kernel_base(),
}
}
pub fn find_symbols_matching_glob(&self, pattern: &str) -> SymbolsMatchingIterator {
if self.is_empty() {
return SymbolsMatchingIterator::empty(self);
}
let pattern_cstr = CString::new(pattern).unwrap();
let pspec = unsafe { g_pattern_spec_new(pattern_cstr.as_ptr()) };
SymbolsMatchingIterator {
symbol_table: self,
current_index: 0,
end_index: self.symbol_count,
pspec,
kernel_base: get_kernel_base(),
}
}
pub fn find_symbol_by_address(&self, address: u64) -> Option<SymbolRef> {
let target_offset = (address - get_kernel_base()) as u32;
let (_, entry) = self.binary_search_by_address(target_offset)?;
Some(SymbolRef {
symbol_table: self,
entry,
kernel_base: get_kernel_base(),
})
}
pub fn find_symbol_name_ptr_by_address(&self, address: u64) -> *const c_char {
let target_offset = (address - get_kernel_base()) as u32;
if let Some((_, entry)) = self.binary_search_by_address(target_offset) {
entry.name_ptr(self)
} else {
ptr::null()
}
}
pub fn find_closest_symbol_by_address(&self, address: u64) -> Option<SymbolRef> {
let kernel_base = get_kernel_base();
let target_offset = (address - kernel_base) as u32;
let (_, entry) = self.binary_search_closest_by_address(target_offset)?;
Some(SymbolRef {
symbol_table: self,
entry,
kernel_base,
})
}
pub fn iter_symbols_in_range(&self, start_address: u64, end_address: u64) -> SymbolsInRangeIterator {
if self.is_empty() {
return SymbolsInRangeIterator {
symbol_table: self,
current_index: 0,
end_index: 0,
end_offset: 0,
kernel_base: get_kernel_base(),
};
}
let kernel_base = get_kernel_base();
let start_offset = (start_address - kernel_base) as u32;
let end_offset = (end_address - kernel_base) as u32;
let mut left = 0;
let mut right = self.symbol_count;
while left < right {
let mid = left + (right - left) / 2;
let entry = self.get_symbol_entry_by_address_index(mid);
if entry.address_offset < start_offset {
left = mid + 1;
} else {
right = mid;
}
}
while left > 0 {
let prev_entry = self.get_symbol_entry_by_address_index(left - 1);
if prev_entry.address_offset >= start_offset {
left -= 1;
} else {
break;
}
}
SymbolsInRangeIterator {
symbol_table: self,
current_index: left,
end_index: self.symbol_count,
end_offset,
kernel_base,
}
}
fn get_symbol_entry_by_name_index(&self, index: usize) -> &SymbolEntry {
let offset = self.name_index_start() + index * 4;
let symbol_offset = unsafe { *(self.data.as_ptr().add(offset) as *const u32) as usize };
self.symbol_entry_at(symbol_offset)
}
fn get_symbol_entry_by_address_index(&self, index: usize) -> &SymbolEntry {
let offset = self.address_index_start() + index * 4;
let symbol_offset = unsafe { *(self.data.as_ptr().add(offset) as *const u32) as usize };
self.symbol_entry_at(symbol_offset)
}
fn symbol_entry_at(&self, offset: usize) -> &SymbolEntry {
unsafe { &*(self.data.as_ptr().add(offset) as *const SymbolEntry) }
}
fn name_index_start(&self) -> usize {
4
}
fn address_index_start(&self) -> usize {
4 + self.symbol_count * 4
}
fn binary_search_by_name(&self, name: &str) -> Option<(usize, &SymbolEntry)> {
self.binary_search(
|table, mid| table.get_symbol_entry_by_name_index(mid),
|entry| entry.name(self).cmp(name),
false,
)
}
fn binary_search_by_address(&self, target_offset: u32) -> Option<(usize, &SymbolEntry)> {
self.binary_search(
|table, mid| table.get_symbol_entry_by_address_index(mid),
|entry| entry.address_offset.cmp(&target_offset),
false,
)
}
fn binary_search_closest_by_address(
&self,
target_offset: u32,
) -> Option<(usize, &SymbolEntry)> {
self.binary_search(
|table, mid| table.get_symbol_entry_by_address_index(mid),
|entry| entry.address_offset.cmp(&target_offset),
true,
)
}
fn binary_search<F, C>(
&self,
get_entry_fn: F,
compare_fn: C,
find_closest: bool,
) -> Option<(usize, &SymbolEntry)>
where
F: Fn(&Self, usize) -> &SymbolEntry,
C: Fn(&SymbolEntry) -> Ordering,
{
if self.is_empty() {
return None;
}
let mut left = 0;
let mut right = self.symbol_count;
let mut best_match: Option<(usize, &SymbolEntry)> = None;
while left < right {
let mid = left + (right - left) / 2;
let entry = get_entry_fn(self, mid);
match compare_fn(entry) {
Ordering::Equal => return Some((mid, entry)),
Ordering::Less => {
if find_closest {
best_match = Some((mid, entry));
}
left = mid + 1;
}
Ordering::Greater => right = mid,
}
}
best_match
}
}
#[repr(C)]
struct SymbolEntry {
address_offset: u32,
symbol_type: u8,
section: u8,
description: u16,
}
impl SymbolEntry {
fn name<'a>(&self, symbol_table: &'a SymbolTable) -> &'a str {
unsafe {
CStr::from_ptr(self.name_ptr(symbol_table))
.to_str()
.unwrap()
}
}
fn name_ptr(&self, symbol_table: &SymbolTable) -> *const c_char {
let entry_ptr = self as *const SymbolEntry as *const u8;
let data_start = symbol_table.data.as_ptr();
let entry_offset = unsafe { entry_ptr.offset_from(data_start) as usize };
let name_start = entry_offset + size_of::<SymbolEntry>();
unsafe { symbol_table.data.as_ptr().add(name_start) as *const c_char }
}
}
pub struct SymbolRef<'a> {
symbol_table: &'a SymbolTable,
entry: &'a SymbolEntry,
kernel_base: u64,
}
impl<'a> SymbolRef<'a> {
pub fn name(&self) -> &'a str {
self.entry.name(self.symbol_table)
}
pub fn name_ptr(&self) -> *const c_char {
self.entry.name_ptr(self.symbol_table)
}
pub fn address(&self) -> u64 {
self.kernel_base + self.entry.address_offset as u64
}
pub fn symbol_type(&self) -> u8 {
self.entry.symbol_type
}
pub fn section(&self) -> u8 {
self.entry.section
}
pub fn description(&self) -> u16 {
self.entry.description
}
}
pub struct SymbolsByNameIterator<'a> {
symbol_table: &'a SymbolTable,
current_index: usize,
end_index: usize,
kernel_base: u64,
}
impl<'a> SymbolsByNameIterator<'a> {
fn empty(symbol_table: &'a SymbolTable) -> Self {
Self {
symbol_table,
current_index: 0,
end_index: 0,
kernel_base: get_kernel_base(),
}
}
}
impl<'a> Iterator for SymbolsByNameIterator<'a> {
type Item = SymbolRef<'a>;
fn next(&mut self) -> Option<Self::Item> {
if self.current_index == self.end_index {
return None;
}
let entry = self.symbol_table.get_symbol_entry_by_name_index(self.current_index);
self.current_index += 1;
Some(SymbolRef {
symbol_table: self.symbol_table,
entry,
kernel_base: self.kernel_base,
})
}
}
pub struct SymbolsMatchingIterator<'a> {
symbol_table: &'a SymbolTable,
current_index: usize,
end_index: usize,
pspec: *mut GPatternSpec,
kernel_base: u64,
}
impl<'a> SymbolsMatchingIterator<'a> {
fn empty(symbol_table: &'a SymbolTable) -> Self {
Self {
symbol_table,
current_index: 0,
end_index: 0,
pspec: ptr::null_mut(),
kernel_base: get_kernel_base(),
}
}
}
impl<'a> Iterator for SymbolsMatchingIterator<'a> {
type Item = SymbolRef<'a>;
fn next(&mut self) -> Option<Self::Item> {
while self.current_index != self.end_index {
let entry = self.symbol_table.get_symbol_entry_by_name_index(self.current_index);
self.current_index += 1;
if unsafe { g_pattern_spec_match_string(self.pspec, entry.name_ptr(self.symbol_table)) } != 0 {
return Some(SymbolRef {
symbol_table: self.symbol_table,
entry,
kernel_base: self.kernel_base,
});
}
}
None
}
}
impl<'a> Drop for SymbolsMatchingIterator<'a> {
fn drop(&mut self) {
if !self.pspec.is_null() {
unsafe { g_pattern_spec_free(self.pspec) };
}
}
}
pub struct SymbolsInRangeIterator<'a> {
symbol_table: &'a SymbolTable,
current_index: usize,
end_index: usize,
end_offset: u32,
kernel_base: u64,
}
impl<'a> Iterator for SymbolsInRangeIterator<'a> {
type Item = SymbolRef<'a>;
fn next(&mut self) -> Option<Self::Item> {
while self.current_index != self.end_index {
let entry = self.symbol_table.get_symbol_entry_by_address_index(self.current_index);
self.current_index += 1;
if entry.address_offset >= self.end_offset {
break;
}
return Some(SymbolRef {
symbol_table: self.symbol_table,
entry,
kernel_base: self.kernel_base,
});
}
None
}
}
+239
View File
@@ -0,0 +1,239 @@
use core::ffi::c_void;
use core::sync::atomic::{AtomicU64, Ordering};
static KERNEL_BASE: AtomicU64 = AtomicU64::new(0);
pub fn get_kernel_base() -> u64 {
KERNEL_BASE.load(Ordering::Relaxed)
}
pub fn set_kernel_base(base: u64) {
KERNEL_BASE.store(base, Ordering::Relaxed);
}
type ContinuationFn = unsafe extern "C" fn(_parameter: *mut c_void, _wait_result: i32);
unsafe extern "C" {
static _panic: unsafe extern "C" fn(*const u8);
static _IOLog: unsafe extern "C" fn(*const u8, ...);
static _kalloc: unsafe extern "C" fn(usize) -> *mut u8;
static _kfree: unsafe extern "C" fn(*mut u8, usize) -> *mut u8;
static _kernel_thread_start:
unsafe extern "C" fn(*const (), *mut c_void, *mut *mut c_void) -> isize;
static _assert_wait: unsafe extern "C" fn(*const u8, u32) -> i32;
static _assert_wait_timeout: unsafe extern "C" fn(*const u8, u32, u32, u32) -> i32;
static _thread_block: unsafe extern "C" fn(Option<ContinuationFn>) -> i32;
static _thread_wakeup: unsafe extern "C" fn(*const u8) -> i32;
static _mach_absolute_time: unsafe extern "C" fn() -> u64;
static _absolutetime_to_nanoseconds: unsafe extern "C" fn(u64, *mut u64);
static _clock_get_calendar_microtime: unsafe extern "C" fn(*mut u32, *mut u32);
static _ml_io_map: unsafe extern "C" fn(u64, u64) -> *mut c_void;
static _ml_vtophys: unsafe extern "C" fn(u64) -> u64;
static __ZN9IOService11getPlatformEv: unsafe extern "C" fn() -> *mut c_void;
static __ZN9IOServiceC2Ev: unsafe extern "C" fn(*mut core::ffi::c_void);
static __ZN8OSSymbol17withCStringNoCopyEPKc:
unsafe extern "C" fn(*const core::ffi::c_char) -> *const OSSymbol;
static __ZN6OSData9withBytesEPKvj:
unsafe extern "C" fn(*const core::ffi::c_void, u32) -> *mut OSData;
}
const IO_SERVICE_VTABLE_LENGTH: isize = 168;
const VT_LOOKUP_IC: isize = IO_SERVICE_VTABLE_LENGTH + 25; // IOPlatformExpert
const VT_REGISTER_INT: isize = IO_SERVICE_VTABLE_LENGTH + 0; // IOInterruptController
const VT_ENABLE_INT: isize = IO_SERVICE_VTABLE_LENGTH + 3; // IOInterruptController
pub fn panic(msg: &str) {
unsafe { _panic(msg.as_ptr()) };
}
pub fn io_log(msg: &str) {
unsafe {
_IOLog(msg.as_ptr());
}
}
pub fn kalloc(size: usize) -> *mut u8 {
unsafe { _kalloc(size) }
}
pub fn free(ptr: *mut u8, size: usize) {
unsafe {
_kfree(ptr, size);
}
}
pub fn kernel_thread_start(continuation: ContinuationFn, thread_parameter: *mut c_void) -> isize {
let mut new_thread: *mut c_void = core::ptr::null_mut();
return unsafe {
let ptr = crate::pac::ptrauth_sign(continuation as *const u8, 0xd507);
_kernel_thread_start(
core::mem::transmute(ptr),
thread_parameter,
&mut new_thread as *mut *mut c_void,
)
// TODO: Call thread_deallocate()
};
}
pub const THREAD_INTERRUPTIBLE: u32 = 1;
pub const THREAD_WAITING: i32 = -1;
pub fn assert_wait(event: *const u8, interruptible: u32) -> i32 {
unsafe { _assert_wait(event, interruptible) }
}
pub fn assert_wait_timeout(
event: *const u8,
interruptible: u32,
interval: u32,
scale_factor: u32,
) -> i32 {
unsafe { _assert_wait_timeout(event, interruptible, interval, scale_factor) }
}
pub fn thread_block(continuation: Option<ContinuationFn>) -> i32 {
unsafe { _thread_block(continuation) }
}
pub fn thread_wakeup(event: *const u8) -> i32 {
unsafe { _thread_wakeup(event) }
}
pub fn mach_absolute_time() -> u64 {
unsafe { _mach_absolute_time() }
}
pub fn absolutetime_to_nanoseconds(abstime: u64) -> u64 {
let mut nanoseconds: u64 = 0;
unsafe {
_absolutetime_to_nanoseconds(abstime, &mut nanoseconds);
}
nanoseconds
}
pub fn clock_get_calendar_microtime() -> (u32, u32) {
let mut secs: u32 = 0;
let mut microsecs: u32 = 0;
unsafe {
_clock_get_calendar_microtime(&mut secs, &mut microsecs);
}
(secs, microsecs)
}
pub fn ml_io_map(phys_addr: u64, size: u64) -> *mut c_void {
unsafe { _ml_io_map(phys_addr, size) }
}
pub fn ml_vtophys(vaddr: u64) -> u64 {
unsafe { _ml_vtophys(vaddr) }
}
pub type IOInterruptHandler =
extern "C" fn(target: *mut c_void, refcon: *mut c_void, nub: *mut c_void, source: i32);
pub fn install_interrupt_handler(
irq: u32,
target: *mut c_void,
handler: IOInterruptHandler,
refcon: *mut c_void,
) -> i32 {
let pe = unsafe { __ZN9IOService11getPlatformEv() };
let name =
unsafe { __ZN8OSSymbol17withCStringNoCopyEPKc(c"IOInterruptController0000001A".as_ptr()) };
let lookup: extern "C" fn(*mut IOPlatformExpert, *mut OSSymbol) -> *mut IOInterruptController =
vf(pe as _, VT_LOOKUP_IC);
let ic = lookup(pe as *mut IOPlatformExpert, name as *mut OSSymbol);
if ic.is_null() {
panic!("Failed to lookup IOInterruptController");
}
let nub = kalloc(0x88);
unsafe {
core::ptr::write_bytes(nub, 0, 0x88);
__ZN9IOServiceC2Ev(nub as *mut core::ffi::c_void);
}
type IOServiceInitFn = unsafe extern "C" fn(*mut c_void, *mut c_void) -> bool;
let init_fn: IOServiceInitFn = vf(nub as *mut c_void, 21);
unsafe { init_fn(nub as *mut c_void, core::ptr::null_mut()) };
let interrupt_sources =
kalloc(core::mem::size_of::<IOInterruptSource>()) as *mut IOInterruptSource;
let source_bytes = irq.to_ne_bytes();
let vector_data =
unsafe { __ZN6OSData9withBytesEPKvj(source_bytes.as_ptr() as *const core::ffi::c_void, 4) };
unsafe {
(*interrupt_sources).interrupt_controller = ic;
(*interrupt_sources).vector_data = vector_data;
}
unsafe {
let interrupt_sources_ptr = (nub as *mut u8).offset(0x80) as *mut *mut IOInterruptSource;
*interrupt_sources_ptr = interrupt_sources;
}
let reg: extern "C" fn(
*mut _,
*mut c_void,
i32,
*mut c_void,
IOInterruptHandler,
*mut c_void,
) -> i32 = vf(ic as _, VT_REGISTER_INT);
let signed_handler = unsafe {
let handler_ptr = crate::pac::ptrauth_sign(handler as *const u8, 0xd36);
core::mem::transmute::<*const u8, IOInterruptHandler>(handler_ptr)
};
let kr = reg(ic, nub as *mut c_void, 0, target, signed_handler, refcon);
if kr != 0 {
return kr;
}
let en: extern "C" fn(*mut _, *mut c_void, i32) -> i32 = vf(ic as _, VT_ENABLE_INT);
en(ic, nub as *mut c_void, 0)
}
#[repr(C)]
struct IOPlatformExpert {
_p: [u8; 0],
}
#[repr(C)]
struct IOInterruptController {
_p: [u8; 0],
}
#[repr(C)]
struct OSSymbol {
_p: [u8; 0],
}
#[repr(C)]
struct OSData {
_p: [u8; 0],
}
#[repr(C)]
struct IOInterruptSource {
interrupt_controller: *mut IOInterruptController,
vector_data: *mut OSData,
}
#[inline(always)]
fn vf<T>(obj: *mut c_void, slot: isize) -> T
where
T: Copy,
{
let vtable_ptr = unsafe { *(obj as *const *const usize) };
let vtable = unsafe { crate::pac::ptrauth_strip_data(vtable_ptr as *const u8) as *const usize };
let entry = unsafe { *vtable.offset(slot) };
let entry_ptr = unsafe { crate::pac::ptrauth_strip_data(entry as *const u8) };
unsafe { core::mem::transmute_copy::<*const u8, T>(&entry_ptr) }
}
+22
View File
@@ -0,0 +1,22 @@
#!/bin/bash
QEMUAppleSilicon/build/qemu-system-aarch64 \
-M t8030,memory-backend=ram,trustcache=iPhone11_8_iPhone12_1_14.0_18A5351d_Restore/Firmware/038-44135-124.dmg.trustcache,ticket=root_ticket.der,sep-fw=sep-firmware.n104.RELEASE.new.img4,sep-rom=AppleSEPROM-Cebu-B1,kaslr-off=true,usb-conn-type=unix,usb-conn-addr=/Users/oleavr/src/frida-barebone-ios/usb.socket \
-object memory-backend-file,id=ram,size=4G,mem-path="/Volumes/RAM Disk/ios-dram",share=on \
-kernel iPhone11_8_iPhone12_1_14.0_18A5351d_Restore/kernelcache.research.iphone12b \
-dtb iPhone11_8_iPhone12_1_14.0_18A5351d_Restore/Firmware/all_flash/DeviceTree.n104ap.im4p \
-append "tlto_us=-1 mtxspin=-1 agm-genuine=1 agm-authentic=1 agm-trusted=1 serial=3 launchd_unsecure_cache=1 wdt=-1" \
-smp 7 \
-drive file=sep_nvram,if=pflash,format=qcow2 \
-drive file=sep_ssc,if=pflash,format=qcow2 \
-drive file=nvme.1,format=qcow2,if=none,id=drive.1 -device nvme-ns,drive=drive.1,bus=nvme-bus.0,nsid=1,nstype=1,logical_block_size=4096,physical_block_size=4096 \
-drive file=nvme.2,format=qcow2,if=none,id=drive.2 -device nvme-ns,drive=drive.2,bus=nvme-bus.0,nsid=2,nstype=2,logical_block_size=4096,physical_block_size=4096 \
-drive file=nvme.3,format=qcow2,if=none,id=drive.3 -device nvme-ns,drive=drive.3,bus=nvme-bus.0,nsid=3,nstype=3,logical_block_size=4096,physical_block_size=4096 \
-drive file=nvme.4,format=qcow2,if=none,id=drive.4 -device nvme-ns,drive=drive.4,bus=nvme-bus.0,nsid=4,nstype=4,logical_block_size=4096,physical_block_size=4096 \
-drive file=nvram,if=none,format=qcow2,id=nvram -device apple-nvram,drive=nvram,bus=nvme-bus.0,nsid=5,nstype=5,id=nvram,logical_block_size=4096,physical_block_size=4096 \
-drive file=nvme.6,format=qcow2,if=none,id=drive.6 -device nvme-ns,drive=drive.6,bus=nvme-bus.0,nsid=6,nstype=6,logical_block_size=4096,physical_block_size=4096 \
-drive file=nvme.7,format=qcow2,if=none,id=drive.7 -device nvme-ns,drive=drive.7,bus=nvme-bus.0,nsid=7,nstype=8,logical_block_size=4096,physical_block_size=4096 \
-initrd iPhone11_8_iPhone12_1_14.0_18A5351d_Restore/038-44135-124.dmg \
-serial mon:stdio \
-monitor tcp:127.0.0.1:9001,server,nowait \
-gdb tcp::9000
File diff suppressed because it is too large. Load diff
@@ -0,0 +1,40 @@
<dict ID="0">
<key>IOPlatformInterruptController</key>
<string ID="1">IOCPUInterruptController is not serializable</string>
<key>IOInterruptController0000001A</key>
<string ID="2">AppleInterruptController is not serializable</string>
<key>IOInterruptController00000048</key>
<string ID="3">AppleS5L8960XGPIOIC is not serializable</string>
<key>IOInterruptController00000047</key>
<string ID="4">AppleS5L8960XGPIOIC is not serializable</string>
<key>IOInterruptController00000023</key>
<string ID="5">AppleS5L8960XGPIOIC is not serializable</string>
<key>IOInterruptController00000049</key>
<string ID="6">AppleS5L8960XGPIOIC is not serializable</string>
<key>IOInterruptController0000008B</key>
<string ID="7">AppleT8015SPMIController is not serializable</string>
<key>IOInterruptController00000084</key>
<string ID="8">AppleT8015SPMIController is not serializable</string>
<key>ApplePCIEMSIController-apcie</key>
<string ID="9">ApplePCIEMSIController is not serializable</string>
<key>AppleEmbeddedPCIEPort2</key>
<string ID="10">AppleT8030PCIePort is not serializable</string>
<key>AppleEmbeddedPCIEPort3</key>
<string ID="11">AppleT8030PCIePort is not serializable</string>
<key>IOInterruptController00000087</key>
<string ID="12">AppleT8015SPMIController is not serializable</string>
<key>IOInterruptController0000005F</key>
<string ID="13">AppleSMCPMU is not serializable</string>
</dict>
+33
View File
@@ -0,0 +1,33 @@
const osSerialize_withCapacity = new NativeFunction(ptr('0xfffffff007fbf074'), 'pointer', ['uint']);
const UNPAC_MASK = ptr('0xfffffff000000000');
const serializer = osSerialize_withCapacity(4096);
const gIOInterruptControllers = ptr('0xfffffff009a3f090').readPointer();
const serialize = new NativeFunction(implFor(6, vtableOf(gIOInterruptControllers)), 'uint' /* 'bool' */, ['pointer', 'pointer']);
console.log('serialize() is at:', serialize.handle);
const result = serialize(gIOInterruptControllers, serializer);
console.log('result returned:', result);
const getText = new NativeFunction(implFor(15, vtableOf(serializer)), 'pointer', ['pointer']);
const text = getText(serializer);
console.log('Got text:', text.readUtf8String(text));
const release = new NativeFunction(implFor(5, vtableOf(serializer)), 'void', ['pointer']);
release(serializer);
Object.assign(globalThis, { osSerialize_withCapacity });
function implFor(n, vtable) {
return unpac(vtable.add(n * Process.pointerSize).readPointer());
}
function vtableOf(instance) {
return unpac(instance.readPointer());
}
function unpac(p) {
return p.or(UNPAC_MASK);
}
@@ -0,0 +1,37 @@
import os
import r2pipe
def scan_files_for_pattern(directory, hex_pattern, file_extension=None):
search_command = "/xj " + hex_pattern.strip()
for root, _, files in os.walk(directory):
for filename in files:
if file_extension and not filename.endswith(file_extension):
continue
file_path = os.path.join(root, filename)
try:
r2 = r2pipe.open(file_path, flags=["-n"])
r2.cmd("e io.cache=true")
result = r2.cmdj(search_command)
if result:
print(f"Found in {file_path}:")
for match in result:
print(f" - Offset: 0x{match['offset']:x}")
r2.quit()
except Exception as e:
print(f" Error processing {file_path}: {e}")
if __name__ == "__main__":
import argparse
parser = argparse.ArgumentParser(description="Scan dump files for a hex pattern using r2pipe.")
parser.add_argument("directory", help="Directory containing dump files")
parser.add_argument("pattern", help="Hex pattern to search (e.g. 'ff ff ff ff')")
parser.add_argument("--ext", help="Only scan files with this extension", default=None)
args = parser.parse_args()
scan_files_for_pattern(args.directory, args.pattern, args.ext)
+140
View File
@@ -0,0 +1,140 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import argparse
import re
import subprocess
import sys
def main():
parser = argparse.ArgumentParser(description="Symbolicate panic backtrace from kernel log")
parser.add_argument("--log-file", type=argparse.FileType("r"), required=True,
help="Path to the kernel log file")
parser.add_argument("--elf-file", type=str, required=True,
help="Path to the ELF file for symbolication")
parser.add_argument("--base-address", type=lambda x: int(x, 16), required=True,
help="Base address where the ELF was loaded (e.g., 0xffffffe8195f0000)")
parser.add_argument("--verbose", "-v", action="store_true",
help="Show all backtrace frames, not just symbolicated ones")
args = parser.parse_args()
log_content = args.log_file.read()
args.log_file.close()
frames = find_last_panic(log_content)
if not frames:
print("No panic found in the log file", file=sys.stderr)
return 1
print(f"Found last panic with {len(frames)} backtrace frames")
print(f"ELF base address: 0x{args.base_address:x}")
print(f"ELF file: {args.elf_file}")
print()
symbolicated_count = 0
for i, (lr_str, fp_str) in enumerate(frames):
lr_addr = int(lr_str, 16)
#fp_addr = int(fp_str, 16)
if lr_addr >= args.base_address:
function, location = symbolicate_address(args.elf_file, lr_addr, args.base_address)
offset = lr_addr - args.base_address
print(f"Frame {i:2d}: lr: {lr_str} (offset: 0x{offset:x}) fp: {fp_str}")
# Color the function name based on resolution status
if function == "<unknown>":
colored_function = Colors.bold_yellow(function)
elif function == "<error>":
colored_function = Colors.bold_red(function)
else:
colored_function = Colors.bold_green(function)
print(f" -> {colored_function}")
print(f" {location}")
print()
symbolicated_count += 1
elif args.verbose:
print(f"Frame {i:2d}: lr: {lr_str} fp: {fp_str} (outside ELF range)")
if symbolicated_count == 0:
print("No addresses found within the ELF address range")
if not args.verbose:
print("Use --verbose to see all frames")
else:
print(f"Symbolicated {symbolicated_count} frame(s)")
return 0
def find_last_panic(log_content: str):
panic_pattern = re.compile(
r"panic\(.*?\n.*?Panicked thread:.*?\n((?:\s*lr:\s*0x[0-9a-fA-F]+\s*fp:\s*0x[0-9a-fA-F]+\n)*)",
re.DOTALL
)
panics = list(panic_pattern.finditer(log_content))
if not panics:
return None
last_panic = panics[-1]
backtrace_section = last_panic.group(1)
lr_fp_pattern = re.compile(r"lr:\s*(0x[0-9a-fA-F]+)\s*fp:\s*(0x[0-9a-fA-F]+)")
frames = lr_fp_pattern.findall(backtrace_section)
return frames
def symbolicate_address(elf_path: str, address: int, base_address: int):
try:
offset = address - base_address
result = subprocess.run([
"aarch64-none-elf-addr2line", "-e", elf_path, "-f", "-C", f"0x{offset:x}"
], capture_output=True, text=True, check=True)
lines = result.stdout.strip().split("\n")
if len(lines) >= 2:
function = lines[0]
location = lines[1]
if function == "??":
function = "<unknown>"
if location == "??:0" or location == "??:?":
location = "<unknown>"
return function, location
else:
return "<unknown>", "<unknown>"
except (subprocess.CalledProcessError, FileNotFoundError):
return "<error>", "<error>"
class Colors:
BOLD = "\033[1m"
GREEN = "\033[32m"
YELLOW = "\033[33m"
RED = "\033[31m"
RESET = "\033[0m"
@staticmethod
def bold_green(text: str):
return f"{Colors.BOLD}{Colors.GREEN}{text}{Colors.RESET}"
@staticmethod
def bold_yellow(text: str):
return f"{Colors.BOLD}{Colors.YELLOW}{text}{Colors.RESET}"
@staticmethod
def bold_red(text: str):
return f"{Colors.BOLD}{Colors.RED}{text}{Colors.RESET}"
if __name__ == "__main__":
sys.exit(main())
+104 -24
View File
@@ -14,59 +14,83 @@ namespace Frida.Barebone {
get;
}
public abstract size_t size {
get;
}
public abstract async void deallocate (Cancellable? cancellable) throws Error, IOError;
}
public sealed class SimpleAllocator : Object, Allocator {
public sealed class NullAllocator : Object, Allocator {
public size_t page_size {
get { return _page_size; }
get {
return _page_size;
}
}
private size_t _page_size;
public NullAllocator (size_t page_size) {
this._page_size = page_size;
}
public async Allocation allocate (size_t size, size_t alignment, Cancellable? cancellable) throws Error, IOError {
throw new Error.NOT_SUPPORTED ("To enable this feature, specify an allocator in your FRIDA_BAREBONE_CONFIG");
}
}
public sealed class PhysicalAllocator : Object, Allocator {
public size_t page_size {
get {
return _page_size;
}
}
private Machine machine;
private size_t _page_size;
private uint64 base_pa;
private uint64 cursor;
public SimpleAllocator (Machine machine, size_t page_size, uint64 base_pa) {
public PhysicalAllocator (Machine machine, size_t page_size, PhysicalAllocatorConfig config) {
this.machine = machine;
this._page_size = page_size;
this.base_pa = base_pa;
this.cursor = base_pa;
this.cursor = config.physical_base.address;
}
public async Allocation allocate (size_t size, size_t alignment, Cancellable? cancellable) throws Error, IOError {
if (base_pa == 0) {
uint64 example_base;
if ("corellium" in machine.gdb.features)
example_base = 0x0800000000 + ((2048 - 3) * 1024 * 1024);
else
example_base = 0x0040000000 + (128 * 1024 * 1024);
throw new Error.NOT_SUPPORTED ("To enable this feature, set FRIDA_BAREBONE_HEAP_BASE to the physical " +
"base address to use, e.g. 0x%" + uint64.FORMAT_MODIFIER + "x", example_base);
}
uint64 address_pa = cursor;
size_t vm_size = round_size_up (size, page_size);
size_t vm_size = round_size_up (size, _page_size);
cursor += vm_size;
uint num_pages = (uint) (vm_size / page_size);
uint num_pages = (uint) (vm_size / _page_size);
Allocation page_allocation = yield machine.allocate_pages (address_pa, num_pages, cancellable);
var physical_addresses = new Gee.ArrayList<uint64?> ();
for (uint i = 0; i != num_pages; i++)
physical_addresses.add (address_pa + (i * _page_size));
return new SimpleAllocation (page_allocation);
Allocation page_allocation = yield machine.allocate_pages (physical_addresses, cancellable);
return new PhysicalAllocation (page_allocation);
}
private class SimpleAllocation : Object, Allocation {
private class PhysicalAllocation : Object, Allocation {
public uint64 virtual_address {
get { return page_allocation.virtual_address; }
get {
return page_allocation.virtual_address;
}
}
public size_t size {
get {
return page_allocation.size;
}
}
private Allocation page_allocation;
public SimpleAllocation (Allocation page_allocation) {
this.page_allocation = page_allocation;
public PhysicalAllocation (Allocation allocation) {
page_allocation = allocation;
}
public async void deallocate (Cancellable? cancellable) throws Error, IOError {
@@ -75,4 +99,60 @@ namespace Frida.Barebone {
}
}
}
public sealed class TargetFunctionsAllocator : Object, Allocator {
public size_t page_size {
get {
return _page_size;
}
}
private Machine machine;
private size_t _page_size;
private TargetFunctionsAllocatorConfig config;
public TargetFunctionsAllocator (Machine machine, size_t page_size, TargetFunctionsAllocatorConfig config) {
this.machine = machine;
this._page_size = page_size;
this.config = config;
}
public async Allocation allocate (size_t size, size_t alignment, Cancellable? cancellable) throws Error, IOError {
uint64 address = yield machine.invoke (config.alloc_function.address, { size }, cancellable);
// TODO: Handle alignment.
return new TargetAllocation (address, size, machine, config);
}
private class TargetAllocation : Object, Allocation {
public uint64 virtual_address {
get {
return _virtual_address;
}
}
public size_t size {
get {
return _size;
}
}
private uint64 _virtual_address;
public size_t _size;
private Machine machine;
private TargetFunctionsAllocatorConfig config;
public TargetAllocation (uint64 address, size_t size, Machine m, TargetFunctionsAllocatorConfig c) {
_virtual_address = address;
_size = size;
machine = m;
config = c;
}
public async void deallocate (Cancellable? cancellable) throws Error, IOError {
yield machine.invoke (config.free_function.address, { _virtual_address, size }, cancellable);
}
}
}
}
+11 -3
View File
@@ -26,16 +26,25 @@ namespace Frida.Barebone {
return 4096;
}
public async uint query_exception_level (Cancellable? cancellable) throws Error, IOError {
throw_not_supported ();
}
public async void enumerate_ranges (Gum.PageProtection prot, FoundRangeFunc func, Cancellable? cancellable)
throws Error, IOError {
throw_not_supported ();
}
public async Allocation allocate_pages (uint64 physical_address, uint num_pages, Cancellable? cancellable)
public async Allocation allocate_pages (Gee.List<uint64?> physical_addresses, Cancellable? cancellable)
throws Error, IOError {
throw_not_supported ();
}
public async void protect_pages (uint64 virtual_address, size_t size, Gum.PageProtection prot,
Cancellable? cancellable) throws Error, IOError {
throw_not_supported ();
}
public async Gee.List<uint64?> scan_ranges (Gee.List<Gum.MemoryRange?> ranges, MatchPattern pattern, uint max_matches,
Cancellable? cancellable) throws Error, IOError {
throw_not_supported ();
@@ -45,8 +54,7 @@ namespace Frida.Barebone {
throw_not_supported ();
}
public async uint64 invoke (uint64 impl, uint64[] args, uint64 landing_zone, Cancellable? cancellable)
throws Error, IOError {
public async uint64 invoke (uint64 impl, uint64[] args, Cancellable? cancellable) throws Error, IOError {
throw_not_supported ();
}
+438 -33
View File
@@ -25,6 +25,13 @@ namespace Frida.Barebone {
private const uint64 INT6_MASK = 0x3fULL;
private const uint64 INT48_MASK = 0xffffffffffffULL;
private const uint64 TABLE_PXN_BIT = 1ULL << 59;
private const uint64 UXN_BIT = 1ULL << 54;
private const uint64 PXN_BIT = 1ULL << 53;
private const uint64 AP1_BIT = 1ULL << 7;
private const uint64 AP0_BIT = 1ULL << 6;
public Arm64Machine (GDB.Client gdb) {
Object (gdb: gdb);
}
@@ -35,6 +42,17 @@ namespace Frida.Barebone {
return p.granule;
}
public async uint query_exception_level (Cancellable? cancellable) throws Error, IOError {
GDB.Exception? exception = gdb.exception;
if (exception == null)
throw new Error.INVALID_OPERATION ("Unable to query in current state");
GDB.Thread thread = exception.thread;
var cpsr = yield thread.read_register ("cpsr", cancellable);
return (uint) ((cpsr >> 2) & 3);
}
public async void enumerate_ranges (Gum.PageProtection prot, FoundRangeFunc func, Cancellable? cancellable)
throws Error, IOError {
Gee.List<RangeDetails> ranges = ("corellium" in gdb.features)
@@ -55,7 +73,7 @@ namespace Frida.Barebone {
yield set_addressing_mode (gdb, PHYSICAL, cancellable);
try {
yield collect_ranges_in_table (p.tt1, p.first_level, p.upper_bits, p.granule, result, cancellable);
yield collect_ranges_in_table (p.tt1, p.first_level, p.upper_bits, p, result, cancellable);
} finally {
set_addressing_mode.begin (gdb, VIRTUAL, null);
}
@@ -63,30 +81,30 @@ namespace Frida.Barebone {
return result;
}
private async void collect_ranges_in_table (uint64 table_address, uint level, uint64 upper_bits, Granule granule,
private async void collect_ranges_in_table (uint64 table_address, uint level, uint64 upper_bits, MMUParameters p,
Gee.List<RangeDetails> ranges, Cancellable? cancellable) throws Error, IOError {
uint max_entries = compute_max_entries (level, granule);
uint max_entries = compute_max_entries (level, p);
Buffer entries = yield gdb.read_buffer (table_address, max_entries * Descriptor.SIZE, cancellable);
uint shift = address_shift_at_level (level, granule);
uint shift = address_shift_at_level (level, p.granule);
for (uint i = 0; i != max_entries; i++) {
uint64 raw_descriptor = entries.read_uint64 (i * Descriptor.SIZE);
Descriptor desc = Descriptor.parse (raw_descriptor, level, granule);
Descriptor desc = Descriptor.parse (raw_descriptor, level, p.granule);
if (desc.kind == INVALID)
continue;
uint64 address = upper_bits | ((uint64) i << shift);
if (desc.kind == BLOCK) {
size_t size = 1 << num_block_bits_at_level (level, granule);
Gum.PageProtection prot = protection_from_flags (desc.flags);
size_t size = 1 << num_block_bits_at_level (level, p.granule);
Gum.PageProtection prot = protection_from_flags (desc.flags, p);
ranges.add (new RangeDetails (address, desc.target_address, size, prot, MappingType.UNKNOWN));
continue;
}
yield collect_ranges_in_table (desc.target_address, level + 1, address, granule, ranges, cancellable);
yield collect_ranges_in_table (desc.target_address, level + 1, address, p, ranges, cancellable);
}
}
@@ -145,33 +163,35 @@ namespace Frida.Barebone {
return result;
}
public async Allocation allocate_pages (uint64 physical_address, uint num_pages, Cancellable? cancellable)
public async Allocation allocate_pages (Gee.List<uint64?> physical_addresses, Cancellable? cancellable)
throws Error, IOError {
MMUParameters p = yield MMUParameters.load (gdb, cancellable);
yield set_addressing_mode (gdb, PHYSICAL, cancellable);
try {
Allocation? allocation = yield maybe_insert_descriptor_in_table (physical_address, num_pages, p.tt1,
p.first_level, p.upper_bits, p.granule, cancellable);
Allocation? allocation = yield maybe_insert_descriptor_in_table (physical_addresses, p.tt1, p.first_level,
p.upper_bits, p, cancellable);
if (allocation == null)
throw new Error.NOT_SUPPORTED ("Unable to insert page table mapping; please file a bug");
return allocation;
} finally {
set_addressing_mode.begin (gdb, VIRTUAL, null);
}
}
private async Allocation? maybe_insert_descriptor_in_table (uint64 physical_address, uint num_pages,
uint64 table_address, uint level, uint64 upper_bits, Granule granule, Cancellable? cancellable)
private async Allocation? maybe_insert_descriptor_in_table (Gee.List<uint64?> physical_addresses,
uint64 table_address, uint level, uint64 upper_bits, MMUParameters p, Cancellable? cancellable)
throws Error, IOError {
uint max_entries = compute_max_entries (level, granule);
uint shift = address_shift_at_level (level, granule);
uint max_entries = compute_max_entries (level, p);
uint shift = address_shift_at_level (level, p.granule);
uint64 first_available_va = 0;
uint64 first_available_slot = 0;
uint num_available_slots = 0;
uint chunk_max_size = (level < 3) ? 4 : 64;
uint chunk_offset = 0;
uint num_pages = physical_addresses.size;
while (chunk_offset != max_entries && num_available_slots != num_pages) {
uint64 chunk_base_address = table_address + (chunk_offset * Descriptor.SIZE);
uint chunk_size = uint.min (chunk_max_size, max_entries - chunk_offset);
@@ -184,13 +204,15 @@ namespace Frida.Barebone {
uint table_index = chunk_offset + i;
uint64 address = upper_bits | ((uint64) table_index << shift);
Descriptor desc = Descriptor.parse (raw_descriptor, level, granule);
Descriptor desc = Descriptor.parse (raw_descriptor, level, p.granule);
if (level < 3) {
if (desc.kind != TABLE)
continue;
Allocation? allocation = yield maybe_insert_descriptor_in_table (physical_address,
num_pages, desc.target_address, level + 1, address, granule, cancellable);
if ((desc.flags & DescriptorFlags.PXNTABLE) != 0)
continue;
Allocation? allocation = yield maybe_insert_descriptor_in_table (physical_addresses,
desc.target_address, level + 1, address, p, cancellable);
if (allocation != null)
return allocation;
continue;
@@ -215,26 +237,205 @@ namespace Frida.Barebone {
if (num_available_slots != num_pages)
return null;
Gum.PageProtection page_prot = Gum.PageProtection.READ | Gum.PageProtection.WRITE;
if (!p.sprr_enabled)
page_prot |= Gum.PageProtection.EXECUTE;
var builder = gdb.make_buffer_builder ();
for (uint i = 0; i != num_available_slots; i++) {
uint64 cur_physical_address = physical_address + (i * granule);
uint64 new_descriptor = cur_physical_address | 0x40000000000403ULL;
uint64 base_descriptor = physical_addresses[(int) i] | 0x403ULL;
uint64 new_descriptor = apply_protection_bits (base_descriptor, page_prot, p);
builder.append_uint64 (new_descriptor);
}
Bytes new_descriptors = builder.build ();
Bytes old_descriptors = yield gdb.read_byte_array (first_available_slot, new_descriptors.get_size (), cancellable);
yield gdb.write_byte_array (first_available_slot, new_descriptors, cancellable);
return new DescriptorAllocation (first_available_va, first_available_slot, old_descriptors, gdb);
size_t size = num_pages * p.granule;
return new DescriptorAllocation (first_available_va, size, first_available_slot, old_descriptors, gdb);
}
public async void protect_pages (uint64 virtual_address, size_t size, Gum.PageProtection prot, Cancellable? cancellable)
throws Error, IOError {
MMUParameters p = yield MMUParameters.load (gdb, cancellable);
yield set_addressing_mode (gdb, PHYSICAL, cancellable);
try {
uint64 page_mask = p.granule - 1;
uint64 aligned_va = virtual_address & ~page_mask;
uint64 aligned_end = (virtual_address + size + page_mask) & ~page_mask;
uint num_pages = (uint) ((aligned_end - aligned_va) / p.granule);
yield perform_protect_pages (aligned_va, num_pages, prot, p, cancellable);
} finally {
set_addressing_mode.begin (gdb, VIRTUAL, null);
}
}
private async void perform_protect_pages (uint64 start_va, uint num_pages, Gum.PageProtection prot, MMUParameters p,
Cancellable? cancellable) throws Error, IOError {
var table_cache = new TableWalkCache ();
uint pages_processed = 0;
var processed_tables = new Gee.HashSet<uint64?> (Numeric.uint64_hash, Numeric.uint64_equal);
bool need_exec = (prot & Gum.PageProtection.EXECUTE) != 0;
while (pages_processed != num_pages) {
uint64 current_va = start_va + (uint64) pages_processed * p.granule;
uint64 table_pa = yield find_level3_table (current_va, p, table_cache, cancellable);
if (need_exec && !processed_tables.contains (table_pa)) {
yield clear_pxn_table_bits_for_va (current_va, p, table_cache, cancellable);
processed_tables.add (table_pa);
}
uint level3_shift = address_shift_at_level (3, p.granule);
uint64 level3_mask = (1ULL << level3_shift) - 1;
uint64 table_base_va = current_va & ~level3_mask;
uint64 table_end_va = table_base_va + (1ULL << level3_shift);
uint64 remaining_va = start_va + num_pages * p.granule;
uint64 batch_end_va = uint64.min (remaining_va, table_end_va);
uint batch_size = (uint) ((batch_end_va - current_va) / p.granule);
yield protect_pages_in_table (current_va, batch_size, prot, table_pa, p, cancellable);
pages_processed += batch_size;
}
}
private async void protect_pages_in_table (uint64 current_va, uint batch_size, Gum.PageProtection prot,
uint64 table_pa, MMUParameters p, Cancellable? cancellable) throws Error, IOError {
uint index_bits = num_address_bits_at_level (3, p);
uint index_shift = inpage_bits_for_granule (p.granule);
uint index_mask = (1U << index_bits) - 1;
uint64 first_index = (current_va >> index_shift) & index_mask;
uint64 first_slot_pa = table_pa + (first_index * Descriptor.SIZE);
Buffer descriptors = yield gdb.read_buffer (first_slot_pa, batch_size * Descriptor.SIZE, cancellable);
bool any_changed = false;
for (uint i = 0; i != batch_size; i++) {
uint64 raw_desc = descriptors.read_uint64 (i * Descriptor.SIZE);
uint64 new_desc = apply_protection_bits (raw_desc, prot, p);
if (new_desc != raw_desc) {
descriptors.write_uint64 (i * Descriptor.SIZE, new_desc);
any_changed = true;
}
}
if (any_changed)
yield gdb.write_byte_array (first_slot_pa, descriptors.bytes, cancellable);
}
private async uint64 find_level3_table (uint64 va, MMUParameters p, TableWalkCache cache, Cancellable? cancellable)
throws Error, IOError {
TableWalkResult? cached = cache.lookup (va, p);
if (cached != null)
return yield walk_to_level3 (va, cached.table_pa, cached.level, p, cache, cancellable);
return yield walk_to_level3 (va, p.tt1, p.first_level, p, cache, cancellable);
}
private async uint64 walk_to_level3 (uint64 va, uint64 start_table_pa, uint start_level, MMUParameters p,
TableWalkCache cache, Cancellable? cancellable) throws Error, IOError {
uint64 table_pa = start_table_pa;
uint level = start_level;
while (level != 3) {
cache.store (va, level, table_pa, p);
uint shift = address_shift_at_level (level, p.granule);
uint entries = compute_max_entries (level, p);
uint index = (uint) ((va >> shift) & (entries - 1));
uint64 slot_pa = table_pa + ((uint64) index * Descriptor.SIZE);
Buffer d_buf = yield gdb.read_buffer (slot_pa, Descriptor.SIZE, cancellable);
uint64 raw = d_buf.read_uint64 (0);
Descriptor desc = Descriptor.parse (raw, level, p.granule);
if (desc.kind != TABLE)
throw new Error.NOT_SUPPORTED ("Walk failed at level %u", level);
table_pa = desc.target_address;
level++;
}
return table_pa;
}
private async void clear_pxn_table_bits_for_va (uint64 va, MMUParameters p, TableWalkCache cache, Cancellable? cancellable)
throws Error, IOError {
uint64 table_pa = p.tt1;
for (uint level = p.first_level; level != 3; level++) {
uint entries = compute_max_entries (level, p);
uint shift = address_shift_at_level (level, p.granule);
uint index = (uint) ((va >> shift) & (entries - 1));
uint64 slot_pa = table_pa + (index * Descriptor.SIZE);
Buffer d_buf = yield gdb.read_buffer (slot_pa, Descriptor.SIZE, cancellable);
uint64 raw_desc = d_buf.read_uint64 (0);
Descriptor desc = Descriptor.parse (raw_desc, level, p.granule);
if (desc.kind != TABLE)
break;
if ((raw_desc & TABLE_PXN_BIT) != 0) {
uint64 new_desc = raw_desc & ~TABLE_PXN_BIT;
d_buf.write_uint64 (0, new_desc);
yield gdb.write_byte_array (slot_pa, d_buf.bytes, cancellable);
}
table_pa = desc.target_address;
}
}
private class TableWalkCache {
private Gee.Map<uint64?, TableWalkResult> cache =
new Gee.HashMap<uint64?, TableWalkResult> (Numeric.uint64_hash, Numeric.uint64_equal);
public TableWalkResult? lookup (uint64 va, MMUParameters p) {
for (int level = 2; level >= (int) p.first_level; level--) {
uint64 cache_key = compute_cache_key (va, (uint) level, p);
TableWalkResult? result = cache[cache_key];
if (result != null)
return result;
}
return null;
}
public void store (uint64 va, uint level, uint64 table_pa, MMUParameters p) {
if (level >= 3)
return;
uint64 cache_key = compute_cache_key (va, level, p);
cache[cache_key] = new TableWalkResult () {
table_pa = table_pa,
level = level
};
}
private uint64 compute_cache_key (uint64 va, uint level, MMUParameters p) {
uint shift = address_shift_at_level (level + 1, p.granule);
return (va >> shift) << shift;
}
}
private class TableWalkResult {
public uint64 table_pa;
public uint level;
}
public async Gee.List<uint64?> scan_ranges (Gee.List<Gum.MemoryRange?> ranges, MatchPattern pattern, uint max_matches,
Cancellable? cancellable) throws Error, IOError {
unowned uint8[] scanner_blob = Data.Barebone.get_memory_scanner_arm64_elf_blob ().data;
var raw_scanner = new Bytes.static (scanner_blob);
Gum.ElfModule scanner;
try {
scanner = new Gum.ElfModule.from_blob (new Bytes.static (scanner_blob));
scanner = new Gum.ElfModule.from_blob (raw_scanner);
} catch (Gum.Error e) {
throw new Error.NOT_SUPPORTED ("%s", e.message);
}
@@ -293,13 +494,17 @@ namespace Frida.Barebone {
uint64 module_page_pa = page_start (module_pa, page_size);
Allocation module_allocation = yield allocate_pages (module_page_pa, num_pages, cancellable);
var module_pas = new Gee.ArrayList<uint64?> ();
for (uint i = 0; i != num_pages; i++)
module_pas.add (module_page_pa + (i * page_size)); // FIXME: This assumes a contiguous range.
Allocation module_allocation = yield allocate_pages (module_pas, cancellable);
size_t page_offset = (size_t) (module_pa - module_page_pa);
uint64 module_va = module_allocation.virtual_address + page_offset;
uint64 data_va = module_va + data_offset;
Bytes scanner_module = relocate (scanner, module_va);
Bytes scanner_module = relocate (scanner, raw_scanner, module_va);
Bytes original_memory = yield gdb.read_byte_array (module_va, vm_size, cancellable);
yield gdb.write_byte_array (module_va, scanner_module, cancellable);
@@ -354,14 +559,17 @@ namespace Frida.Barebone {
case ABS64:
relocated.write_uint64 ((size_t) r.address, base_va + r.symbol.address + r.addend);
break;
case PREL32:
var diff = (int64) (base_va + r.symbol.address + r.addend) - (int64) (base_va + r.address);
relocated.write_int32 ((size_t) r.address, (int32) diff);
break;
default:
throw new Error.NOT_SUPPORTED ("Unsupported relocation type: %s",
Marshal.enum_to_nick<Gum.ElfArm64Relocation> (type));
}
}
public async uint64 invoke (uint64 impl, uint64[] args, uint64 landing_zone, Cancellable? cancellable)
throws Error, IOError {
public async uint64 invoke (uint64 impl, uint64[] args, Cancellable? cancellable) throws Error, IOError {
if (args.length > 8)
throw new Error.NOT_SUPPORTED ("Unsupported number of arguments; please open a PR");
@@ -377,6 +585,7 @@ namespace Frida.Barebone {
regs["pc"] = impl;
uint64 landing_zone = saved_regs["pc"].get_uint64 ();
regs["x30"] = landing_zone;
uint64 sp = saved_regs["sp"].get_uint64 ();
@@ -406,6 +615,35 @@ namespace Frida.Barebone {
return retval;
}
public async void execute (uint64 start, uint64 end, Cancellable? cancellable) throws Error, IOError {
bool was_running = gdb.state != STOPPED;
if (was_running)
yield gdb.stop (cancellable);
GDB.Thread thread = gdb.exception.thread;
Gee.Map<string, Variant> saved_regs = yield thread.read_registers (cancellable);
var regs = new Gee.HashMap<string, Variant> ();
regs.set_all (saved_regs);
regs["pc"] = start;
yield thread.write_registers (regs, cancellable);
GDB.Breakpoint bp = yield gdb.add_breakpoint (SOFT, end, 4, cancellable);
GDB.Exception ex = null;
do {
ex = yield gdb.continue_until_exception (cancellable);
} while (ex.breakpoint != bp || ex.thread.id != thread.id);
// TODO: Improve GDB.Client to guarantee a single GDB.Thread instance per ID.
yield bp.remove (cancellable);
yield thread.write_registers (saved_regs, cancellable);
if (was_running)
yield gdb.continue (cancellable);
}
public async CallFrame load_call_frame (GDB.Thread thread, uint arity, Cancellable? cancellable) throws Error, IOError {
var regs = yield thread.read_registers (cancellable);
@@ -689,6 +927,10 @@ namespace Frida.Barebone {
public uint first_level;
public uint64 upper_bits;
public uint64 tt1;
public uint t1sz;
public bool sprr_enabled;
public uint64 sprr_perm;
public static async MMUParameters load (GDB.Client gdb, Cancellable? cancellable) throws Error, IOError {
GDB.Exception? exception = gdb.exception;
@@ -716,6 +958,10 @@ namespace Frida.Barebone {
parameters.upper_bits |= 1ULL << (63 - i);
parameters.tt1 = regs.ttbr1 & INT48_MASK;
parameters.t1sz = t1sz;
parameters.sprr_enabled = (regs.sprr_config & 1) != 0;
parameters.sprr_perm = regs.sprr_perm;
return parameters;
}
@@ -724,6 +970,8 @@ namespace Frida.Barebone {
private class MMURegisters {
public uint64 tcr;
public uint64 ttbr1;
public uint64 sprr_config;
public uint64 sprr_perm;
public static async MMURegisters read (GDB.Thread thread, Cancellable? cancellable) throws Error, IOError {
var regs = new MMURegisters ();
@@ -741,10 +989,19 @@ namespace Frida.Barebone {
regs.tcr = val;
else if (name == "ttbr1_el1")
regs.ttbr1 = val;
else if (name == "sprr_config_el1")
regs.sprr_config = val;
else if (name == "sprr_el1br1_el1")
regs.sprr_perm = val;
}
} else {
regs.tcr = yield thread.read_register ("tcr_el1", cancellable);
regs.ttbr1 = yield thread.read_register ("ttbr1_el1", cancellable);
try {
regs.sprr_config = yield thread.read_register ("sprr_config_el1", cancellable);
regs.sprr_perm = yield thread.read_register ("sprr_el1br1_el1", cancellable);
} catch (Error e) {
}
}
return regs;
@@ -850,16 +1107,27 @@ namespace Frida.Barebone {
private class DescriptorAllocation : Object, Allocation {
public uint64 virtual_address {
get { return base_va; }
get {
return base_va;
}
}
public size_t size {
get {
return _size;
}
}
private uint64 base_va;
private size_t _size;
private uint64 first_slot;
private Bytes? old_descriptors;
private GDB.Client gdb;
public DescriptorAllocation (uint64 base_va, uint64 first_slot, Bytes old_descriptors, GDB.Client gdb) {
public DescriptorAllocation (uint64 base_va, size_t size, uint64 first_slot, Bytes old_descriptors,
GDB.Client gdb) {
this.base_va = base_va;
this._size = size;
this.first_slot = first_slot;
this.old_descriptors = old_descriptors;
this.gdb = gdb;
@@ -908,11 +1176,23 @@ namespace Frida.Barebone {
assert_not_reached ();
}
private static uint compute_max_entries (uint level, Granule granule) {
return 1 << num_address_bits_at_level (level, granule);
private static uint compute_max_entries (uint level, MMUParameters p) {
return 1 << num_address_bits_at_level (level, p);
}
private static uint num_address_bits_at_level (uint level, Granule granule) {
private static uint num_address_bits_at_level (uint level, MMUParameters p) {
if (level == p.first_level) {
uint available_address_bits = 64 - p.t1sz - inpage_bits_for_granule (p.granule);
uint consumed_by_lower_levels = 0;
for (uint l = level + 1; l <= 3; l++)
consumed_by_lower_levels += unclipped_address_bits_at_level (l, p.granule);
return available_address_bits - consumed_by_lower_levels;
} else {
return unclipped_address_bits_at_level (level, p.granule);
}
}
private static uint unclipped_address_bits_at_level (uint level, Granule granule) {
switch (granule) {
case 4K:
return 9;
@@ -932,7 +1212,7 @@ namespace Frida.Barebone {
private static uint address_shift_at_level (uint level, Granule granule) {
uint shift = inpage_bits_for_granule (granule);
for (int l = 2; l != (int) level - 1; l--)
shift += num_address_bits_at_level (l, granule);
shift += unclipped_address_bits_at_level (l, granule);
return shift;
}
@@ -949,7 +1229,45 @@ namespace Frida.Barebone {
}
}
private static Gum.PageProtection protection_from_flags (DescriptorFlags flags) {
private static Gum.PageProtection protection_from_flags (DescriptorFlags flags, MMUParameters p) {
if (p.sprr_enabled) {
uint idx = 0;
if ((flags & DescriptorFlags.AP_READ_ONLY) != 0)
idx |= 1 << 3;
if ((flags & DescriptorFlags.AP_ALLOW_APPLICATION) != 0)
idx |= 1 << 2;
if ((flags & DescriptorFlags.UXN) != 0)
idx |= 1 << 1;
if ((flags & DescriptorFlags.PXN) != 0)
idx |= 1 << 0;
uint perm = (uint) ((p.sprr_perm >> (idx * 4)) & 0xf);
Gum.PageProtection prot;
switch (perm & 3) {
case 0:
prot = 0;
break;
case 1:
prot = READ | EXECUTE;
if ((perm >> 2) == 2)
prot = EXECUTE;
break;
case 2:
prot = READ;
break;
case 3:
prot = READ | WRITE;
if ((perm >> 2) == 1)
prot = 0;
break;
default:
assert_not_reached ();
}
return prot;
}
Gum.PageProtection prot = READ;
if ((flags & DescriptorFlags.PXN) == 0)
prot |= EXECUTE;
@@ -958,6 +1276,93 @@ namespace Frida.Barebone {
return prot;
}
private static uint64 apply_protection_bits (uint64 descriptor, Gum.PageProtection prot, MMUParameters p) throws Error {
uint64 result = descriptor;
if (p.sprr_enabled) {
uint target_sprr_index = find_sprr_index_for_permissions (prot, p);
result = apply_sprr_index_to_descriptor (result, target_sprr_index);
} else {
result = apply_non_sprr_protection_bits (result, prot);
}
return result;
}
private static uint64 apply_non_sprr_protection_bits (uint64 descriptor, Gum.PageProtection prot) {
uint64 result = descriptor;
bool want_exec = (prot & Gum.PageProtection.EXECUTE) != 0;
bool want_write = (prot & Gum.PageProtection.WRITE) != 0;
if (want_exec)
result &= ~(UXN_BIT | PXN_BIT);
else
result |= (UXN_BIT | PXN_BIT);
if (want_write) {
result &= ~(AP1_BIT | AP0_BIT);
} else {
result |= AP1_BIT;
result &= ~AP0_BIT;
}
return result;
}
private static uint find_sprr_index_for_permissions (Gum.PageProtection prot, MMUParameters p) throws Error {
bool want_read = (prot & Gum.PageProtection.READ) != 0;
bool want_write = (prot & Gum.PageProtection.WRITE) != 0;
bool want_exec = (prot & Gum.PageProtection.EXECUTE) != 0;
for (uint i = 0; i != 16; i++) {
uint perm = (uint) ((p.sprr_perm >> (i * 4)) & 0xf);
bool slot_allows_read = false;
bool slot_allows_write = false;
bool slot_allows_exec = false;
switch (perm & 3) {
case 0:
break;
case 1:
slot_allows_exec = true;
if ((perm >> 2) != 2)
slot_allows_read = true;
break;
case 2:
slot_allows_read = true;
break;
case 3:
slot_allows_read = true;
slot_allows_write = ((perm >> 2) != 1);
break;
}
if (slot_allows_read == want_read && slot_allows_write == want_write && slot_allows_exec == want_exec)
return i;
}
throw new Error.INVALID_ARGUMENT ("No suitable SPRR slot found for protection 0x%x", prot);
}
private static uint64 apply_sprr_index_to_descriptor (uint64 descriptor, uint sprr_index) {
uint64 result = descriptor;
result &= ~(AP1_BIT | AP0_BIT | UXN_BIT | PXN_BIT);
if ((sprr_index & 0x8) != 0)
result |= AP1_BIT;
if ((sprr_index & 0x4) != 0)
result |= AP0_BIT;
if ((sprr_index & 0x2) != 0)
result |= UXN_BIT;
if ((sprr_index & 0x1) != 0)
result |= PXN_BIT;
return result;
}
private static Gum.PageProtection protection_from_corellium_pt_details (string details) {
Gum.PageProtection prot = READ;
if (!("pXN" in details))
+11 -3
View File
@@ -22,15 +22,24 @@ namespace Frida.Barebone {
return 4096;
}
public async uint query_exception_level (Cancellable? cancellable) throws Error, IOError {
throw_not_supported ();
}
public async void enumerate_ranges (Gum.PageProtection prot, FoundRangeFunc func, Cancellable? cancellable)
throws Error, IOError {
}
public async Allocation allocate_pages (uint64 physical_address, uint num_pages, Cancellable? cancellable)
public async Allocation allocate_pages (Gee.List<uint64?> physical_addresses, Cancellable? cancellable)
throws Error, IOError {
throw_not_supported ();
}
public async void protect_pages (uint64 virtual_address, size_t size, Gum.PageProtection prot,
Cancellable? cancellable) throws Error, IOError {
throw_not_supported ();
}
public async Gee.List<uint64?> scan_ranges (Gee.List<Gum.MemoryRange?> ranges, MatchPattern pattern,
uint max_matches, Cancellable? cancellable) throws Error, IOError {
throw_not_supported ();
@@ -40,8 +49,7 @@ namespace Frida.Barebone {
throw_not_supported ();
}
public async uint64 invoke (uint64 impl, uint64[] args, uint64 landing_zone, Cancellable? cancellable)
throws Error, IOError {
public async uint64 invoke (uint64 impl, uint64[] args, Cancellable? cancellable) throws Error, IOError {
throw_not_supported ();
}
+11 -3
View File
@@ -22,16 +22,25 @@ namespace Frida.Barebone {
return 4096;
}
public async uint query_exception_level (Cancellable? cancellable) throws Error, IOError {
throw_not_supported ();
}
public async void enumerate_ranges (Gum.PageProtection prot, FoundRangeFunc func, Cancellable? cancellable)
throws Error, IOError {
throw_not_supported ();
}
public async Allocation allocate_pages (uint64 physical_address, uint num_pages, Cancellable? cancellable)
public async Allocation allocate_pages (Gee.List<uint64?> physical_addresses, Cancellable? cancellable)
throws Error, IOError {
throw_not_supported ();
}
public async void protect_pages (uint64 virtual_address, size_t size, Gum.PageProtection prot,
Cancellable? cancellable) throws Error, IOError {
throw_not_supported ();
}
public async Gee.List<uint64?> scan_ranges (Gee.List<Gum.MemoryRange?> ranges, MatchPattern pattern, uint max_matches,
Cancellable? cancellable) throws Error, IOError {
throw_not_supported ();
@@ -41,8 +50,7 @@ namespace Frida.Barebone {
throw_not_supported ();
}
public async uint64 invoke (uint64 impl, uint64[] args, uint64 landing_zone, Cancellable? cancellable)
throws Error, IOError {
public async uint64 invoke (uint64 impl, uint64[] args, Cancellable? cancellable) throws Error, IOError {
throw_not_supported ();
}
+11 -3
View File
@@ -24,16 +24,25 @@ namespace Frida.Barebone {
return 4096;
}
public async uint query_exception_level (Cancellable? cancellable) throws Error, IOError {
throw_not_supported ();
}
public async void enumerate_ranges (Gum.PageProtection prot, FoundRangeFunc func, Cancellable? cancellable)
throws Error, IOError {
throw_not_supported ();
}
public async Allocation allocate_pages (uint64 physical_address, uint num_pages, Cancellable? cancellable)
public async Allocation allocate_pages (Gee.List<uint64?> physical_addresses, Cancellable? cancellable)
throws Error, IOError {
throw_not_supported ();
}
public async void protect_pages (uint64 virtual_address, size_t size, Gum.PageProtection prot,
Cancellable? cancellable) throws Error, IOError {
throw_not_supported ();
}
public async Gee.List<uint64?> scan_ranges (Gee.List<Gum.MemoryRange?> ranges, MatchPattern pattern, uint max_matches,
Cancellable? cancellable) throws Error, IOError {
throw_not_supported ();
@@ -43,8 +52,7 @@ namespace Frida.Barebone {
throw_not_supported ();
}
public async uint64 invoke (uint64 impl, uint64[] args, uint64 landing_zone, Cancellable? cancellable)
throws Error, IOError {
public async uint64 invoke (uint64 impl, uint64[] args, Cancellable? cancellable) throws Error, IOError {
throw_not_supported ();
}
+232 -132
View File
@@ -2,26 +2,8 @@ namespace Frida {
public sealed class BareboneHostSessionBackend : Object, HostSessionBackend {
private BareboneHostSessionProvider? provider;
private const uint16 DEFAULT_PORT = 3333;
public async void start (Cancellable? cancellable) throws IOError {
SocketConnectable? connectable = null;
unowned string? address = Environment.get_variable ("FRIDA_BAREBONE_ADDRESS");
if (address != null) {
try {
connectable = NetworkAddress.parse (address, DEFAULT_PORT);
} catch (GLib.Error e) {
}
}
if (connectable == null)
connectable = new InetSocketAddress (new InetAddress.loopback (SocketFamily.IPV4), DEFAULT_PORT);
uint64 heap_base_pa = 0;
unowned string? heap_base_preference = Environment.get_variable ("FRIDA_BAREBONE_HEAP_BASE");
if (heap_base_preference != null)
heap_base_pa = uint64.parse (heap_base_preference, 16);
provider = new BareboneHostSessionProvider (connectable, heap_base_pa);
provider = new BareboneHostSessionProvider ();
provider_available (provider);
}
@@ -49,22 +31,8 @@ namespace Frida {
}
}
public SocketConnectable connectable {
get;
construct;
}
public uint64 heap_base_pa {
get;
construct;
}
private BareboneHostSession? host_session;
public BareboneHostSessionProvider (SocketConnectable connectable, uint64 heap_base_pa) {
Object (connectable: connectable, heap_base_pa: heap_base_pa);
}
public async void close (Cancellable? cancellable) throws IOError {
if (host_session != null) {
yield host_session.close (cancellable);
@@ -72,10 +40,34 @@ namespace Frida {
}
}
public async HostSession create (HostSessionOptions? options, Cancellable? cancellable) throws Error, IOError {
public async HostSession create (HostSessionHub hub, HostSessionOptions? options, Cancellable? cancellable)
throws Error, IOError {
if (host_session != null)
throw new Error.INVALID_OPERATION ("Already created");
Barebone.Config config;
unowned string? config_path = Environment.get_variable ("FRIDA_BAREBONE_CONFIG");
if (config_path != null) {
try {
var config_data = yield FS.read_all_text (File.new_for_path (config_path), cancellable);
var cfg = (Barebone.Config) Json.gobject_from_data (typeof (Barebone.Config), config_data);
cfg.check ();
config = cfg;
} catch (GLib.Error e) {
throw new Error.INVALID_ARGUMENT ("Unable to load %s: %s", config_path, e.message);
}
} else {
config = new Barebone.Config ();
}
SocketConnectable connectable;
try {
Barebone.ConnectionConfig c = config.connection;
connectable = NetworkAddress.parse (c.host, c.port);
} catch (GLib.Error e) {
throw new Error.INVALID_ARGUMENT ("Unable to load %s: %s", config_path, e.message);
}
IOStream stream;
try {
var client = new SocketClient ();
@@ -109,16 +101,39 @@ namespace Frida {
break;
}
var page_size = yield machine.query_page_size (cancellable);
size_t page_size;
try {
page_size = yield machine.query_page_size (cancellable);
} catch (Error e) {
page_size = 0;
}
// TODO: Locate and use kernel's allocator when possible.
Barebone.Allocator allocator = new Barebone.SimpleAllocator (machine, page_size, heap_base_pa);
Barebone.Allocator allocator;
Barebone.AllocatorConfig? ac = config.allocator;
if (ac == null) {
allocator = new Barebone.NullAllocator (page_size);
} else if (ac is Barebone.PhysicalAllocatorConfig) {
allocator = new Barebone.PhysicalAllocator (machine, page_size,
(Barebone.PhysicalAllocatorConfig) ac);
} else if (ac is Barebone.TargetFunctionsAllocatorConfig) {
allocator = new Barebone.TargetFunctionsAllocator (machine, page_size,
(Barebone.TargetFunctionsAllocatorConfig) ac);
} else {
assert_not_reached ();
}
Barebone.AgentConnection? agent_connection = null;
Barebone.AgentConfig? agent_config = config.agent;
if (agent_config != null) {
agent_connection = yield Barebone.AgentConnection.open (agent_config, config.image, machine, allocator,
cancellable);
}
var interceptor = new Barebone.Interceptor (machine, allocator);
var services = new Barebone.Services (machine, allocator, interceptor);
host_session = new BareboneHostSession (services);
host_session = new BareboneHostSession (agent_connection, services);
host_session.agent_session_detached.connect (on_agent_session_detached);
return host_session;
@@ -170,6 +185,11 @@ namespace Frida {
}
public sealed class BareboneHostSession : Object, HostSession {
public Barebone.AgentConnection? connection {
get;
construct;
}
public Barebone.Services services {
get;
construct;
@@ -178,8 +198,8 @@ namespace Frida {
private Gee.Map<AgentSessionId?, BareboneAgentSession> agent_sessions =
new Gee.HashMap<AgentSessionId?, BareboneAgentSession> (AgentSessionId.hash, AgentSessionId.equal);
public BareboneHostSession (Barebone.Services services) {
Object (services: services);
public BareboneHostSession (Barebone.AgentConnection? connection, Barebone.Services services) {
Object (connection: connection, services: services);
}
public async void close (Cancellable? cancellable) throws IOError {
@@ -255,13 +275,17 @@ namespace Frida {
var opts = SessionOptions._deserialize (options);
if (opts.realm == EMULATED)
throw new Error.NOT_SUPPORTED ("Emulated realm is not supported on barebone targets");
throw new Error.NOT_SUPPORTED ("Emulated realm is not supported on Barebone targets");
var session_id = AgentSessionId.generate ();
MainContext dbus_context = yield get_dbus_context ();
var session = new BareboneAgentSession (session_id, opts.persist_timeout, dbus_context, services);
BareboneAgentSession session;
if (connection != null)
session = new RemoteBareboneAgentSession (connection, session_id, opts.persist_timeout, dbus_context);
else
session = new LocalBareboneAgentSession (services, session_id, opts.persist_timeout, dbus_context);
agent_sessions[session_id] = session;
session.closed.connect (on_agent_session_closed);
@@ -321,7 +345,158 @@ namespace Frida {
}
}
private sealed class BareboneAgentSession : Object, AgentSession {
private sealed class LocalBareboneAgentSession : BareboneAgentSession {
public Barebone.Services services {
get;
construct;
}
private Gee.Map<AgentScriptId?, BareboneScript> scripts =
new Gee.HashMap<AgentScriptId?, BareboneScript> (AgentScriptId.hash, AgentScriptId.equal);
private uint next_script_id = 1;
public LocalBareboneAgentSession (Barebone.Services services, AgentSessionId id, uint persist_timeout,
MainContext dbus_context) {
Object (
services: services,
id: id,
persist_timeout: persist_timeout,
frida_context: MainContext.ref_thread_default (),
dbus_context: dbus_context
);
}
public override async AgentScriptId create_script (string source, HashTable<string, Variant> options,
Cancellable? cancellable) throws Error, IOError {
check_open ();
var opts = ScriptOptions._deserialize (options);
if (opts.runtime == V8)
throw new Error.INVALID_ARGUMENT ("The V8 runtime is not supported by the Barebone backend");
var id = AgentScriptId (next_script_id++);
var script = BareboneScript.create (id, source, services);
scripts[id] = script;
script.message.connect (on_message_from_script);
return id;
}
public override async void destroy_script (AgentScriptId script_id, Cancellable? cancellable) throws Error, IOError {
check_open ();
BareboneScript script = get_script (script_id);
yield script.destroy (cancellable);
script.message.disconnect (on_message_from_script);
scripts.unset (script_id);
}
public override async void load_script (AgentScriptId script_id, Cancellable? cancellable) throws Error, IOError {
check_open ();
var script = get_script (script_id);
yield script.load (cancellable);
}
public override async void post_messages (AgentMessage[] messages, uint batch_id, Cancellable? cancellable)
throws Error, IOError {
transmitter.check_okay_to_receive ();
foreach (var m in messages) {
switch (m.kind) {
case SCRIPT: {
BareboneScript? script = scripts[m.script_id];
if (script != null)
script.post (m.text, m.has_data ? new Bytes (m.data) : null);
break;
}
case DEBUGGER:
break;
}
}
transmitter.notify_rx_batch_id (batch_id);
}
private void on_message_from_script (BareboneScript script, string json, Bytes? data) {
transmitter.post_message_from_script (script.id, json, data);
}
private BareboneScript get_script (AgentScriptId script_id) throws Error {
var script = scripts[script_id];
if (script == null)
throw new Error.INVALID_ARGUMENT ("Invalid script ID");
return script;
}
}
private sealed class RemoteBareboneAgentSession : BareboneAgentSession {
public Barebone.AgentConnection connection {
get;
construct;
}
public RemoteBareboneAgentSession (Barebone.AgentConnection connection, AgentSessionId id, uint persist_timeout,
MainContext dbus_context) {
Object (
connection: connection,
id: id,
persist_timeout: persist_timeout,
frida_context: MainContext.ref_thread_default (),
dbus_context: dbus_context
);
}
construct {
connection.script_message.connect (on_message_from_script);
}
public override async AgentScriptId create_script (string source, HashTable<string, Variant> options,
Cancellable? cancellable) throws Error, IOError {
check_open ();
var opts = ScriptOptions._deserialize (options);
if (opts.runtime == V8)
throw new Error.INVALID_ARGUMENT ("The V8 runtime is not supported by the Barebone backend");
return yield connection.create_script (source, cancellable);
}
public override async void destroy_script (AgentScriptId script_id, Cancellable? cancellable) throws Error, IOError {
check_open ();
yield connection.destroy_script (script_id, cancellable);
}
public override async void load_script (AgentScriptId script_id, Cancellable? cancellable) throws Error, IOError {
check_open ();
yield connection.load_script (script_id, cancellable);
}
public override async void post_messages (AgentMessage[] messages, uint batch_id, Cancellable? cancellable)
throws Error, IOError {
transmitter.check_okay_to_receive ();
foreach (var m in messages) {
switch (m.kind) {
case SCRIPT:
yield connection.post_script_message (m.script_id, m.text,
m.has_data ? new Bytes (m.data) : null, cancellable);
break;
case DEBUGGER:
break;
}
}
transmitter.notify_rx_batch_id (batch_id);
}
private void on_message_from_script (AgentScriptId id, string json, Bytes? data) {
transmitter.post_message_from_script (id, json, data);
}
}
private abstract class BareboneAgentSession : Object, AgentSession {
public signal void closed ();
public AgentSessionId id {
@@ -335,8 +510,12 @@ namespace Frida {
}
public AgentMessageSink? message_sink {
get { return transmitter.message_sink; }
set { transmitter.message_sink = value; }
get {
return transmitter.message_sink;
}
set {
transmitter.message_sink = value;
}
}
public MainContext frida_context {
@@ -349,34 +528,9 @@ namespace Frida {
construct;
}
public Barebone.Services services {
get;
construct;
}
public Barebone.Allocator allocator {
get;
construct;
}
private Promise<bool>? close_request;
private Gee.Map<AgentScriptId?, BareboneScript> scripts =
new Gee.HashMap<AgentScriptId?, BareboneScript> (AgentScriptId.hash, AgentScriptId.equal);
private uint next_script_id = 1;
private AgentMessageTransmitter transmitter;
public BareboneAgentSession (AgentSessionId id, uint persist_timeout, MainContext dbus_context,
Barebone.Services services) {
Object (
id: id,
persist_timeout: persist_timeout,
frida_context: MainContext.ref_thread_default (),
dbus_context: dbus_context,
services: services
);
}
protected AgentMessageTransmitter transmitter;
construct {
assert (frida_context != null);
@@ -421,22 +575,8 @@ namespace Frida {
throw_not_supported ();
}
public async AgentScriptId create_script (string source, HashTable<string, Variant> options,
Cancellable? cancellable) throws Error, IOError {
check_open ();
var opts = ScriptOptions._deserialize (options);
if (opts.runtime == V8)
throw new Error.INVALID_ARGUMENT ("The V8 runtime is not supported by the barebone backend");
var id = AgentScriptId (next_script_id++);
var script = BareboneScript.create (id, source, services);
scripts[id] = script;
script.message.connect (on_message_from_script);
return id;
}
public abstract async AgentScriptId create_script (string source, HashTable<string, Variant> options,
Cancellable? cancellable) throws Error, IOError;
public async AgentScriptId create_script_from_bytes (uint8[] bytes, HashTable<string, Variant> options,
Cancellable? cancellable) throws Error, IOError {
@@ -453,33 +593,14 @@ namespace Frida {
throw_not_supported ();
}
public async void destroy_script (AgentScriptId script_id, Cancellable? cancellable) throws Error, IOError {
check_open ();
public abstract async void destroy_script (AgentScriptId script_id, Cancellable? cancellable) throws Error, IOError;
BareboneScript script = get_script (script_id);
yield script.destroy (cancellable);
script.message.disconnect (on_message_from_script);
scripts.unset (script_id);
}
public async void load_script (AgentScriptId script_id, Cancellable? cancellable) throws Error, IOError {
check_open ();
var script = get_script (script_id);
yield script.load (cancellable);
}
public abstract async void load_script (AgentScriptId script_id, Cancellable? cancellable) throws Error, IOError;
public async void eternalize_script (AgentScriptId script_id, Cancellable? cancellable) throws Error, IOError {
throw_not_supported ();
}
private BareboneScript get_script (AgentScriptId script_id) throws Error {
var script = scripts[script_id];
if (script == null)
throw new Error.INVALID_ARGUMENT ("Invalid script ID");
return script;
}
public async void enable_debugger (AgentScriptId script_id, Cancellable? cancellable) throws Error, IOError {
throw_not_supported ();
}
@@ -488,25 +609,8 @@ namespace Frida {
throw_not_supported ();
}
public async void post_messages (AgentMessage[] messages, uint batch_id,
Cancellable? cancellable) throws Error, IOError {
transmitter.check_okay_to_receive ();
foreach (var m in messages) {
switch (m.kind) {
case SCRIPT: {
BareboneScript? script = scripts[m.script_id];
if (script != null)
script.post (m.text, m.has_data ? new Bytes (m.data) : null);
break;
}
case DEBUGGER:
break;
}
}
transmitter.notify_rx_batch_id (batch_id);
}
public abstract async void post_messages (AgentMessage[] messages, uint batch_id, Cancellable? cancellable)
throws Error, IOError;
public async PortalMembershipId join_portal (string address, HashTable<string, Variant> options,
Cancellable? cancellable) throws Error, IOError {
@@ -538,15 +642,11 @@ namespace Frida {
transmitter.commit_migration ();
}
private void check_open () throws Error {
protected void check_open () throws Error {
if (close_request != null)
throw new Error.INVALID_OPERATION ("Session is closing");
}
private void on_message_from_script (BareboneScript script, string json, Bytes? data) {
transmitter.post_message_from_script (script.id, json, data);
}
private void on_transmitter_closed () {
transmitter.closed.disconnect (on_transmitter_closed);
transmitter.new_candidates.disconnect (on_transmitter_new_candidates);
+66
View File
@@ -0,0 +1,66 @@
[CCode (gir_namespace = "FridaBarebone", gir_version = "1.0")]
namespace Frida.Barebone {
private sealed class CModule : Object {
public signal void console_output (string message);
public Gee.List<Export> exports {
get;
default = new Gee.ArrayList<Export> ();
}
public class Export {
public string name;
public uint64 address;
internal Export (string name, uint64 address) {
this.name = name;
this.address = address;
}
}
private Gum.ElfModule elf;
private Allocation allocation;
private Callback console_log_callback;
public async CModule.from_blob (Bytes blob, Machine machine, Allocator allocator, Cancellable? cancellable)
throws Error, IOError {
try {
elf = new Gum.ElfModule.from_blob (blob);
} catch (Gum.Error e) {
throw new Error.NOT_SUPPORTED ("%s", e.message);
}
var raw_elf = new Bytes.static (elf.get_file_data ());
size_t page_size = yield machine.query_page_size (cancellable);
allocation = yield inject_elf (elf, raw_elf, page_size, machine, allocator, cancellable);
uint64 base_va = allocation.virtual_address;
uint64 console_log_trap = 0;
elf.enumerate_symbols (e => {
if (e.name == "")
return true;
if (e.name == "_console_log") {
console_log_trap = base_va + e.address;
return true;
}
exports.add (new Export (e.name, base_va + e.address));
return true;
});
if (console_log_trap != 0) {
var handler = new ConsoleLogHandler (machine.gdb);
handler.output.connect (on_console_output);
console_log_callback = yield new Callback (console_log_trap, handler, machine, cancellable);
}
}
private void on_console_output (string message) {
console_output (message);
}
}
}
+395
View File
@@ -0,0 +1,395 @@
[CCode (gir_namespace = "FridaBarebone", gir_version = "1.0")]
namespace Frida.Barebone {
/**
* Barebone backend configuration. This is specified via the FRIDA_BAREBONE_CONFIG environment
* variable, which should point to the filesystem path of a JSON-encoded configuration file.
*
* Example JSON configurations:
*
* 1. Using all defaults:
* {
* "connection": {
* "host": "127.0.0.1",
* "port": 3333
* }
* }
*
* 2. Using a physical memory allocator:
* {
* "connection": {
* "host": "127.0.0.1",
* "port": 9000
* },
* "allocator": {
* "mode": "physical",
* "physical_base": "0x8ec9b4000"
* }
* }
*
* 3. Using target-specific allocation functions:
* {
* "connection": {
* "host": "127.0.0.1",
* "port": 9000
* },
* "allocator": {
* "mode": "target-functions",
* "alloc_function": "0xfffffff007a3c278",
* "free_function": "0xfffffff007a3c338"
* }
* }
*
* 4. Injecting a remote agent:
* {
* "agent": {
* "path": "/path/to/target/aarch64-unknown-none/release/frida-barebone-agent",
* "transport": {
* "type": "hostlink",
* "qmp": "unix:/path/to/qmp.sock"
* }
* },
* "image": {
* "file": "/path/to/kernelcache.research.iphone12b",
* "base": "0xfffffff007004000"
* }
* }
*/
public sealed class Config : Object, Json.Serializable {
public ConnectionConfig connection {
get;
set;
default = new ConnectionConfig ();
}
public AllocatorConfig? allocator {
get;
set;
}
public AgentConfig? agent {
get;
set;
}
public ImageConfig? image {
get;
set;
}
public void check () throws Error {
if (allocator != null)
allocator.check ();
if (agent != null)
agent.check ();
if (image != null)
image.check ();
}
public bool deserialize_property (string property_name, out Value value, ParamSpec pspec, Json.Node property_node) {
if (property_name == "allocator") {
AllocatorConfig? allocator = null;
Type t = typeof (InvalidAllocatorConfig);
if (property_node.get_node_type () == Json.NodeType.OBJECT) {
switch (property_node.get_object ().get_string_member_with_default ("mode", "invalid")) {
case "physical":
t = typeof (PhysicalAllocatorConfig);
break;
case "target-functions":
t = typeof (TargetFunctionsAllocatorConfig);
break;
default:
break;
}
allocator = (AllocatorConfig) Json.gobject_deserialize (t, property_node);
} else {
allocator = new InvalidAllocatorConfig ();
}
var v = Value (t);
v.set_object (allocator);
value = v;
return true;
}
value = Value (pspec.value_type);
return false;
}
}
public sealed class ConnectionConfig : Object {
public string host {
get;
set;
default = "127.0.0.1";
}
public uint16 port {
get;
set;
default = 3333;
}
}
public abstract class AllocatorConfig : Object {
public abstract void check () throws Error;
}
public sealed class InvalidAllocatorConfig : AllocatorConfig {
public override void check () throws Error {
throw new Error.NOT_SUPPORTED ("Config for 'allocator' is invalid");
}
}
public sealed class PhysicalAllocatorConfig : AllocatorConfig, Json.Serializable {
public MemoryAddress physical_base {
get;
set;
}
public override void check () throws Error {
if (physical_base == null)
throw new Error.NOT_SUPPORTED ("Config for 'allocator.physical_base' is missing");
physical_base.check ();
}
public bool deserialize_property (string property_name, out Value value, ParamSpec pspec, Json.Node property_node) {
if (property_name == "physical_base") {
value = deserialize_address ("allocator.physical_base", property_node);
return true;
}
value = Value (pspec.value_type);
return false;
}
}
public sealed class TargetFunctionsAllocatorConfig : AllocatorConfig, Json.Serializable {
public MemoryAddress alloc_function {
get;
set;
}
public MemoryAddress free_function {
get;
set;
}
public override void check () throws Error {
if (alloc_function == null)
throw new Error.NOT_SUPPORTED ("Config for 'allocator.alloc_function' is missing");
alloc_function.check ();
if (free_function == null)
throw new Error.NOT_SUPPORTED ("Config for 'allocator.free_function' is missing");
free_function.check ();
}
public bool deserialize_property (string property_name, out Value value, ParamSpec pspec, Json.Node property_node) {
if (property_name == "alloc-function") {
value = deserialize_address ("allocator.alloc_function", property_node);
return true;
}
if (property_name == "free-function") {
value = deserialize_address ("allocator.free_function", property_node);
return true;
}
value = Value (pspec.value_type);
return false;
}
}
public sealed class AgentConfig : Object, Json.Serializable {
public string path {
get;
set;
}
public TransportConfig transport {
get;
set;
}
public void check () throws Error {
if (path == null)
throw new Error.NOT_SUPPORTED ("Config for 'agent.path' is missing");
if (transport == null)
throw new Error.NOT_SUPPORTED ("Config for 'agent.transport' is missing");
transport.check ();
}
public bool deserialize_property (string property_name, out Value value, ParamSpec pspec, Json.Node property_node) {
if (property_name == "transport") {
TransportConfig transport;
Type t = typeof (InvalidTransportConfig);
if (property_node.get_node_type () == Json.NodeType.OBJECT) {
switch (property_node.get_object ().get_string_member_with_default ("type", "invalid")) {
case "hostlink":
t = typeof (HostlinkTransportConfig);
break;
default:
break;
}
transport = (TransportConfig) Json.gobject_deserialize (t, property_node);
} else {
transport = new InvalidTransportConfig ();
}
var v = Value (t);
v.set_object (transport);
value = v;
return true;
}
value = Value (pspec.value_type);
return false;
}
}
public abstract class TransportConfig : Object {
public abstract void check () throws Error;
}
public sealed class InvalidTransportConfig : TransportConfig {
public override void check () throws Error {
throw new Error.NOT_SUPPORTED ("Config for 'agent.transport' is invalid");
}
}
public sealed class HostlinkTransportConfig : TransportConfig {
public string qmp {
get;
set;
}
public override void check () throws Error {
if (qmp == null)
throw new Error.NOT_SUPPORTED ("Config for 'agent.transport.qmp' is missing");
if (!qmp.has_prefix ("unix:"))
throw new Error.NOT_SUPPORTED ("Config for 'agent.transport.qmp' must be a UNIX socket for now");
}
}
public sealed class ImageConfig : Object, Json.Serializable {
public string file {
get;
set;
}
public MemoryAddress base {
get;
set;
}
public Gee.Map<string, uint64?> symbols {
get;
set;
default = new Gee.HashMap<string, uint64?> ();
}
public void check () throws Error {
if (file == null)
throw new Error.NOT_SUPPORTED ("Config for 'image.file' is missing");
if (@base == null)
throw new Error.NOT_SUPPORTED ("Config for 'image.base' is missing");
@base.check ();
if (symbols == null)
throw new Error.NOT_SUPPORTED ("Config for 'image.symbols' is invalid");
}
public bool deserialize_property (string property_name, out Value value, ParamSpec pspec, Json.Node property_node) {
if (property_name == "base") {
value = deserialize_address ("image.base", property_node);
return true;
}
if (property_name == "symbols") {
Gee.Map<string, uint64?> syms = null;
if (property_node.get_node_type () == Json.NodeType.OBJECT) {
syms = new Gee.HashMap<string, uint64?> ();
property_node.get_object ().foreach_member ((obj, name, node) => {
if (syms == null)
return;
uint64 addr;
if (!try_deserialize_address (node, out addr)) {
syms = null;
return;
}
syms[name] = addr;
});
}
value = syms;
return true;
}
value = Value (pspec.value_type);
return false;
}
}
public abstract class MemoryAddress : Object {
public string label {
get;
construct;
}
public uint64 address {
get;
construct;
}
public abstract void check () throws Error;
}
public sealed class InvalidMemoryAddress : MemoryAddress {
public InvalidMemoryAddress (string label) {
Object (label: label);
}
public override void check () throws Error {
throw new Error.NOT_SUPPORTED ("Config for '%s' is invalid", label);
}
}
public sealed class NonNullMemoryAddress : MemoryAddress {
public NonNullMemoryAddress (string label, uint64 address) {
Object (label: label, address: address);
}
public override void check () throws Error {
if (address == 0)
throw new Error.NOT_SUPPORTED ("Config for '%s' cannot be NULL", label);
}
}
private MemoryAddress deserialize_address (string label, Json.Node node) {
uint64 addr;
if (!try_deserialize_address (node, out addr))
return new InvalidMemoryAddress (label);
return new NonNullMemoryAddress (label, addr);
}
private bool try_deserialize_address (Json.Node node, out uint64 address) {
Type t = node.get_value_type ();
if (t == typeof (string))
return uint64.try_parse (node.get_string (), out address, null, 16);
if (t == typeof (int64)) {
address = node.get_int ();
return true;
}
address = 0;
return false;
}
}
+31
View File
@@ -0,0 +1,31 @@
[CCode (gir_namespace = "FridaBarebone", gir_version = "1.0")]
namespace Frida.Barebone {
private class ConsoleLogHandler : Object, CallbackHandler {
public signal void output (string message);
public uint arity {
get { return 2; }
}
private GDB.Client gdb;
public ConsoleLogHandler (GDB.Client gdb) {
this.gdb = gdb;
}
public async uint64 handle_invocation (uint64[] args, CallFrame frame, Cancellable? cancellable)
throws Error, IOError {
var message = args[0];
var len = (long) args[1];
Bytes str_bytes = yield gdb.read_byte_array (message, len, cancellable);
unowned uint8[] str_data = str_bytes.get_data ();
unowned string str_raw = (string) str_data;
string str = str_raw.substring (0, len);
output (str);
return 0;
}
}
}
+39
View File
@@ -0,0 +1,39 @@
[CCode (gir_namespace = "FridaBarebone", gir_version = "1.0")]
namespace Frida.Barebone {
public async Allocation inject_elf (Gum.ElfModule elf, Bytes raw_elf, size_t page_size, Machine machine, Allocator allocator,
Cancellable? cancellable) throws Error, IOError {
size_t vm_size = (size_t) elf.mapped_size;
uint num_pages = (uint) (vm_size / page_size);
if (vm_size % page_size != 0)
num_pages++;
uint64 text_base = 0;
size_t text_size = 0;
elf.enumerate_segments (s => {
if ((s.protection & Gum.PageProtection.EXECUTE) != 0) {
text_base = s.vm_address;
text_size = (size_t) s.vm_size;
return false;
}
return true;
});
if (text_size == 0)
throw new Error.NOT_SUPPORTED ("Unable to detect text segment");
var allocation = yield allocator.allocate (num_pages * page_size, page_size, cancellable);
try {
uint64 base_va = allocation.virtual_address;
Bytes relocated_image = machine.relocate (elf, raw_elf, base_va);
yield machine.gdb.write_byte_array (base_va, relocated_image, cancellable);
yield machine.protect_pages (base_va + text_base, text_size, READ | EXECUTE, cancellable);
} catch (GLib.Error e) {
yield allocation.deallocate (cancellable);
throw_api_error (e);
}
return allocation;
}
}
+105
View File
@@ -0,0 +1,105 @@
[CCode (gir_namespace = "FridaBarebone", gir_version = "1.0")]
namespace Frida.Barebone.Img4 {
public async Payload parse_file (File f, Cancellable? cancellable) throws Error, IOError {
Bytes blob = yield FS.read_all_bytes (f, cancellable);
return parse (blob);
}
public Payload parse (Bytes blob) throws Error {
BufferReader r = new BufferReader (new Buffer (blob, BIG_ENDIAN));
if (r.read_uint8 () != Der.SEQUENCE)
throw new Error.PROTOCOL ("IMG4/IM4P must start with DER SEQUENCE");
size_t seq_len = Der.read_length (r);
size_t seq_end = r.offset + seq_len;
string first_magic = Der.read_string (r);
if (first_magic == "IMG4") {
if (r.read_uint8 () != Der.SEQUENCE)
throw new Error.PROTOCOL ("Expected SEQUENCE for IM4P");
size_t im4p_len = Der.read_length (r);
seq_end = r.offset + im4p_len;
if (Der.read_string (r) != "IM4P")
throw new Error.PROTOCOL ("Missing IM4P magic");
} else if (first_magic != "IM4P") {
throw new Error.PROTOCOL ("Not an IMG4/IM4P container (magic='%s')", first_magic);
}
string kind = Der.read_string (r);
string description = Der.read_string (r);
Bytes payload_raw = Der.read_octet_string (r);
Bytes final_data = maybe_decompress_lzfse (payload_raw);
return new Payload (kind, description, final_data);
}
public class Payload : Object {
public string kind {
get;
construct;
}
public string description {
get;
construct;
}
public Bytes data {
get;
construct;
}
public Payload (string kind, string description, Bytes data) {
Object (
kind: kind,
description: description,
data: data
);
}
}
namespace Der {
private const uint8 OCTET_STRING = 0x04;
private const uint8 UTF8_STRING = 0x0C;
private const uint8 IA5_STRING = 0x16;
private const uint8 SEQUENCE = 0x30;
private size_t read_length (BufferReader r) throws Error {
uint8 b = r.read_uint8 ();
if ((b & 0x80) == 0)
return b;
uint8 nlen = (uint8) (b & 0x7f);
if (nlen == 0)
throw new Error.NOT_SUPPORTED ("Indefinite length not supported in IMG4");
size_t len = 0;
for (uint8 i = 0; i != nlen; i++)
len = (len << 8) | r.read_uint8 ();
return len;
}
private Bytes read_octet_string (BufferReader r) throws Error {
uint8 tag = r.read_uint8 ();
if (tag != Der.OCTET_STRING)
throw new Error.PROTOCOL ("Expected OCTET STRING, got tag 0x%02x".printf (tag));
size_t len = read_length (r);
return r.read_bytes (len);
}
private string read_string (BufferReader r) throws Error {
uint8 tag = r.read_uint8 ();
if (tag != Der.IA5_STRING && tag != Der.UTF8_STRING)
throw new Error.PROTOCOL ("Unexpected string tag 0x%02x", tag);
size_t len = read_length (r);
return r.read_fixed_string (len);
}
}
private Bytes maybe_decompress_lzfse (Bytes src) throws Error {
if (LZFSE.is_lzfse (src))
return LZFSE.decode (src);
return src;
}
}
+188
View File
@@ -0,0 +1,188 @@
[CCode (gir_namespace = "FridaBarebone", gir_version = "1.0")]
namespace Frida.Barebone {
public sealed class Layout : Object {
public Gee.List<ModuleInfo> modules {
get;
construct;
}
public Gee.List<SymbolInfo> symbols {
get;
construct;
}
private const uint64 CHAINED_PTR_TARGET_MASK = (1 << 30) - 1;
private Layout (Gee.List<ModuleInfo> modules, Gee.List<SymbolInfo> symbols) {
Object (modules: modules, symbols: symbols);
}
public Layout.empty () {
Object (modules: new Gee.ArrayList<ModuleInfo> (), symbols: new Gee.ArrayList<SymbolInfo> ());
}
public static async Layout load_from_symbol_source (File symbol_source, uint64 kernel_base, ByteOrder byte_order,
uint pointer_size, Cancellable? cancellable) throws Error, IOError {
var payload = yield Img4.parse_file (symbol_source, cancellable);
Bytes kerncache = payload.data;
Gum.DarwinModule mod;
try {
mod = new Gum.DarwinModule.from_blob (kerncache, ARM64, Gum.PtrauthSupport.SUPPORTED);
} catch (Gum.Error e) {
throw new Error.NOT_SUPPORTED ("%s", e.message);
}
var blob = new Blob (kerncache, byte_order, pointer_size);
var modules = compute_module_list (mod, blob, kernel_base);
var symbols = compute_symbol_list (mod);
return new Layout (modules, symbols);
}
private static Gee.List<ModuleInfo> compute_module_list (Gum.DarwinModule mod, Blob blob, uint64 kernel_base) throws Error {
Buffer? kmod_info = null;
Buffer? kmod_start = null;
Error? pending_error = null;
mod.enumerate_sections (s => {
if (s.segment_name == "__PRELINK_INFO") {
try {
if (s.section_name == "__kmod_info")
kmod_info = blob.slice (s.file_offset, (size_t) s.size, "__kmod_info");
else if (s.section_name == "__kmod_start")
kmod_start = blob.slice (s.file_offset, (size_t) s.size, "__kmod_start");
} catch (Error e) {
pending_error = e;
return false;
}
}
return true;
});
if (pending_error != null)
throw pending_error;
if (kmod_info == null)
throw new Error.NOT_SUPPORTED ("Unable to find __kmod_info");
if (kmod_start == null)
throw new Error.NOT_SUPPORTED ("Unable to find __kmod_start");
var kexts = new Gee.ArrayList<ModuleInfo> ();
var info_pointers = new BufferReader (kmod_info);
while (info_pointers.available != 0) {
var kmodinfo_start = chained_pointer_to_vm_offset (info_pointers.read_pointer (), kernel_base);
var kmodinfo = new BufferReader (blob.slice (kmodinfo_start, 196, "__kmod_info entry"));
kmodinfo.skip (blob.pointer_size + 4 + 4);
string name = kmodinfo.read_fixed_string (64);
string version = kmodinfo.read_fixed_string (64);
kmodinfo.skip (4 + (2 * blob.pointer_size) + 8 + 8);
size_t start = chained_pointer_to_vm_offset (kmodinfo.read_pointer (), kernel_base);
size_t stop = chained_pointer_to_vm_offset (kmodinfo.read_pointer (), kernel_base);
kexts.add (new ModuleInfo () {
name = name,
version = version,
start_func_offset = (uint32) start,
stop_func_offset = (uint32) stop,
});
}
var start_offsets = new Gee.ArrayList<uint> ();
var start_pointers = new BufferReader (kmod_start);
while (start_pointers.available != 0)
start_offsets.add ((uint) chained_pointer_to_vm_offset (start_pointers.read_pointer (), kernel_base));
if (start_offsets.size != kexts.size + 1)
throw new Error.PROTOCOL ("Unexpected __kmod_start length");
var n = kexts.size;
for (var i = 0; i != n; i++) {
var kext = kexts[i];
kext.offset = start_offsets[i];
kext.size = start_offsets[i + 1] - kext.offset;
}
var result = new Gee.ArrayList<ModuleInfo> ();
result.add (new ModuleInfo () {
name = "mach_kernel",
version = mod.source_version,
offset = 0,
size = kexts[0].offset,
});
result.add_all (kexts);
return result;
}
private static size_t chained_pointer_to_vm_offset (uint64 val, uint64 kernel_base) {
var target = (size_t) (val & CHAINED_PTR_TARGET_MASK);
bool is_auth = (val >> 63) != 0;
if (is_auth)
return target;
return target - (size_t) (kernel_base & CHAINED_PTR_TARGET_MASK);
}
private static Gee.List<SymbolInfo> compute_symbol_list (Gum.DarwinModule mod) {
var symbols = new Gee.ArrayList<SymbolInfo> ();
mod.enumerate_symbols (s => {
symbols.add (new SymbolInfo () {
name = (s.name[0] == '_') ? s.name[1:] : s.name,
offset = (uint32) s.address,
symbol_type = s.type,
section = s.section,
description = s.description
});
return true;
});
return symbols;
}
}
public class ModuleInfo {
public string name;
public string version;
public uint32 offset;
public uint32 size;
public uint32 start_func_offset;
public uint32 stop_func_offset;
}
public class SymbolInfo {
public string name;
public uint32 offset;
public uint8 symbol_type;
public uint8 section;
public uint16 description;
}
private class Blob {
private Bytes bytes;
private size_t size;
public ByteOrder byte_order;
public uint pointer_size;
public Blob (Bytes b, ByteOrder o, uint ptr_size) {
bytes = b;
size = b.get_size ();
byte_order = o;
pointer_size = ptr_size;
}
public Buffer slice (size_t offset, size_t n, string label) throws Error {
if (offset >= size)
throw new Error.PROTOCOL ("Offset out of bounds while parsing %s", label);
size_t end = offset + n;
if (end > size)
throw new Error.PROTOCOL ("Size out of bounds while parsing %s", label);
return new Buffer (bytes[offset:end], byte_order, pointer_size);
}
}
}
+23
View File
@@ -0,0 +1,23 @@
[CCode (gir_namespace = "FridaBarebone", gir_version = "1.0")]
namespace Frida.Barebone.LZFSE {
public bool is_lzfse (Bytes buf) {
if (buf.get_size () < 4)
return false;
unowned uint8[] d = buf.get_data ();
return d[0] == 'b' && d[1] == 'v' && d[2] == 'x';
}
public Bytes decode (Bytes compressed) throws Error {
size_t est_max = compressed.get_size () * 15;
uint8[] dst_buf = new uint8[est_max];
size_t written = decode_buffer (dst_buf, compressed.get_data ());
if (written == 0)
throw new Error.PROTOCOL ("liblzfse returned 0 bytes");
return new Bytes (dst_buf[:written]);
}
[CCode (cheader_filename = "lzfse.h", cname = "lzfse_decode_buffer")]
private extern size_t decode_buffer ([CCode (array_length_type = "size_t")] uint8[] dst, [CCode (array_length_type = "size_t")] uint8[] src, void * scratch = null);
}
Loaded 100 of 243 files, more files were not shown because too many files have changed in this diff. Show more