Page MenuHomeFreeBSD

linux: Make linux_ptrace.c portable
ClosedPublic

Authored by trasz on Oct 31 2021, 1:33 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Nov 13, 11:25 AM
Unknown Object (File)
Sun, Oct 20, 9:44 AM
Unknown Object (File)
Oct 5 2024, 2:49 AM
Unknown Object (File)
Oct 3 2024, 7:42 AM
Unknown Object (File)
Sep 21 2024, 2:41 AM
Unknown Object (File)
Sep 15 2024, 11:46 PM
Unknown Object (File)
Sep 4 2024, 10:03 AM
Unknown Object (File)
Sep 4 2024, 4:41 AM
Subscribers

Details

Summary

Make sys/amd64/linux/linux_ptrace.c machine-independent,
in preparation to move it into sys/compat/linux/.

Diff Detail

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

Event Timeline

trasz requested review of this revision.Oct 31 2021, 1:33 PM
sys/amd64/linux/linux_ptrace.c
221

RAX/RIP are only meaningful for amd64 (and for some stretch i386). If you intent is to only enable this code for amd64 , use #ifdef amd64, not #ifndef.

367

Can we have small per-arch helpers called there, instead of adding more ifdefs (BTW it should be #ifdef amd64).

sys/amd64/linux/linux_ptrace.c
367

I'd prefer to add the per-arch hooks in a separate commit, together with adding some ARM-specific code, after moving this part into sys/compat/.

What about i386 and linux32 on amd64?

In D32756#740162, @kib wrote:

What about i386 and linux32 on amd64?

i386 has its own implementation, which I don't intend to touch, apart from moving it so things continue to build (https://reviews.freebsd.org/D32757). We don't support 32-bit Linux ptrace(2) on 64-bit architectures.

This revision is now accepted and ready to land.Nov 3 2021, 2:07 AM
This revision was automatically updated to reflect the committed changes.