Use the unwind_frame() function, which properly validates the frame
pointer and uses ADDR_MAKE_CANONICAL() for the pc, required when PAC is
enabled.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Passed - Unit
No Test Coverage - Build Status
Buildable 51319 Build 48210: arc lint + arc unit
Event Timeline
Comment Actions
FYI, locally I have a STACK_FOREACH() addition to the stack(9) KPI which would give us an MI way to loop through the list of PC addresses after a call to stack_save(). Possibly this can be used to simplify this or other cases further, at a small cost.
It is still half-baked, and not something I plan to tackle immediately.
sys/dev/hwpmc/hwpmc_arm64_md.c | ||
---|---|---|
91 | unwind_frame() doesn't check whether the returned PC is in the kernel, so this represents a behaviour change. |
sys/dev/hwpmc/hwpmc_arm64_md.c | ||
---|---|---|
91 | Thank you, great catch. |