HomeFreeBSD

fork: Allow ABI to specify fork return values for child.

Description

fork: Allow ABI to specify fork return values for child.

At least Linux x86 ABI's does not use carry bit and expects that the dx register
is preserved. For this add a new sv_set_fork_retval hook and call it from cpu_fork().

Add a short comment about touching dx in x86_set_fork_retval(), for more details
see phab comments from kib@ and imp@.

Reviewed by: kib
Differential revision: https://reviews.freebsd.org/D31472
MFC after: 2 weeks

(cherry picked from commit de8374df28cc23ce0d893fd96d1ad0a861414154)

Details

Provenance
dchaginAuthored on Jun 17 2022, 7:33 PM
Reviewer
kib
Differential Revision
D31472: fork: Touch the registers specific to FreeBSD under the condition.
Parents
rG5eb654999438: linux(4): Plug in aarch64 fcntl flags.
Branches
Unknown
Tags
Unknown