| #
f7df02e7 |
| 12-Oct-2016 |
David van Moolenbroek <david@minix3.org> |
libnetdriver: rewrite
This is a driver-breaking update to the netdriver library, which is used by all network drivers. The aim of this change is to make the library more compatible with NetBSD, and
libnetdriver: rewrite
This is a driver-breaking update to the netdriver library, which is used by all network drivers. The aim of this change is to make the library more compatible with NetBSD, and in particular with various features that are expected to be supported by the NetBSD userland. The main changes made by this patch are the following:
- each network driver now has a NetBSD-style short device name; - drivers are not expected to receive packets right after startup; - extended support for receipt modes, including multicast lists; - support for multiple parallel send, receive requests; - embedding of I/O vectors in send and receive requests; - support for capabilities, including checksum offloading; - support for reporting link status updates to the TCP/IP stack; - support for setting and retrieving media status; - support for changing the hardware (MAC) address; - support for NetBSD interface flags IFF_DEBUG, IFF_LINK[0-2]; - support for NetBSD error statistics; - support for regular time-based ("tick") callbacks.
IMPORTANT: this patch applies a minimal update to the existing drivers in order to make them work at all with the new netdriver library. It however does *not* change all drivers to make use of the new features. In fact, strictly speaking, all drivers are now violating requirements imposed by the new library in one way or another, most notably by enabling packet receipt when starting the driver. Changing all the drivers to be compliant, and to support the newly added options, is left to future patches. The existing drivers should currently *not* be taken as examples of how to implement a new network driver!
With that said, a few drivers have already been changed to make use of some of the new features: fxp, e1000, rtl8139, and rtl8169 now report link and media status, and the last three of those now support setting the hardware MAC address on the fly. In addition, dp8390 has been changed to default to PCI autoconfiguration if no configuration is specified through environment variables.
Change-Id: I4b3ea9c0b9bc25d5b0609c6ff256fb0db71cdc42
show more ...
|
| #
dd969671 |
| 27-Dec-2015 |
David van Moolenbroek <david@minix3.org> |
UDS: prepare for socket file creation in bind(2)
This patch prepares for moving of the creation of socket files on the file system from the libc bind(2) stub into the UDS service. This change is ne
UDS: prepare for socket file creation in bind(2)
This patch prepares for moving of the creation of socket files on the file system from the libc bind(2) stub into the UDS service. This change is necessary for the socket type agnostic libc implementation. The change is not yet activated - the code that is not yet used is enclosed in "#if NOT_YET" blocks. The activation needs to be atomic with UDS's switch to libsockdriver; otherwise, user applications may break.
As part of the change, various UDS bind(2) semantics are changed to match the POSIX standard and other operating systems. In implementation terms, the service-only VFS API checkperms(2) is renamed to socketpath(2), and extended with a new subcall which creates a new socket file. An extension to test56 checks the new bind(2) semantics of UDS, although most new tests are still disabled until activation as well.
Finally, as further preparation for a more structural redesign of the UDS service, also return the <device,inode> number pair for the created or checked file name, and make returning the canonized path name optional.
Change-Id: I892d04b3301d4b911bdc571632ddde65fb747a8a
show more ...
|
| #
491d647a |
| 25-Jul-2016 |
David van Moolenbroek <david@minix3.org> |
VFS: support for suspending close(2) for sockets
This change effectively adds the VFS side of support for the SO_LINGER socket option, by allowing file descriptor close operations to be suspended (a
VFS: support for suspending close(2) for sockets
This change effectively adds the VFS side of support for the SO_LINGER socket option, by allowing file descriptor close operations to be suspended (and later resumed) by socket drivers. Currently, support is limited to the close(2) system call--in all other cases where file descriptors are closed (dup2, close-on-exec, process exit..), the close operation still completes instantly. As a general policy, the close(2) return value will always indicate that the file descriptor has been closed: either 0, or -1 with errno set to EINPROGRESS. The latter error may be thrown only when a suspended close is interrupted by a signal.
As necessary for UDS, this change also introduces a closenb(2) system call extension, allowing the caller to bypass blocking SO_LINGER close behavior. This extension allows UDS to avoid blocking on closing the last reference to an in-flight file descriptor, in an atomic fashion. The extension is currently part of libsys, but there is no reason why userland would not be allowed to make this call, so it is deliberately not protected from use by userland.
Change-Id: Iec77d6665232110346180017fc1300b1614910b7
show more ...
|
| #
3ac58492 |
| 24-Sep-2016 |
David van Moolenbroek <david@minix3.org> |
Add LLVM GCOV coverage support
With this patch, it is now possible to generate coverage information for MINIX3 system services with LLVM. In particular, the system can be built with MKCOVERAGE=yes,
Add LLVM GCOV coverage support
With this patch, it is now possible to generate coverage information for MINIX3 system services with LLVM. In particular, the system can be built with MKCOVERAGE=yes, either with a native "make build" or with crosscompilation. Either way, MKCOVERAGE=yes will build the MINIX3 system services with coverage profiling support, generating a .gcno file for each source module. After a reboot it is possible to obtain runtime coverage data (.gcda files) for individual system services using gcov-pull(8). The combination of the .gcno and .gcda files can then be inspected with llvm-cov(1).
For reasons documented in minix.gcov.mk, only system service program modules are supported for now; system service libraries (libsys etc.) are not included. Userland programs are not affected by MKCOVERAGE.
The heart of this patch is the libsys code that writes data generated by the LLVM coverage hooks into a serialized format using the routines we already had for GCC GCOV. Unfortunately, the new llvm_gcov.c code is LLVM ABI dependent, and may therefore have to be updated later when we upgrade LLVM. The current implementation should support all LLVM versions 3.x with x >= 4.
The rest of this patch is mostly a light cleanup of our existing GCOV infrastructure, with as most visible change that gcov-pull(8) now takes a service label string rather than a PID number.
Change-Id: I6de055359d3d2b3f53e426f3fffb17af7877261f
show more ...
|
| #
6f3e0bcd |
| 23-Apr-2016 |
David van Moolenbroek <david@minix3.org> |
MIB/libsys: support for remote MIB (RMIB) subtrees
Most of the nodes in the general sysctl tree will be managed directly by the MIB service, which obtains the necessary information as needed. Howeve
MIB/libsys: support for remote MIB (RMIB) subtrees
Most of the nodes in the general sysctl tree will be managed directly by the MIB service, which obtains the necessary information as needed. However, in certain cases, it makes more sense to let another service manage a part of the sysctl tree itself, in order to avoid replicating part of that other service in the MIB service. This patch adds the basic support for such delegation: remote services may now register their own subtrees within the full sysctl tree with the MIB service, which will then forward any sysctl(2) requests on such subtrees to the remote services.
The system works much like mounting a file system, but in addition to support for shadowing an existing node, the MIB service also supports creating temporary mount point nodes. Each have their own use cases. A remote "kern.ipc" would use the former, because even when such a subtree were not mounted, userland would still expect some of its children to exist and return default values. A remote "net.inet" would use the latter, as there is no reason to precreate nodes for all possible supported networking protocols in the MIB "net" subtree.
A standard remote MIB (RMIB) implementation is provided for services that wish to make use of this functionality. It is essentially a simplified and somewhat more lightweight version of the MIB service's internals, and works more or less the same from a programmer's point of view. The most important difference is the "rmib" prefix instead of the "mib" prefix. Documentation will hopefully follow later.
Overall, the RMIB functionality should not be used lightly, for several reasons. First, despite being more lightweight than the MIB service, the RMIB module still adds substantially to the code footprint of the containing service. Second, the RMIB protocol not only adds extra IPC for sysctl(2), but has also not been optimized for performance in other ways. Third, and most importantly, the RMIB implementation also several limitations. The main limitation is that remote MIB subtrees must be fully static. Not only may the user not create or destroy nodes, the service itself may not either, as this would clash with the simplified remote node versioning system and the cached subtree root node child counts. Other limitations exist, such as the fact that the root of a remote subtree may only be a node-type node, and a stricter limit on the highest node identifier of any child in this subtree root (currently 4095).
The current implementation was born out of necessity, and therefore it leaves several improvements to future work. Most importantly, support for exit and crash notification is missing, primarily in the MIB service. This means that remote subtrees may not be cleaned up immediately, but instead only when the MIB service attempts to talk to the dead remote service. In addition, if the MIB service itself crashes, re-registration of remote subtrees is currently left up to the individual RMIB users. Finally, the MIB service uses synchronous (sendrec-based) calls to the remote services, which while convenient may cause cascading service hangs. The underlying protocol is ready for conversion to an asynchronous implementation already, though.
A new test set, testrmib.sh, tests the basic RMIB functionality. To this end it uses a test service, rmibtest, and also reuses part of the existing test87 MIB service test.
Change-Id: I3378fe04f2e090ab231705bde7e13d6289a9183e
show more ...
|
| #
910831cb |
| 12-Dec-2015 |
David van Moolenbroek <david@minix3.org> |
PM: generic process event publish/subscribe system
Now that there are services other than PM and VFS that implement userland system calls directly, these services may need to know about events relat
PM: generic process event publish/subscribe system
Now that there are services other than PM and VFS that implement userland system calls directly, these services may need to know about events related to user processes. In particular, signal delivery may have to interrupt blocking system calls, and certain cleanup tasks may have to be performed after a user process exits.
This patch aims to implement a generic, lasting solution for this problem, by allowing services to subscribe to "signal delivered" and/or "process exit" events from PM. PM publishes such events by sending messages to its subscribed services, which must then reply an acknowledgment message.
For now, only the two aforementioned events are implemented, and only the IPC service makes use of the process event facility.
The new process event publish/subscribe system replaces the previous VM notify-sig/watch-exit/query-exit system, which was unsound: 1) it allowed subscription to events from individual processes, and suffered from fundamental race conditions as a result; 2) it relied on "not too many" processes making use of the IPC server functionality in order to avoid loss of notifications. In addition, it had the "ipc" process name hardcoded, did not distinguish between signal delivery and exits, and added a roundtrip to VM for all events from all processes.
Change-Id: I75ebad4bc54e646c6433f473294cb4003b2c3430
show more ...
|
| #
1f3ef2b2 |
| 02-Nov-2015 |
David van Moolenbroek <david@minix3.org> |
Kernel: per-process CPU utilization statistics
See the comment at the top of the new cpuavg.c file for details.
Change-Id: Ic45617d00736931575949b702e98f9a4fd083768
|
| #
bc2d75fa |
| 27-Sep-2015 |
David van Moolenbroek <david@minix3.org> |
Rework getrusage(2) infrastructure
- the userland call is now made to PM only, and PM relays the call to other servers as appropriate; this is an ABI change that will ultimately allow us to add
Rework getrusage(2) infrastructure
- the userland call is now made to PM only, and PM relays the call to other servers as appropriate; this is an ABI change that will ultimately allow us to add proper support for wait3() and the like; for the moment there is backward compatibility; - the getrusage-specific kernel subcall has been removed, as it provided only redundant functionality, and did not provide the means to be extended correctly in the future - namely, allowing the kernel to return different values depending on whether resource usage of the caller (self) or its children was requested; - VM is now told whether resource usage of the caller (self) or its children is requested, and it refrains from filling in wrong values for information it does not have; - VM now uses the correct unit for the ru_maxrss values; - VFS is cut out of the loop entirely, since it does not provide any values at the moment; a comment explains how it should be readded.
Change-Id: I27b0f488437dec3d8e784721c67b03f2f853120f
show more ...
|
| #
7c48de6c |
| 21-Sep-2015 |
David van Moolenbroek <david@minix3.org> |
Resolve more warnings
Change-Id: Ibc1b7f7cd45ad7295285e59c6ce55888266fece8
|
| #
abf8a7e7 |
| 14-Jul-2015 |
David van Moolenbroek <david@minix3.org> |
RS/VM: proper preparation for multi-VM live update
Due to changed VM internals, more elaborate preparation is required before a live update with multiple components including VM can take place. Thi
RS/VM: proper preparation for multi-VM live update
Due to changed VM internals, more elaborate preparation is required before a live update with multiple components including VM can take place. This patch adds the essential preparation infrastructure to VM and adapts RS to make use of it. As a side effect, it is no longer necessary to supply RS as the last component (if at all) during the set-up of a multicomponent live update operation.
Change-Id: If069fd3f93f96f9d5433998e4615f861465ef448
show more ...
|
| #
d196e2c3 |
| 30-Sep-2014 |
Cristiano Giuffrida <giuffrida@cs.vu.nl> |
sef: Extensions for new RS.
Change-Id: I89b6f8015b1f9c46bf98694450bdaa80b7777940
|
| #
685aa793 |
| 30-Sep-2014 |
David van Moolenbroek <david@minix3.org> |
libsys: resolve clang warnings
Change-Id: Ic954ba8667b4d039172b8e0d2ec57674a479b8aa
|
| #
1dcfbcd1 |
| 30-Sep-2014 |
David van Moolenbroek <david@minix3.org> |
Remove support for call profiling
The entire infrastructure relied on an ACK feature, and as such, it has been broken for years now, with no easy way to repair it.
Change-Id: I783c2a21276967af115a6
Remove support for call profiling
The entire infrastructure relied on an ACK feature, and as such, it has been broken for years now, with no easy way to repair it.
Change-Id: I783c2a21276967af115a642199f31fef0f14a572
show more ...
|
|
Revision tags: v3.3.0 |
|
| #
ad80a203 |
| 24-Aug-2014 |
David van Moolenbroek <david@minix3.org> |
Move clock_time into libsys
Change-Id: Ibc5034617e6f6581de7c4a166ca075b3c357fa82
|
| #
433d6423 |
| 28-Jul-2014 |
Lionel Sambuc <lionel@minix3.org> |
New sources layout
Change-Id: Ic716f336b7071063997cf5b4dae6d50e0b4631e9
|