regen syscall files after 0bd5d81f1edf
Regen after r366145.Sponsored by: DARPA
compat: clean up empty lines in .c and .h files
sysent targets: further cleanup and deduplicationr355473 vastly improved the readability and cleanliness of these Makefiles.Every single one of them follows the same pattern and duplicates the exa
sysent targets: further cleanup and deduplicationr355473 vastly improved the readability and cleanliness of these Makefiles.Every single one of them follows the same pattern and duplicates the exactsame logic.Now that we have GENERATED/SRCS, split SRCS up into the two parameters we'lluse for ${MAKESYSCALLS} rather than assuming a specific ordering of SRCS andinclude a common sysent.mk to handle the rest. This makes it less tedious tomake sweeping changes.Some default values are provided for GENERATED/SYSENT_*; almost all of thesejust use a 'syscalls.master' and 'syscalls.conf' in cwd, and they all useeffectively the same filenames with an arbitrary prefix. Most ABIs will beable to get away with just setting GENERATED_PREFIX and including^/sys/conf/sysent.mk, while others only need light additions. kern/Makefileis the notable exception, as it doesn't take a SYSENT_CONF and the generatedfiles are spread out between ^/sys/kern and ^/sys/sys, but it otherwise fitsthe pattern enough to use the common version.Reviewed by: brooks, impNice!: emasteDifferential Revision: https://reviews.freebsd.org/D23197
show more ...
Set .ORDER for makesyscalls generated filesWhen either makesyscalls.lua or syscalls.master changes, all of the${GENERATED} targets are now out-of-date. With make jobs > 1, this means wewill run t
Set .ORDER for makesyscalls generated filesWhen either makesyscalls.lua or syscalls.master changes, all of the${GENERATED} targets are now out-of-date. With make jobs > 1, this means wewill run the makesyscalls script in parallel for the same ABI, generatingthe same set of output files.Prior to r356603 , there is a large window for interlacing output for someof the generated files that we were generating in-place rather than stagingin a temp dir. After that, we still should't need to run the script morethan once per-ABI as the first invocation should update all of them. Add.ORDER to do so cleanly.Reviewed by: brooksDiscussed with: sjgDifferential Revision: https://reviews.freebsd.org/D23099
sysent: Reduce duplication and improve readability.Use the power of variable to avoid spelling out source and generatedfiles too many times. The previous Makefiles were hard to read, hard toedit
sysent: Reduce duplication and improve readability.Use the power of variable to avoid spelling out source and generatedfiles too many times. The previous Makefiles were hard to read, hard toedit, and badly formatted.Reviewed by: kevans, emasteSponsored by: DARPA, AFRLDifferential Revision: https://reviews.freebsd.org/D22714
Use uintptr_t instead of register_t * for the stack base.- Use ustringp for the location of the argv and environment strings and allow destp to travel further down the stack for the stackgap an
Use uintptr_t instead of register_t * for the stack base.- Use ustringp for the location of the argv and environment strings and allow destp to travel further down the stack for the stackgap and auxv regions.- Update the Linux copyout_strings variants to move destp down the stack as was done for the native ABIs in r263349.- Stop allocating a space for a stack gap in the Linux ABIs. This used to hold translated system call arguments, but hasn't been used since r159992.Reviewed by: kibTested on: md64 (amd64, i386, linux64), i386 (i386, linux)Sponsored by: DARPADifferential Revision: https://reviews.freebsd.org/D22501
Convert in-tree sysent targets to use new makesyscalls.luaflua is bootstrapped as part of the build for those on olderversions/revisions that don't yet have flua installed. Once upgraded pastr354
Convert in-tree sysent targets to use new makesyscalls.luaflua is bootstrapped as part of the build for those on olderversions/revisions that don't yet have flua installed. Once upgraded pastr354833, "make sysent" will again naturally work as expected.Reviewed by: brooksDifferential Revision: https://reviews.freebsd.org/D21894
Check for errors from copyout() and suword*() in sv_copyout_args/strings.Reviewed by: brooks, kibTested on: amd64 (amd64, i386, linux64), i386 (i386, linux)Sponsored by: DARPADifferential Revisi
Check for errors from copyout() and suword*() in sv_copyout_args/strings.Reviewed by: brooks, kibTested on: amd64 (amd64, i386, linux64), i386 (i386, linux)Sponsored by: DARPADifferential Revision: https://reviews.freebsd.org/D22401
Regen after r347228 and r352693.No functional change.
makesyscalls.sh: always use absolute path for syscalls.confsyscalls.conf is included using "." which per the Open Group: If file does not contain a <slash>, the shell shall use the search path s
makesyscalls.sh: always use absolute path for syscalls.confsyscalls.conf is included using "." which per the Open Group: If file does not contain a <slash>, the shell shall use the search path specified by PATH to find the directory containing file.POSIX shells don't fall back to the current working directory.Submitted by: Nathaniel Wesley Filardo <[email protected]>Reviewed by: bdrewerySponsored by: DARPA, AFRLDifferential Revision: https://reviews.freebsd.org/D20476
Add helper functions to copy strings into struct image_args.Given a zeroed struct image_args with an allocated buf member,exec_args_add_fname() must be called to install a file name (or NULL).The
Add helper functions to copy strings into struct image_args.Given a zeroed struct image_args with an allocated buf member,exec_args_add_fname() must be called to install a file name (or NULL).Then zero or more calls to exec_args_add_env() followed by zero ormore calls to exec_args_add_env(). exec_args_adjust_args() may becalled after args and/or env to allow an interpreter to be prepended tothe argument list.To allow code reuse when adding arg and env variables, begin_envvshould be accessed with the accessor exec_args_get_begin_envv()which handles the case when no environment entries have been added.Use these functions to simplify exec_copyin_args() andfreebsd32_exec_copyin_args().Reviewed by: kibObtained from: CheriBSDSponsored by: DARPA, AFRLDifferential Revision: https://reviews.freebsd.org/D15468
Regenerated assorted syscall related files after: - r327895: Implement 'domainset'... - r329876: Use linux types for linux-specific syscallsDiff generated with: find . -name syscalls.conf | xarg
Regenerated assorted syscall related files after: - r327895: Implement 'domainset'... - r329876: Use linux types for linux-specific syscallsDiff generated with: find . -name syscalls.conf | xargs dirname | \ xargs -n1 -I DIR make -C DIR sysentApproved by: re (kib)Sponsored by: DARPA, AFRL
Don't use an .OBJDIR for 'make sysent'.Reported by: emaste, jhbSponsored by: Dell EMC
Use mallocarray(9) in CloudABI kernel code where possible.Submitted by: pfg@
Allow timed waits with relative timeouts on locks and condvars.Even though pthreads doesn't support this, there are various alternativeAPIs that use this. For example, uv_cond_timedwait() accepts
Allow timed waits with relative timeouts on locks and condvars.Even though pthreads doesn't support this, there are various alternativeAPIs that use this. For example, uv_cond_timedwait() accepts a relativetimeout. So does Rust's std::sync::Condvar::wait_timeout().Though I personally think that relative timeouts are bad (due toimprecision for repeated operations), it does seem that people wantthis. Extend the existing futex functions to keep track of whether anabsolute timeout is used in a boolean flag.MFC after: 1 month
Upgrade to CloudABI v0.17.Compared to the previous version, v0.16, there are a couple of minorchanges:- CLOUDABI_AT_PID: Process identifiers for CloudABI processes. Initially, BSD process ide
Upgrade to CloudABI v0.17.Compared to the previous version, v0.16, there are a couple of minorchanges:- CLOUDABI_AT_PID: Process identifiers for CloudABI processes. Initially, BSD process identifiers weren't exposed inside the runtime, due to them being pretty much useless inside of a cluster computing environment. When jobs are scheduled across systems, the BSD process number doesn't act as an identifier. Even on individual systems they may recycle relatively quickly. With this change, the kernel will now generate a UUIDv4 when executing a process. These UUIDs can be obtained within the process using program_getpid(). Right now, FreeBSD will not attempt to store this value. This should of course happen at some point in time, so that it may be printed by administration tools.- Removal of some unused structure members for polling. With the polling framework being simplified/redesigned, it turns out some of the structure fields were not used by the C library. We can remove these to keep things nice and tidy.Obtained from: https://github.com/NuxiNL/cloudabi
Import the latest CloudABI definitions, version 0.16.The most important change in this release is the removal of thepoll_fd() system call; CloudABI's equivalent of kevent(). Though I thinkthat kq
Import the latest CloudABI definitions, version 0.16.The most important change in this release is the removal of thepoll_fd() system call; CloudABI's equivalent of kevent(). Though I thinkthat kqueue is a lot saner than many of its alternatives, ourexperience is that emulating this system call on other systemsaccurately isn't easy. It has become a complex API, even though I'm notconvinced this complexity is needed. This is why we've decided to take adifferent approach, by looking one layer up.We're currently adding an event loop to CloudABI's C library that is APIcompatible with libuv (except when incompatible with Capsicum).Initially, this event loop will be built on top of plain inefficientpoll() calls. Only after this is finished, we'll work our way backwardsand design a new set of system calls to optimize it.Interesting challenges will include integrating asynchronous I/O intosuch a system call API. libuv currently doesn't aio(4) on Linux/BSD, dueto it being unreliable and having undesired semantics.Obtained from: https://github.com/NuxiNL/cloudabi
Complete the CloudABI networking refactoring.Now that all of the packaged software has been adjusted to either useFlower (https://github.com/NuxiNL/flower) for making incoming/outgoingnetwork con
Complete the CloudABI networking refactoring.Now that all of the packaged software has been adjusted to either useFlower (https://github.com/NuxiNL/flower) for making incoming/outgoingnetwork connections or can have connections injected, there is no longerneed to keep accept() around. It is now a lot easier to write networkedservices that are address family independent, dual-stack, testable, etc.Remove all of the bits related to accept(), but also togetsockopt(SO_ACCEPTCONN).
Sync CloudABI compatibility against the latest upstream version (v0.13).With Flower (CloudABI's network connection daemon) becoming morecomplete, there is no longer any need for creating any uncon
Sync CloudABI compatibility against the latest upstream version (v0.13).With Flower (CloudABI's network connection daemon) becoming morecomplete, there is no longer any need for creating any unconnectedsockets. Socket pairs in combination with file descriptor passing is allthat is necessary, as that is what is used by Flower to pass networkconnections from the public internet to listening processes.Remove all of the kernel bits that were used to implement socket(),listen(), bindat() and connectat(). In principle, accept() andSO_ACCEPTCONN may also be removed, but there are still some consumersleft.Obtained from: https://github.com/NuxiNL/cloudabiMFC after: 1 month
Upgrade to the latest sources generated from the CloudABI specification.The CloudABI specification has had some minor changes over the last halfyear. No substantial features have been added, but s
Upgrade to the latest sources generated from the CloudABI specification.The CloudABI specification has had some minor changes over the last halfyear. No substantial features have been added, but some features thatare deemed unnecessary in retrospect have been removed:- mlock()/munlock(): These calls tend to be used for two different purposes: real-time support and handling of sensitive (cryptographic) material that shouldn't end up in swap. The former use case is out of scope for CloudABI. The latter may also be handled by encrypting swap. Removing this has the advantage that we no longer need to worry about having resource limits put in place.- SOCK_SEQPACKET: Support for SOCK_SEQPACKET is rather inconsistent across various operating systems. Some operating systems supported by CloudABI (e.g., macOS) don't support it at all. Considering that they are rarely used, remove support for the time being.- getsockname(), getpeername(), etc.: A shortcoming of the sockets API is that it doesn't allow you to create socket(pair)s, having fake socket addresses associated with them. This makes it harder to test applications or transparently forward (proxy) connections to them. With CloudABI, we're slowly moving networking connectivity into a separate daemon called Flower. In addition to passing around socket file descriptors, this daemon provides address information in the form of arbitrary string labels. There is thus no longer any need for requesting socket address information from the kernel itself.This change also updates consumers of the generated code accordingly.Even though system calls end up getting renumbered, this won't cause anyproblems in practice. CloudABI programs always call into the kernelthrough a kernel-supplied vDSO that has the numbers updated as well.Obtained from: https://github.com/NuxiNL/cloudabi
Make file descriptor passing for CloudABI's recvmsg() work.Similar to the change for sendmsg(), create a pointer size independentimplementation of recvmsg() and let cloudabi32 and cloudabi64 call
Make file descriptor passing for CloudABI's recvmsg() work.Similar to the change for sendmsg(), create a pointer size independentimplementation of recvmsg() and let cloudabi32 and cloudabi64 call intoit. In case userspace requests one or more file descriptors, callkern_recvit() in such a way that we get the control message headers inan mbuf. Iterate over all of the headers and copy the file descriptorsto userspace.
Make file descriptor passing work for CloudABI's sendmsg().Reduce the potential amount of code duplication between cloudabi32 andcloudabi64 by creating a cloudabi_sock_recv() utility function. The
Make file descriptor passing work for CloudABI's sendmsg().Reduce the potential amount of code duplication between cloudabi32 andcloudabi64 by creating a cloudabi_sock_recv() utility function. Thecloudabi32 and cloudabi64 modules will then only contain code to convertthe iovecs to the native pointer size.In cloudabi_sock_recv(), we can now construct an SCM_RIGHTS cmsghdr inan mbuf and pass that on to kern_sendit().
Regenerate all the system call tables to drop "created from" lines.One of the ibcs2 files contains some actual changes (new headers) asit hasn't been regenerated after older changes to makesyscall
Regenerate all the system call tables to drop "created from" lines.One of the ibcs2 files contains some actual changes (new headers) asit hasn't been regenerated after older changes to makesyscalls.sh.
Catch up with changes to structure member names.Pointer/length pairs are now always named ${name} and ${name}_len.
12