Page MenuHomeFreeBSD

Stop single stepping in signal handers on arm64
ClosedPublic

Authored by andrew on Feb 4 2022, 3:41 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Nov 8, 6:15 AM
Unknown Object (File)
Fri, Nov 8, 4:47 AM
Unknown Object (File)
Fri, Nov 8, 2:43 AM
Unknown Object (File)
Fri, Nov 8, 2:41 AM
Unknown Object (File)
Fri, Nov 8, 2:37 AM
Unknown Object (File)
Thu, Oct 17, 3:46 PM
Unknown Object (File)
Thu, Oct 17, 12:07 PM
Unknown Object (File)
Oct 9 2024, 4:46 AM
Subscribers

Details

Summary

We should clear the single step flag when entering a signal hander and
set it when returning. This fixes the ptrace__PT_STEP_with_signal test.

While here add support for userspace to set the single step bit as on
x86. This can be used by userspace for self tracing.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

andrew requested review of this revision.Feb 4 2022, 3:41 PM

64-bit works. I still need to test the COMPAT32 case.

tests/sys/kern/basic_signal.c
93

This should be

ucp->uc_mcontext.mc_rflags |= PSL_T;

for amd64, and

ucp->uc_mcontext.mc_eflags |= PSL_T;

for i386.

Asd untested x86 test support

This revision is now accepted and ready to land.Feb 7 2022, 2:58 PM