Page MenuHomeFreeBSD

syscalls: if ptrace(PT_SETREG) occured during syscall, do not do set_syscall_retval()
Needs ReviewPublic

Authored by kib on Oct 30 2025, 6:41 PM.
Tags
None
Referenced Files
F158052365: D53482.id165572.diff
Wed, May 27, 11:47 PM
Unknown Object (File)
Wed, May 27, 3:12 AM
Unknown Object (File)
Tue, May 26, 10:10 PM
Unknown Object (File)
Mon, May 25, 7:52 AM
Unknown Object (File)
Mon, May 11, 7:44 PM
Unknown Object (File)
Mon, May 11, 7:43 PM
Unknown Object (File)
Mon, May 11, 7:43 PM
Unknown Object (File)
Mon, May 11, 7:43 PM
Subscribers

Details

Summary
to preserve the register state enforced by debugger.  This is only
relevant for transparent attach to the slow syscalls where sleeps are
not interrupted.

PR:     290008


kern/subr_syscalls.c: declare 'traced' local variables boolean

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

kib requested review of this revision.Oct 30 2025, 6:41 PM

That said, I disagree that this is a kernel bug at all.

sys/kern/subr_syscall.c
119

Don't we need the proc lock here?

kib marked an inline comment as done.

Clear TDB_USERWR under proc lock. Do it earlier.

I'm not sure if we should make such a change, but it looks ok to me.

This revision is now accepted and ready to land.Nov 2 2025, 5:48 PM
kib updated this revision to Diff 165700.

Rebase