HomeFreeBSD

Only allow a store through sp in the arm64 fbt

Description

Only allow a store through sp in the arm64 fbt

When searching for an instruction to patch out in the arm64 function
boundary trace we search for a store pair with a write back. This
instruction is commonly used to store two registers to the stack
and update the stack pointer to hold space for more.

This works in many cases, however not all functions use this, e.g.
when the stack frame is too large. In these cases we may find another
instruction of the same type that doesn't store through the stack
pointer. Filter these instructions out and assume if we see one we
are past the function prologue.

Reported by: rwatson
Sponsored by: Innovate UK

Details

Provenance
andrewAuthored on Jan 12 2021, 11:37 AM
Parents
R10:35a39dc5b349: Bump __FreeBSD_version after linuxkpi changes
Branches
Unknown
Tags
Unknown