Kirby Kuehl 7f9c5eaa17 Upgrade to Frida 17.16.4 and add AVX-512/ARM64 PAC instructions (#248)
* feat: upgrade to Frida 17.16.4 and add AVX-512/ARM64 PAC instructions

Upgrade Frida from 17.16.1 to 17.16.4 across all three devkit components.

Add new instruction writer support from Frida 17.16.1+:

x86_64 Writer (AVX-512 instructions):
- kmovq: k-register mask operations for AVX-512
- vextracti64x4: extract 256 bits from 512-bit ZMM register
- vinserti64x4: insert 256 bits into 512-bit ZMM register
- vmovdqu64: unaligned 512-bit moves to/from ZMM registers

ARM64 Writer:
- movk: move with keep for building 64-bit constants incrementally
- pacia: Pointer Authentication Code for ARMv8.3-A security

All changes tested with full quality gate (fmt, clippy, build, test).

* fix(aarch64): correct put_movk_reg_imm parameter types

The function signature expects (reg, imm: u16, shift: u32), not (reg, imm: u32, shift: u8).
This was revealed after merging upstream which had updated bindings.

* feat(x86_64): add comprehensive instruction writer coverage

Add ~70 additional x86_64 instruction writer methods:

Writer utilities:
- clear, cur, offset: Writer state management
- set_target_cpu, set_target_abi: Target configuration
- get_cpu_register_for_nth_argument: ABI introspection

Basic instructions:
- put_breakpoint, put_padding, put_nop_padding: Debug/alignment
- put_u8, put_s8: Raw byte insertion

Call instructions:
- put_call_indirect, put_call_near_label, put_call_reg
- put_call_reg_offset_ptr, put_call_reg_with_arguments
- put_call_*_with_aligned_arguments variants
- Full unsafe argument array APIs

Flag manipulation:
- put_clc, put_stc, put_cld, put_std: Flag operations
- put_lahf, put_sahf: Flag register access

CPU instructions:
- put_cpuid, put_lfence, put_rdtsc, put_pause: CPU features

Comparison/test:
- put_cmp_imm_ptr_imm_u32, put_cmp_reg_i32, put_cmp_reg_reg
- put_cmp_reg_offset_ptr_reg, put_test_reg_u32

Conditional jumps:
- put_jcc_short, put_jcc_near: Full conditional jump support

Atomic operations:
- put_inc_reg_ptr, put_dec_reg_ptr
- put_lock_inc_imm32_ptr, put_lock_dec_imm32_ptr
- put_lock_cmpxchg_reg_ptr_reg, put_lock_xadd_reg_ptr_reg
- put_xchg_reg_reg_ptr

Memory operations:
- put_mov_reg_near_ptr, put_mov_near_ptr_reg
- put_mov_reg_fs_*, put_mov_fs_*: FS segment access
- put_mov_reg_gs_*, put_mov_gs_*: GS segment access
- put_movdqu_*, put_movq_*: XMM register moves

FPU state:
- put_fxsave_reg_ptr, put_fxrstor_reg_ptr

All changes tested with full quality gate (fmt, clippy, build, test).

* fix(aarch64): correct doctest imports for put_pacia_reg_reg

Fix imports in the put_pacia_reg_reg example to use the public API.
Aarch64Register is re-exported from instruction_writer, not aarch64 submodule.

* fix(x86_64): remove duplicate doc comment causing clippy error

Remove duplicate doc comment for put_kmovq_kreg_reg_offset_ptr that was
causing clippy::empty_line_after_doc_comments error.
2026-07-30 13:06:04 +03:00
2021-05-08 10:40:11 -04:00
2020-05-27 10:47:15 -04:00
2025-05-14 06:49:38 +03:00

frida-rust

Rust bindings for Frida.

Install

  • Build Frida, or download the devkits for your system (see frida-gum or frida-core README for version)
  • For crate installation:
    • Move the frida-gum and frida-core devkits into rustc-link-search, e.g.: /usr/local/{include, lib} on Unix
  • For local development:
    • Move the frida-gum devkit into frida-gum-sys, and the frida-core devkit into frida-sys and cargo build in the root
S
Description
Frida Rust bindings
Readme
3.4 MiB
0 Stars 1 Watchers 0 Forks
v0.17.2
Latest
2026-11-06 17:14:25 -10:00
Languages
Rust 96%
C 4%