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)
Mon, Apr 29, 8:20 AM
Unknown Object (File)
Sat, Apr 20, 7:09 PM
Unknown Object (File)
Mar 19 2024, 3:33 PM
Unknown Object (File)
Mar 19 2024, 2:56 PM
Unknown Object (File)
Mar 7 2024, 4:21 PM
Unknown Object (File)
Feb 19 2024, 8:35 AM
Unknown Object (File)
Feb 19 2024, 8:31 AM
Unknown Object (File)
Feb 19 2024, 8:28 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
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

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.