Page MenuHomeFreeBSD

linux(4): fix ptrace(2) to properly handle orig_rax
ClosedPublic

Authored by trasz on Apr 22 2021, 3:25 PM.
Tags
None
Referenced Files
F154284348: D29927.id87980.diff
Mon, Apr 27, 2:40 PM
Unknown Object (File)
Tue, Apr 21, 5:49 AM
Unknown Object (File)
Mon, Apr 20, 9:35 PM
Unknown Object (File)
Mon, Apr 20, 3:03 PM
Unknown Object (File)
Mon, Apr 13, 9:16 PM
Unknown Object (File)
Mon, Apr 13, 5:44 AM
Unknown Object (File)
Tue, Apr 7, 6:36 AM
Unknown Object (File)
Tue, Apr 7, 4:54 AM
Subscribers

Details

Summary

This should fix strace(1) erroneously reporting return values
as "Function not implemented", combined with reporting the binary
ABI as X32.

Very similar code in linux_ptrace_getregs() is left as it is - it might
be wrong, but I don't have a way to test it.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 38805
Build 35694: arc lint + arc unit

Event Timeline

trasz requested review of this revision.Apr 22 2021, 3:25 PM

In general Linux extends GPR regsets with 'orig_foo' that stores the syscall code. Presumably i386 should be doing the same for orig_eax?

In D29927#671791, @jhb wrote:

In general Linux extends GPR regsets with 'orig_foo' that stores the syscall code. Presumably i386 should be doing the same for orig_eax?

Perhaps, but I don't have an easy way to test i386 either.

This revision was not accepted when it landed; it landed in state Needs Review.May 4 2021, 2:21 PM
This revision was automatically updated to reflect the committed changes.