#
53458494 |
| 14-Jun-2016 |
David van Moolenbroek <david@minix3.org> |
IPC: use RMIB to handle kern.ipc sysctl subtree
With this patch, the IPC service is changed to use the new RMIB facility to register and handle the "kern.ipc" sysctl subtree itself. The subtree was
IPC: use RMIB to handle kern.ipc sysctl subtree
With this patch, the IPC service is changed to use the new RMIB facility to register and handle the "kern.ipc" sysctl subtree itself. The subtree was previously handled by the MIB service directly. This change improves locality of handling: especially the kern.ipc.sysvipc_info node has some peculiarities specific to the IPC service and is therefore better handled there. Also, since the IPC service is essentially optional to the system, this rearrangement yields a cleaner situation when the IPC service is not running: in that case, the MIB service will expose a few basic kern.ipc nodes indicating that no SysV IPC facilities are present. Those nodes will be overridden through RMIB when the IPC service is running.
It should be easier to add the remaining (from NetBSD) kern.ipc nodes as well now.
Test88 is extended with a new subtest that verifies that sysctl-based information retrieval for semaphore sets works as expected.
Change-Id: I6b7730e85305b64cfd8418c0cc56bde64b22c584
show more ...
|
#
5b1db956 |
| 17-Dec-2015 |
David van Moolenbroek <david@minix3.org> |
IPC server: subscribe to process events on demand
As mentioned in previous patches, services may not subscribe to process events from specific processes only, since this results in race conditions.
IPC server: subscribe to process events on demand
As mentioned in previous patches, services may not subscribe to process events from specific processes only, since this results in race conditions. However, the IPC server can safely turn on and off its entire subscription based on whether any System V IPC semaphores (and, in the future, message queues) are allocated at all. Since the System V IPC facilities are not so commonly used, this removes the extra round trip from PM to the IPC server and back for caught signals and process exits in the common case.
Change-Id: I937259034872be32f4e26ab99270f4d475ff6134
show more ...
|
#
56dc79ce |
| 17-Dec-2015 |
David van Moolenbroek <david@minix3.org> |
IPC server: major fixes, test set for semaphores
- rewrite the semop(2) implementation so that it now conforms to the specification, including atomicity, support for blocking more than once, ran
IPC server: major fixes, test set for semaphores
- rewrite the semop(2) implementation so that it now conforms to the specification, including atomicity, support for blocking more than once, range checks, but also basic fairness support; - fix permissions checking; - fix missing time adjustments; - fix off-by-one errors and other bugs; - do not allocate dynamic memory for GETALL/SETALL; - add test88, which properly tests the semaphore functionality.
Change-Id: I85f0d3408c0d6bba41cfb4c91a34c8b46b2a5959
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 ...
|
#
0baafa0e |
| 25-Nov-2015 |
David van Moolenbroek <david@minix3.org> |
IPC server: restyle
Closer to KNF, better coding practices, more similar to other services, no more global variables, a few more comments, that kind of stuff. No major functional changes.
Change-I
IPC server: restyle
Closer to KNF, better coding practices, more similar to other services, no more global variables, a few more comments, that kind of stuff. No major functional changes.
Change-Id: I6e8f53bfafd6f41e92031fba76c40a31d2107a8e
show more ...
|
#
4d272e5a |
| 24-Nov-2015 |
David van Moolenbroek <david@minix3.org> |
IPC server: NetBSD sync, general improvements
- switch to the NetBSD identifier system; it is not only better, but also required for porting NetBSD ipcs(1) and ipcrm(1); however, it requires tha
IPC server: NetBSD sync, general improvements
- switch to the NetBSD identifier system; it is not only better, but also required for porting NetBSD ipcs(1) and ipcrm(1); however, it requires that slots not be moved, and that results in some changes; - synchronize some other things with NetBSD: where keys are kept, as well as various non-permission mode flags; - fix semctl(2) vararg retrieval and message field type; - use SUSPEND instead of weird reply exceptions in the call table; - fix several memory leaks and at least one missing permission check; - improve the atomicity of semop(2) by a small amount, even though its atomicity is still broken at a fundamental level; - use the new cheaper way to retrieve the current time; - resolve all level-5 LLVM warnings.
Change-Id: I0c47aacde478b23bb77d628384aeab855a22fdbf
show more ...
|
#
58c1923c |
| 23-Nov-2015 |
David van Moolenbroek <david@minix3.org> |
IPC server: expose semaphore information
Specifically, add support for the IPC_INFO, SEM_INFO, and SEM_STAT semctl(2) operations, similar to how information about shared memory is already exposed as
IPC server: expose semaphore information
Specifically, add support for the IPC_INFO, SEM_INFO, and SEM_STAT semctl(2) operations, similar to how information about shared memory is already exposed as well. The MINIX3 ipcs(1) utility already had support for these operations, and can now actually use them, too.
Change-Id: Ice5a02e729bf6df6aa8fab76e854808adc04dae3
show more ...
|
#
433d6423 |
| 28-Jul-2014 |
Lionel Sambuc <lionel@minix3.org> |
New sources layout
Change-Id: Ic716f336b7071063997cf5b4dae6d50e0b4631e9
|