Page MenuHomeFreeBSD

ptrace: Propagate errors from set_fpregs()
ClosedPublic

Authored by markj on Jul 31 2026, 3:30 PM.
Tags
None
Referenced Files
F171748590: D58577.diff
Sun, Sep 13, 6:15 AM
Unknown Object (File)
Thu, Sep 10, 10:53 PM
Unknown Object (File)
Sun, Sep 6, 3:25 PM
Unknown Object (File)
Thu, Sep 3, 7:08 AM
Unknown Object (File)
Thu, Sep 3, 7:04 AM
Unknown Object (File)
Wed, Sep 2, 6:48 PM
Unknown Object (File)
Tue, Sep 1, 9:43 AM
Unknown Object (File)
Tue, Sep 1, 9:36 AM
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 Not Applicable
Unit
Tests Not Applicable

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.