HomeFreeBSD

Fix 64-bit syscall argument fetching in 32-bit Linux syscall handlers.

Description

Fix 64-bit syscall argument fetching in 32-bit Linux syscall handlers.

The Linux32 system call argument fetcher places each argument (passed in
registers in the Linux x86 system call convention) into an entry in the
generic system call args array. Each member of this array is 8 bytes
wide, so this approach is broken for system calls that take off_t
arguments.

Fix the problem by splitting l_loff_t arguments in the 32-bit system
call descriptions, the same as we do for FreeBSD32. Change entry points
to handle this using the PAIR32TO64 macro.

Move linux_ftruncate64() into compat/linux.

PR: 243155
Reported by: Alex S <iwtcex@gmail.com>
Reviewed by: kib (previous version)
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D23210

Details

Provenance
markjAuthored on
Reviewer
kib
Differential Revision
D23210: Fix 64-bit system call argument fetching for 32-bit Linux compat.
Parents
rS356944: libexec/rc/rc.d/ipfw: style fix after r356943
Branches
Unknown
Tags
Unknown