-
-
Notifications
You must be signed in to change notification settings - Fork 322
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
LibAFL_QEMU: Don't return a generic Address from Register reads #2681
Conversation
@@ -138,7 +138,7 @@ where | |||
qemu: Qemu, | |||
arch_regs_map: &'static EnumMap<ExitArgs, Regs>, | |||
) -> Result<Self::OutputCommand, CommandError> { | |||
let input_virt_addr: GuestVirtAddr = qemu.read_reg(arch_regs_map[ExitArgs::Arg1])?; | |||
let input_virt_addr: GuestVirtAddr = qemu.read_reg(arch_regs_map[ExitArgs::Arg1])?.into(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rmalmain Don't really understand why GuestVirtAddr can be a different size to GuestReg, but anyway not a big issue
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is more for semantic purposes, most of the time len(GuestReg) = len(GuestVirtAddr) >= len(GuestPhysAddr)
.
so we could just use GuestReg everywhere in theory i think.
it's just convenient to know what exactly we manipulate with the type.
This is done, CI is flakey because of Libafl-fuzz |
looks good, thanks |
i guess we could do something similar for register writes as well |
Writes are not necessary, usually the compiler can figure out the types. But up to you. |
…lusplus#2681) * LibAFL_QEMU: Make ReadReg always return GuestReg type * Don't return a generic address * fix fuzzers * fix mips
No description provided.