History log of /freebsd-11-stable/sys/arm/cloudabi32/
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
326743 10-Dec-2017 ed

MFC r326228 and r326229:

Use TO_PTR() to convert integers to pointers.

For FreeBSD/arm64's cloudabi32 support, I'm going to need a TO_PTR() in
this place. Also use it for all of the other source files, so that the
difference remains as minimal as possible.

321343 21-Jul-2017 kib

MFC r319873:
Move struct syscall_args syscall arguments parameters container into
struct thread.

316576 06-Apr-2017 kib

Improvements for the brand detection and prioritization.

MFC r315701 (by ed):
Set the interpreter path to /nonexistent.

MFC r315749:
Adjust r314851 to not require every brand to specify interpreter path.

MFC r315753:
Add a flag BI_BRAND_ONLY_STATIC to specify that the brand only
matches static binaries.

MFC r315754:
Update r315753 with the proper flag name.

MFC r316211:
A followup to r315749, two more places where brand->interp_path was
accessed unconditionally.

316574 06-Apr-2017 ed

Bring kernel space CloudABI code in sync with HEAD.

MFC r312353, r312354 and r312355:

Sync in the latest CloudABI generated source files.

Languages like C++17 and Go provide direct support for slice types:
pointer/length pairs. The CloudABI generator now has more complete for
this, meaning that for the C binding, pointer/length pairs now use an
automatic naming scheme of ${name} and ${name}_len.

Apart from this change and some reformatting, the ABI definitions are
identical. Binary compatibility is preserved entirely.

MFC r315700:

Make file descriptor passing work for CloudABI's sendmsg().

Reduce the potential amount of code duplication between cloudabi32 and
cloudabi64 by creating a cloudabi_sock_recv() utility function. The
cloudabi32 and cloudabi64 modules will then only contain code to convert
the iovecs to the native pointer size.

In cloudabi_sock_recv(), we can now construct an SCM_RIGHTS cmsghdr in
an mbuf and pass that on to kern_sendit().

MFC r315736:

Make file descriptor passing for CloudABI's recvmsg() work.

Similar to the change for sendmsg(), create a pointer size independent
implementation of recvmsg() and let cloudabi32 and cloudabi64 call into
it. In case userspace requests one or more file descriptors, call
kern_recvit() in such a way that we get the control message headers in
an mbuf. Iterate over all of the headers and copy the file descriptors
to userspace.


/freebsd-11-stable/sys/amd64/cloudabi32/cloudabi32_sysvec.c
/freebsd-11-stable/sys/amd64/cloudabi64/cloudabi64_sysvec.c
cloudabi32_sysvec.c
/freebsd-11-stable/sys/arm64/cloudabi64/cloudabi64_sysvec.c
/freebsd-11-stable/sys/compat/cloudabi/cloudabi_file.c
/freebsd-11-stable/sys/compat/cloudabi/cloudabi_mem.c
/freebsd-11-stable/sys/compat/cloudabi/cloudabi_proc.c
/freebsd-11-stable/sys/compat/cloudabi/cloudabi_random.c
/freebsd-11-stable/sys/compat/cloudabi/cloudabi_sock.c
/freebsd-11-stable/sys/compat/cloudabi/cloudabi_util.h
/freebsd-11-stable/sys/compat/cloudabi32/cloudabi32_fd.c
/freebsd-11-stable/sys/compat/cloudabi32/cloudabi32_poll.c
/freebsd-11-stable/sys/compat/cloudabi32/cloudabi32_proto.h
/freebsd-11-stable/sys/compat/cloudabi32/cloudabi32_sock.c
/freebsd-11-stable/sys/compat/cloudabi32/cloudabi32_syscall.h
/freebsd-11-stable/sys/compat/cloudabi32/cloudabi32_syscalls.c
/freebsd-11-stable/sys/compat/cloudabi32/cloudabi32_sysent.c
/freebsd-11-stable/sys/compat/cloudabi32/cloudabi32_systrace_args.c
/freebsd-11-stable/sys/compat/cloudabi32/cloudabi32_thread.c
/freebsd-11-stable/sys/compat/cloudabi64/cloudabi64_fd.c
/freebsd-11-stable/sys/compat/cloudabi64/cloudabi64_poll.c
/freebsd-11-stable/sys/compat/cloudabi64/cloudabi64_proto.h
/freebsd-11-stable/sys/compat/cloudabi64/cloudabi64_sock.c
/freebsd-11-stable/sys/compat/cloudabi64/cloudabi64_syscall.h
/freebsd-11-stable/sys/compat/cloudabi64/cloudabi64_syscalls.c
/freebsd-11-stable/sys/compat/cloudabi64/cloudabi64_sysent.c
/freebsd-11-stable/sys/compat/cloudabi64/cloudabi64_systrace_args.c
/freebsd-11-stable/sys/compat/cloudabi64/cloudabi64_thread.c
/freebsd-11-stable/sys/contrib/cloudabi/cloudabi32_types.h
/freebsd-11-stable/sys/contrib/cloudabi/cloudabi64_types.h
/freebsd-11-stable/sys/contrib/cloudabi/cloudabi_types_common.h
/freebsd-11-stable/sys/contrib/cloudabi/syscalls32.master
/freebsd-11-stable/sys/contrib/cloudabi/syscalls64.master
/freebsd-11-stable/sys/i386/cloudabi32/cloudabi32_sysvec.c
316570 06-Apr-2017 ed

MFC r315861:

Stop providing the compat_3_brand.

As of r315860, the ELF image activator works fine for CloudABI without it.

307144 12-Oct-2016 ed

MFC r303818, r303833, r303941, r304478, r304481, r304483, r304484, r304554,
r304555, r304556, r304557, r304558, r304559, r304561, r304563, r304564,
r304565, r304615, r304742, r304743, r304744, r304745, r304748, r304886,
r304991, r305928, r305938, r305987, r306185:

Bring CloudABI support back in sync with HEAD.

- Add support for running 32-bit executables on amd64, armv6 and i386.

- As these new architectures require the use of the vDSO, merge back
vDSO support for 64-bit executables running on amd64 and arm64 as
well. This has the advantage that support for vDSO-less execution
can be phased out when 11.0 becomes unsupported, as opposed to 11.x.

This change has been tested by running the cloudlibc unit tests on all
supported architectures, which seems to work fine.


/freebsd-11-stable/share/man/man4/cloudabi.4
/freebsd-11-stable/sys/amd64/cloudabi32
/freebsd-11-stable/sys/amd64/cloudabi64/cloudabi64_sysvec.c
/freebsd-11-stable/sys/amd64/conf/NOTES
/freebsd-11-stable/sys/arm/cloudabi32
/freebsd-11-stable/sys/arm64/cloudabi64/cloudabi64_sysvec.c
/freebsd-11-stable/sys/compat/cloudabi/cloudabi_clock.c
/freebsd-11-stable/sys/compat/cloudabi/cloudabi_thread.c
/freebsd-11-stable/sys/compat/cloudabi/cloudabi_util.h
/freebsd-11-stable/sys/compat/cloudabi/cloudabi_vdso.c
/freebsd-11-stable/sys/compat/cloudabi/cloudabi_vdso.lds
/freebsd-11-stable/sys/compat/cloudabi32
/freebsd-11-stable/sys/compat/cloudabi32/cloudabi32_proto.h
/freebsd-11-stable/sys/compat/cloudabi32/cloudabi32_syscall.h
/freebsd-11-stable/sys/compat/cloudabi32/cloudabi32_syscalls.c
/freebsd-11-stable/sys/compat/cloudabi32/cloudabi32_sysent.c
/freebsd-11-stable/sys/compat/cloudabi32/cloudabi32_systrace_args.c
/freebsd-11-stable/sys/compat/cloudabi64/Makefile
/freebsd-11-stable/sys/compat/cloudabi64/cloudabi64_fd.c
/freebsd-11-stable/sys/compat/cloudabi64/cloudabi64_module.c
/freebsd-11-stable/sys/compat/cloudabi64/cloudabi64_poll.c
/freebsd-11-stable/sys/compat/cloudabi64/cloudabi64_proto.h
/freebsd-11-stable/sys/compat/cloudabi64/cloudabi64_sock.c
/freebsd-11-stable/sys/compat/cloudabi64/cloudabi64_syscall.h
/freebsd-11-stable/sys/compat/cloudabi64/cloudabi64_syscalls.c
/freebsd-11-stable/sys/compat/cloudabi64/cloudabi64_sysent.c
/freebsd-11-stable/sys/compat/cloudabi64/cloudabi64_systrace_args.c
/freebsd-11-stable/sys/compat/cloudabi64/cloudabi64_util.h
/freebsd-11-stable/sys/conf/files
/freebsd-11-stable/sys/conf/files.amd64
/freebsd-11-stable/sys/conf/files.arm
/freebsd-11-stable/sys/conf/files.arm64
/freebsd-11-stable/sys/conf/files.i386
/freebsd-11-stable/sys/conf/options
/freebsd-11-stable/sys/contrib/cloudabi/cloudabi32_types.h
/freebsd-11-stable/sys/contrib/cloudabi/cloudabi64_types.h
/freebsd-11-stable/sys/contrib/cloudabi/cloudabi_types_common.h
/freebsd-11-stable/sys/contrib/cloudabi/cloudabi_vdso_aarch64.S
/freebsd-11-stable/sys/contrib/cloudabi/cloudabi_vdso_armv6.S
/freebsd-11-stable/sys/contrib/cloudabi/cloudabi_vdso_i686.S
/freebsd-11-stable/sys/contrib/cloudabi/cloudabi_vdso_i686_on_64bit.S
/freebsd-11-stable/sys/contrib/cloudabi/cloudabi_vdso_x86_64.S
/freebsd-11-stable/sys/contrib/cloudabi/syscalls.master
/freebsd-11-stable/sys/contrib/cloudabi/syscalls32.master
/freebsd-11-stable/sys/contrib/cloudabi/syscalls64.master
/freebsd-11-stable/sys/i386/cloudabi32
/freebsd-11-stable/sys/i386/cloudabi32/cloudabi32_sysvec.c
/freebsd-11-stable/sys/i386/conf/NOTES
/freebsd-11-stable/sys/modules/Makefile
/freebsd-11-stable/sys/modules/cloudabi/Makefile
/freebsd-11-stable/sys/modules/cloudabi32
/freebsd-11-stable/sys/modules/cloudabi32/Makefile
/freebsd-11-stable/sys/modules/cloudabi64/Makefile
/freebsd-11-stable/usr.bin/truss/syscalls.c
305928 18-Sep-2016 ed

Add very preliminary support for CloudABI for ARMv6.

In order to make CloudABI work on ARMv6, start off by copying over the
sysvec for ARM64 and adjust it to use 32-bit registers. Also add code
for fetching arguments from the stack if needed, as there are fewer
register than on ARM64.

Also import the vDSO that is needed to invoke system calls. This vDSO
uses the intra procedure call register (ip) to store the system call
number. This is a bit simpler than what native FreeBSD does, as FreeBSD
uses r7, while preserving the original r7 into ip.

This sysvec seems to be complete enough to start CloudABI processes.
These processes are capable of linking in the vDSO and are therefore
capable of executing (most?) system calls successfully. Unfortunately,
the biggest show stopper is still that TLS is completely broken:

- The linker used by CloudABI, LLD, still has troubles with some of the
relocations needed for TLS. See LLVM bug 30218 for more details.

- Whereas FreeBSD uses the tpidruro register for TLS, for CloudABI I
want to make use of tpidrurw, so that userspace can modify the base
address directly. This is needed for efficient emulation.
Unfortunately, this register doesn't seem to be preserved across
context switches yet.

Obtained from: https://github.com/NuxiNL/cloudabi (the vDSO)