Page MenuHomeFreeBSD

ptrace: Propagate errors from set_fpregs()
ClosedPublic

Authored by markj on Jul 31 2026, 3:30 PM.
Tags
None
Referenced Files
F175205536: D58577.diff
Fri, Oct 9, 2:24 AM
Unknown Object (File)
Thu, Oct 8, 4:31 PM
Unknown Object (File)
Thu, Oct 8, 7:23 AM
Unknown Object (File)
Thu, Oct 8, 5:53 AM
Unknown Object (File)
Thu, Oct 8, 4:46 AM
Unknown Object (File)
Wed, Oct 7, 1:42 AM
Unknown Object (File)
Tue, Oct 6, 7:34 PM
Unknown Object (File)
Fri, Sep 18, 6:06 PM
Subscribers

Details

Summary

Otherwise ptrace(PT_SETREGSET) will not return errors to userspace.

Fixes: cef05c5a62ba ("amd64: do not allow to set reserved bits in MXCSR for ptrace(PT_SETFPREGS)")

Diff Detail

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

Event Timeline

markj requested review of this revision.Jul 31 2026, 3:30 PM
kib added inline comments.
sys/kern/imgact_elf.c
2395

Or just return (set_fpregsXX(...) == 0);

2398–2399

Same there, then return (true); is not needed.

This revision is now accepted and ready to land.Jul 31 2026, 3:40 PM
This revision now requires review to proceed.Jul 31 2026, 3:44 PM
This revision is now accepted and ready to land.Jul 31 2026, 3:47 PM
This revision was automatically updated to reflect the committed changes.