From 538dfea8fe4144483a942ae99f6c5fb7574003d4 Mon Sep 17 00:00:00 2001 From: Tim Deeb-Swihart Date: Wed, 3 May 2017 14:05:03 -0400 Subject: [PATCH] Fix incorrect syscall arg regs for X86 (#224) (#228) i386 and amd64 had their register sets reversed. This fixes that. --- manticore/models/linux.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/manticore/models/linux.py b/manticore/models/linux.py index 8c4bccf..8d946f3 100644 --- a/manticore/models/linux.py +++ b/manticore/models/linux.py @@ -1812,9 +1812,9 @@ class Linux(object): self._arch_reg_init(cpu, arch) if arch == 'i386': - self.syscall_arg_regs = ['RDI', 'RSI', 'RDX', 'R10', 'R8', 'R9'] - elif arch == 'amd64': self.syscall_arg_regs = ['EBX', 'ECX', 'EDX', 'ESI', 'EDI', 'EBP'] + elif arch == 'amd64': + self.syscall_arg_regs = ['RDI', 'RSI', 'RDX', 'R10', 'R8', 'R9'] elif arch == 'armv7': self.syscall_arg_regs = ['R0', 'R1', 'R2', 'R3', 'R4', 'R5', 'R6'] self._init_arm_kernel_helpers(cpu)