HomeFreeBSD

linux: Fix usage of ptrace(PT_GET_SC_ARGS)

Description

linux: Fix usage of ptrace(PT_GET_SC_ARGS)

The native handler expects the argument to be a pointer to an array of 8
syscall arguments, whereas the emulation provided an array that holds up
to 6.

Handle this by adding a new range of Linuxulator-specific ptrace
commands. In particular, introduce PTLINUX_GET_SC_ARGS, which always
copies exactly six arguments. This fixes the problem and removes the
hack of checking the target thread ABI to decide whether to apply a
Linux-specific quirk to PT_GET_SC_ARGS.

Reviewed by: kib
MFC after: 2 weeks
Sponsored by: Klara, Inc.
Differential Revision: https://reviews.freebsd.org/D50758

Details

Provenance
markjAuthored on Jun 13 2025, 7:03 PM
Reviewer
kib
Differential Revision
D50758: linux: Fix usage of ptrace(PT_GET_SC_ARGS)
Parents
rG54d2737e7fe4: bectl: Use SPDX only license
Branches
Unknown
Tags
Unknown