Page MenuHomeFreeBSD

kinst/arm64: Fix return values from kinst_invop()
AcceptedPublic

Authored by markj on Wed, May 13, 4:04 PM.
Tags
None
Referenced Files
F157286102: D56987.diff
Wed, May 20, 12:49 AM
F157284965: D56987.diff
Wed, May 20, 12:36 AM
F157231813: D56987.diff
Tue, May 19, 1:10 PM
F157231812: D56987.diff
Tue, May 19, 1:10 PM
F157231811: D56987.diff
Tue, May 19, 1:10 PM
F157231810: D56987.diff
Tue, May 19, 1:10 PM
F157231807: D56987.diff
Tue, May 19, 1:10 PM
F157231797: D56987.diff
Tue, May 19, 1:10 PM
Subscribers

Details

Reviewers
christos
andrew
Group Reviewers
DTrace
arm64
Summary

After commit 853cd8723494 it became invalid for kinst_invop() to return
0: dtrace_invop_start() would convert this to a sentinel value
indicating that it did not consume the breakpoint, and so we'd just
call kdb_trap() to handle it.

Change kinst_invop() to return NOP_INSTR after handling a matching
breakpoint. NOP_INSTR is handled by advancing the ELR, so we have to
compensate by subtracting INSTR_SIZE before returning.

Fixes: 853cd8723494 ("arm64: Clean up usage of the dtrace invop handler")

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 73099
Build 69982: arc lint + arc unit

Event Timeline

markj requested review of this revision.Wed, May 13, 4:04 PM
sys/cddl/dev/kinst/aarch64/kinst_isa.c
233–234

I think it'd be good to include the explanation from the commit message here as well. After a while it might not be obvious what we meant here.

sys/cddl/dev/kinst/aarch64/kinst_isa.c
233–234

It seems pretty clear if one actually looks at dtrace_invop_start()...?

sys/cddl/dev/kinst/aarch64/kinst_isa.c
233–234

Yes, I just thought it might be handy to have a short explanation here as well.

This revision is now accepted and ready to land.Thu, May 14, 3:56 PM