67fb0300 brooks Nov. 17, 2021, 8:12 p.m.
This consists of int -> ssize_t where required and one int -> mode_t.
As a rule, return types are informative rather than functional as the
actual return is in a register.

Reviewed by:	kevans
cgit
265a4b83 brooks Nov. 17, 2021, 8:12 p.m.
semid_t is historically an intptr_t so it should be an int32_t.

Reviewed by:	kevans
cgit
1a7a780b brooks Nov. 17, 2021, 8:12 p.m.
These were out of sync with sys/kern/syscalls.master

Reviewed by:	kevans
cgit
aef154d3 brooks Nov. 17, 2021, 8:12 p.m.
Reviewed by:	kevans
cgit
738ec2ed brooks Nov. 17, 2021, 8:12 p.m.
This reduces diffs when generating freebsd32 files from the default
ABI's syscalls.master.

Reviewed by:	kevans
cgit
a016320d brooks Nov. 17, 2021, 8:12 p.m.
Some 32-bit architectures pass 64-bit values in aligned
register pairs (a0,a1), (a2,a3) etc.  In freebsd32 we add these pads
explicitly from compat code.  We also sometimes add pads in the default
ABI.  Differentiate the two by making the freebsd32 ones int _pad.
In a future commit the 32-bit ones will be automatically generated.

Reviewed by:	kevans
cgit
158dcd73 brooks Nov. 17, 2021, 8:12 p.m.
This matches the default ABI and we work around issues with
union sigval by extracting the bottom 32-bits in a manual handler.

Reviewed by:	kevans
cgit
2b9d052d brooks Nov. 17, 2021, 8:12 p.m.
Add freebsd32 versions of getfsstat and freebsd11_getfsstat so that
bufsize is properly sign-extended if a negative value is passed.
Reject negative values before passing to kern_getfsstat as a size_t.

Reviewed by:	kevans
cgit
f19e3fd2 brooks Nov. 17, 2021, 8:12 p.m.
Syscalls that take signed longs need to treat the 32-bit versions as
signed int so that sign extension happens correctly.  Improve
decleration quality and add a few minimal syscall implementations.

Reviewed by:	kevans
cgit
d257e57d brooks Nov. 17, 2021, 8:12 p.m.
Reviewed by:	kevans
cgit
f089a2f3 brooks Nov. 17, 2021, 8:12 p.m.
The upcoming change to generate freebsd32 generated files from
sys/kern/syscalls.master doesn't have a way to handle disabling
this one without disabling the non-COMPAT counterpart so just add
a stub for now.

Reviewed by:	kevans
cgit
e02f64d9 brooks Nov. 17, 2021, 8:12 p.m.
Previously, the code would copy twice as many pointers as specified
and print pairs of them a single 64-bit pointer.

abort2 doesn't return so make the return type void

freebsd32_abort2 is in it's own file with a 2-clause BSD license
based on a discussion with Wojciech many years ago.

Reviewed by:	kevans
cgit
e3e811a3 brooks Nov. 17, 2021, 8:12 p.m.
These are required when supporting i386 because time_t is 32-bit which
reduces struct bintime to 12-bytes when combined with the fact that 64-bit
integers only requiring 32-bit alignment on i386.  Reusing the default
ABI version resulted in 4-byte overreads or overwrites to userspace.

Reviewed by:	kevans
cgit
7bd79565 brooks Nov. 17, 2021, 8:12 p.m.
These syscalls require no translation.  They were simply missing
from compat/freebsd32/syscalls.master.

Reviewed by:	kevans
cgit
91301e6e brooks Nov. 17, 2021, 8:12 p.m.
Previously we fell back to sys_kldsym, but because we'd always
mismatch on the version field we'd return EINVAL.  A freebsd32
implementation is impossible with the current ABI as there simply
isn't space to store a kernel virtual address in a uint32_t.

Reviewed by:	kevans
cgit