Commit Graph

5732 Commits

Author SHA1 Message Date
Norman Feske eea493a8ca base: safeguard entrypoint against double manage
This patch adds sanity checks to the RPC entrypoint that detect attempts
to manage or dissolve the same RPC object twice. This is not always a
bug. I.e., if RPC objects are implemented in the modern way where the
object manages/dissolves itself. As the generic framework code (in
particular root/component.h) cannot rely on this pattern, it has to
call manage/dissolve for session objects anyway. For modern session
objects, this double attempt would result in a serious error (double
insertion into the object pool's AVL tree).

Issue #2398
2017-05-31 13:16:05 +02:00
Norman Feske 843dd179d7 base: remove int return types from 'Ram_session'
This patch replaces the existing C-style error codes with C++
exceptions.

Fixes #895
2017-05-31 13:16:04 +02:00
Norman Feske 58f44d39c5 base: use 'Ram_quota' in 'Ram_session' args
This patch replaces the former use of size_t with the use of the
'Ram_quota' type to improve type safety (in particular to avoid
accidentally mixing up RAM quotas with cap quotas).

Issue #2398
2017-05-31 13:16:04 +02:00
Norman Feske ff68d77c7d base: new 'Ram_allocator' interface
The 'Ram_allocator' interface contains the subset of the RAM session
interface that is needed to satisfy the needs of the 'Heap' and
'Sliced_heap'. Its small size makes it ideal for intercepting memory
allocations as done by the new 'Constrained_ram_allocator' wrapper
class, which is meant to replace the existing 'base/allocator_guard.h'
and 'os/ram_session_guard.h'.

Issue #2398
2017-05-31 13:16:04 +02:00
Norman Feske 5a468919bb base: new session-creation helper types
This patch augments the existing session/session.h with useful types for
the session creation:

* The new 'Insufficient_ram_quota' and 'Insufficient_cap_quota'
  exceptions are meant to supersede the old 'Quota_exceeded' exception
  of the 'Parent' and 'Root' interfaces.

* The 'Session::Resources' struct subsumes the information about the
  session quota provided by the client.

* The boolean 'Session::Diag' type will allow sessions to operate in a
  diagnostic mode.

* The existing 'Session_label' is not also available under the alias
  'Session::Label'.

* A few helper functions ease the extraction of typed session arguments
  from the session-argument string.

Issue #2398
2017-05-31 13:16:04 +02:00
Norman Feske 220890534a base: 'Quota_guard' utility for tracking quotas
* Introduces 'Cap_quota' and 'Ram_quota' types
* Introduces 'Out_of_caps' and 'Out_of_ram' exceptions

Issue #2398
2017-05-31 13:16:04 +02:00
Norman Feske c1b981ede4 Annotate session interfaces with CAP_QUOTA
The new 'CAP_QUOTA' enum value denotes the capability quota to be
transferred from the client to the server at session-creation time.

Issue #2398
2017-05-31 13:16:04 +02:00
Norman Feske bc82cce72b core: add Platform::max_caps()
This method returns the kernel-specific system-global limit of the total
number of capabilities.

Issue #2398
2017-05-31 13:16:03 +02:00
Norman Feske 82a98065a0 base-hw: upgrade cap-space slab less eagerly
This patch upgrades the cap-space slab only if the kernel runs out of
entries, instead of consuming as much PD-session quota as possible.
Until now, the behavior worked well because the cap-space slab was the
only consumer of PD-session quota. However, once we start accounting all
PD session meta data - and eventually merging the PD and RAM services -
the aggressive scheme stands in the way.

Issue #2398
2017-05-31 13:16:03 +02:00
Norman Feske 5b1e3466be base: construct 'Tslab' with allocator reference
The new constructor avoids the use of a pointer.
2017-05-31 13:16:03 +02:00
Norman Feske f5bdab4518 base: add Slab::avail_entries accessor
This accessor is useful to eagerly expand the slab with new slab blocks,
side stepping the slab's built-in policy for the allocation of new slab
blocks.

This is particularly important when using the slab for allocating the
cap space meta-data for the base-hw kernel. To guarantee that the slab
gets never exhausted in the kernel, it is expanded before entering the
kernel.
2017-05-31 13:16:03 +02:00
Norman Feske 67481fdfc3 base: support exceptions during _new_slab_block
With the introduction of the 'Out_of_caps' exception type, the slab
needs to consider exceptions during the call of '_new_slab_block' by
reverting the 'nested' state.
2017-05-31 13:16:03 +02:00
Christian Helmuth c79155fd7b libc_ffat: zero-init 'struct tm' on stack
This prevents the following runtime error.

  Error: mktime() returned -1, the file modification time reported by stat() will be incorrect
2017-05-31 13:16:03 +02:00
Christian Helmuth e9b42a127b dde_linux: download libnl from github.com/thom311
The old download location is very shaky resp. currently unavailable and
also other projects (e.g., Gentoo and Linux From Scratch) use this
location. Note, the archive hash does _not_ change.
2017-05-31 13:16:02 +02:00
Alexander Boettcher 106a0db664 vbox5: update to 5.1.22
Issue #2338
2017-05-31 13:16:02 +02:00
Emery Hemingway f7d80a9bf9 drivers/ahci: clean exit when no controllers are found
Fix #2402
2017-05-31 13:16:02 +02:00
Johannes Kliemann aac0ac7c63 dde_linux: kernel-version independent file lists
Replace the version dependent file lists with generic ones to simplify
kernel version changes.

Fixes #2368
2017-05-31 13:16:02 +02:00
Norman Feske 03d7208386 Turn posix lib into shared library
By building the posix library as shared object with an ABI, we
effectively decouple posix-using programs from the library
implementation (which happens to depend on several os-level APIs such as
the VFS).
2017-05-31 13:16:02 +02:00
Christian Helmuth 1828f70037 Fix deprecated warnings in servers
Issue #1987
2017-05-31 13:16:02 +02:00
Christian Helmuth f41d8d6b14 core: fix compiler warnings 2017-05-31 13:16:01 +02:00
Emery Hemingway 01e8f7ea3d libc: do not open stdio descriptors unless configured to do so
Fix #2396
2017-05-31 13:16:01 +02:00
Emery Hemingway 24a9537a27 File_system: replace per-handle signals with notification packets
Replace registration and signaling of per-handle signal capabilities
with CONTENT_CHANGED notification packets.

Fix #2397
2017-05-31 13:16:01 +02:00
Emery Hemingway 29b3fff5eb app/rom_to_file: catch Node_already_exists and overwrite files
Ref #1934
2017-05-31 13:16:01 +02:00
Stefan Kalkowski 6106e64aac base: remove include/spec/* other than ISA
This commit moves the headers residing in `repos/base/include/spec/*/drivers`
to `repos/base/include/drivers/defs` or repos/base/include/drivers/uart`
respectively. The first one contains definitions about board-specific MMIO
iand RAM addresses, or IRQ lines. While the latter contains device driver
code for UART devices. Those definitions are used by driver implementations
in `repos/base-hw`, `repos/os`, and `repos/dde-linux`, which now need to
include them more explicitely.

This work is a step in the direction of reducing 'SPEC' identifiers overall.

Ref #2403
2017-05-31 13:16:01 +02:00
Alexander Boettcher 80eddd8731 usb: add OHCI support
Fixes #2357
2017-05-31 13:16:00 +02:00
Alexander Boettcher 74b790f70b vbox5: add multiple VM test case 2017-05-31 13:16:00 +02:00
Alexander Boettcher b403bd9d3e vbox5: fix memory allocation by VMM
This is a fixup of c782966 "vbox5: track memory allocation by VMM".

Issue #2338
2017-05-31 13:16:00 +02:00
Alexander Boettcher 0cf18081f9 virtualbox.run: extension to run multiple VMs
set use_gui to get 2 VMs

Issue #2338
2017-05-31 13:16:00 +02:00
Alexander Boettcher 33ab53e42a vbox5: update to 5.1.20
Issue #2338
2017-05-31 13:16:00 +02:00
Alexander Boettcher 1a18c6b727 vbox4/5: enable key/value store for guest addition
required for enable vbox 5 guest additions, which otherwise deny to work

Issue #2338
2017-05-31 13:16:00 +02:00
Alexander Boettcher b1d35570df vbox5: add shared folder test
Issue #2338
2017-05-31 13:15:59 +02:00
Alexander Boettcher 0d4f4f70d2 vbox5: enable audio support
Issue #2338
2017-05-31 13:15:59 +02:00
Alexander Boettcher d7f0cb5463 vbox5: use gip thread also for timer watchdog
causes the rem timer callback pending check to run more often (every 1 ms
instead 10 ms). This is essential to met the timeout requirements of the
audio backend, which must be checked&run every 5ms.
2017-05-31 13:15:59 +02:00
Alexander Boettcher 800f9d1e44 vbox5: enable xhci model
Issue #2338
2017-05-31 13:15:59 +02:00
Alexander Boettcher ecc98c293e qemu-usb: avoid operating on stale memory
during for loop in garbage_collect

Issue #2362
2017-05-31 13:15:59 +02:00
Alexander Boettcher 760c04c53a qemu-usb: respect size of assignment
fixes vbox4 and vbox5 xhci support

Issue #2362
2017-05-31 13:15:59 +02:00
Christian Helmuth e3d8b6098f netty: do UDP and TCP tests
This commit replaces echo_udp with the netty_udp test. TCP can be tested
via netty_tcp.
2017-05-31 13:15:58 +02:00
Christian Helmuth 4ab2b85437 lxip: support large sendmsg (like recvmsg)
Add missing socket wait-queue head on demand.
2017-05-31 13:15:58 +02:00
Christian Helmuth 9802ae83e0 libc: rework socket fs for O_NONBLOCK 2017-05-31 13:15:58 +02:00
Christian Helmuth 3b5c16e307 lxip: poll/read_ready for all socket fs files 2017-05-31 13:15:58 +02:00
Christian Helmuth 1d99e7ede9 base: classify signals as I/O and application level
Fixes #2363
2017-05-31 13:15:58 +02:00
Christian Helmuth e33d65aea0 libc: test nested signal handling and RPC
Issue #2363
2017-05-31 13:15:58 +02:00
Christian Helmuth a65a4c8621 netty: non-blocking server test 2017-05-31 13:15:57 +02:00
Christian Helmuth b3819f30dc libc: support for O_NONBLOCK in read() 2017-05-31 13:15:57 +02:00
Christian Helmuth f7313e841d vfs_lxip: always allow broadcast packets for UDP 2017-05-31 13:15:57 +02:00
Alexander Boettcher 3f5c1b3626 top: fix replacement strategy
Issue #2307
2017-05-31 13:15:57 +02:00
Christian Prochaska 623e0be0e1 fiasco: fix compilation with GCC 6
Issue #2372
2017-05-31 13:15:57 +02:00
Norman Feske 9a6c194432 init: fix constness-related warnings by gcc 6.3
Fixes #2374
2017-05-31 13:15:57 +02:00
Norman Feske 4f19e4b6af gems: import run-script ingredients from depot
This patch adjusts the interactive scenarios of the gems repository to
use the depot. This has three immediate benefits. First, once the depot
is populated with binary archives, the start time of the scenarios
becomes very quick because most dependency checks and build steps are
side-stepped. Second, the run scripts become more versatile. In
particular, run scripts that were formerly supported on base-linux only
(nit_fader, decorator, menu_view) have become usable on all base
platforms that have a 'drivers_interactive' package defined. Finally,
the run scripts have become much shorter.

Issue #2339
2017-05-31 13:15:57 +02:00
Norman Feske 015d319fa7 run: link all files in [run_dir]/genode to core
This way, files copied from the depot are incorporated in addition to
the files explicitly specified as boot modules.

The patch also adds an automatic check for the validity of the XML
syntax of boot modules ending with '.config'.

Issue #2339
2017-05-31 13:15:56 +02:00