HomeFreeBSD

dtrace/amd64: Implement emulation of call instructions

Description

dtrace/amd64: Implement emulation of call instructions

Here, the provider is responsible for updating the trapframe to redirect
control flow and for computing the return address. Once software-saved
registers are restored, the emulation shifts the remaining context down
on the stack to make space for the return address, then copies the
address provided by the invop handler. dtrace_invop() is modified to
allocate temporary storage space on the stack for use by the provider to
return the return address.

This is to support a new provider for amd64 which can instrument
arbitrary instructions, not just function entry and exit instructions as
FBT does.

In collaboration with: christos
Sponsored by: Google, Inc. (GSoC 2022)
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks

Details

Provenance
markjAuthored on Aug 9 2022, 8:08 PM
Parents
rGa7aa3d4d758d: fbt/x86: Extract arg1 for return probes from the trapframe
Branches
Unknown
Tags
Unknown