Page MenuHomeFreeBSD

kinst(4): search for push rbp anywhere in the function
AbandonedPublic

Authored by christos on Mar 18 2023, 7:33 PM.
Tags
Referenced Files
F123713117: D39166.diff
Fri, Jul 18, 2:05 AM
Unknown Object (File)
Wed, Jul 16, 8:07 PM
Unknown Object (File)
Fri, Jul 11, 12:53 PM
Unknown Object (File)
Tue, Jul 8, 10:53 PM
Unknown Object (File)
Tue, Jul 8, 4:24 AM
Unknown Object (File)
Mon, Jul 7, 6:59 AM
Unknown Object (File)
Tue, Jul 1, 1:32 AM
Unknown Object (File)
Fri, Jun 27, 10:29 PM
Subscribers

Details

Reviewers
markj
Summary

This patch fixes kinst ignoring functions that push %rbp
after the first instruction.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

Mention leaf function with rbp omitted.

sys/cddl/dev/kinst/amd64/kinst_isa.c
555

Let's put this in its own function, something like bool kinst_can_trace_func(uint8_t *instr, uint8_t *limit);. kinst_make_probe() has too many local vars otherwise, and we might want to add/change the checks over time, so a separate function is a bit neater.

christos marked an inline comment as done.

Put it in its own function.

Abandoning this one since we no longer search for push %rbp, instead we
exclude just the exception handlers (see D39229).