Skip to content

Commit

Permalink
Add mips64el support to syscall-injection
Browse files Browse the repository at this point in the history
  • Loading branch information
jamcleod committed Oct 31, 2024
1 parent 9fc6093 commit e1db0cd
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion panda-rs/src/abi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ pub mod syscall {
syscall_number = V0;
}

#[cfg(arch = "mips64")] {
#[cfg(arch = "mips64", arch = "mips64el")] {
// n32 ABI
args = [A0, A1, A2, A3, T0, T1];
return = V0;
Expand Down
1 change: 1 addition & 0 deletions panda-rs/src/syscall_injection.rs
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,7 @@ fn restart_syscall(cpu: &mut CPUState, pc: target_ulong) {
}
}

#[cfg(any(feature = "x86_64", feature = "i386"))]
const SYSENTER_INSTR: &[u8] = &[0xf, 0x34];

/// Run a syscall injector in the form as an async block/value to be evaluated. If
Expand Down
2 changes: 1 addition & 1 deletion panda-rs/src/syscall_injection/arch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ pub(crate) const VFORK: target_ulong = 190;
pub(crate) const VFORK: target_ulong = 220;

// TODO: mips needs to be changed to VFORK
#[cfg(feature = "mips64")]
#[cfg(any(feature = "mips64", feature = "mips64el"))]
pub(crate) const VFORK: target_ulong = 4002;

#[cfg(any(feature = "mips", feature = "mipsel"))]
Expand Down

0 comments on commit e1db0cd

Please sign in to comment.