Commit Graph

2768 Commits

Author SHA1 Message Date
Christian Prochaska
f79bcbd72a base-foc: add string separators in assertion messages
Fixes #2305
2017-03-15 12:24:44 +01:00
Christian Helmuth
6bc3bc5881 libc: use proper fd sets in select-handler select 2017-03-15 12:24:44 +01:00
Christian Helmuth
ca57afd67e terminal_crosslink: prevent deprecated warning 2017-03-15 12:24:43 +01:00
Martin Stein
a558afbed5 rpi sd_card: move to new Mmio::wait_for
Ref #2196
2017-03-15 12:24:43 +01:00
Martin Stein
31f4c0640a omap4 sd_card: move to new Mmio::wait_for
Ref #2196
2017-03-15 12:24:43 +01:00
Martin Stein
a42e53728d imx sd_card: move to new Mmio::wait_for 2017-03-15 12:24:43 +01:00
Martin Stein
acf762ec9f exynos5 fb_driver: use new Mmio::wait_for
Ref #2196
2017-03-15 12:24:43 +01:00
Martin Stein
7d4674b728 rpi platform driver: use new Mmio::wait_for
Ref #2196
2017-03-15 12:24:43 +01:00
Martin Stein
442c24420d mmio: separate MMIO access and register logic
By separating the plain MMIO access implementation from the generic bit
and offset logic of registers, we can now use the latter also with other
types of register access like I2C. The register and MMIO front-ends have
not changed due to the separation.

Ref #2196
2017-03-15 12:24:42 +01:00
Alexander Boettcher
25ac3cdd86 base: handle twice Lock::lock calls correctly
to avoid loosing threads in the applicants list if lock owner calls 'twice'
Lock::lock().

Fixes #2300
2017-03-15 12:24:42 +01:00
Alexander Boettcher
8102b78d22 base: extend thread test to test locks
Showcase issue #2300
2017-03-15 12:24:42 +01:00
Christian Prochaska
ca2871e2e4 nova: use 'Native_cpu' component for thread initialization
Pass the thread type and exception base to core with a 'Native_cpu'
component instead of enhancing the 'Thread_state' class.

Fixes #2298
2017-03-15 12:24:42 +01:00
Stefan Kalkowski
fbdfbc2476 bomb: remove redundant Rpc_entrypoint in Child
Fixes #2302
2017-03-15 12:24:41 +01:00
Stefan Kalkowski
96eb82574a hw: fix race in core's pager code (fix #2301)
* Acknowledge receive of page-fault signal with ack_signal,
  but restart thread execution separately
* use kill_signal_context when disolving a pager_object to prevent race
* Remove bureaucracy in form of Thread_event and Signal_ack_handler
* remove dead code in riscv, namely Thread_base definition
* translation_table_insertions function for ARM drops out,
  which was overcautious
2017-03-15 12:24:41 +01:00
Christian Helmuth
40f319e9e9 Terminate if pure virtual function is called
Fixes #2229
2017-03-15 12:24:41 +01:00
Martin Stein
dc415669aa signal test: add stressful nested test
Ref #2284
2017-03-15 12:24:40 +01:00
Christian Helmuth
8adaeeb8da Remove port of the DASH shell
It seems the download site vanished. Also, the utility remained unused
since years now.
2017-02-28 13:00:44 +01:00
Sebastian Sumpf
c707713be8 usb/rpi: fix inconsistency between C and C++
Change fiq_enable from 'int' to 'char' (is bool/_BOOL in C) so data does
not get overwritten accidentally.
2017-02-28 13:00:44 +01:00
Josef Söntgen
27cc20049e wifi: fix off-by-one in min PSK length handling
The MIN_PSK_LENGTH constant was not adjusted to accommodate for the
semcantic change when switching from using the raw char array to using
the Genode::String class. The Genode::String::length() method includes
the terminating NUL byte while strlen() does not.

Fixes #2296.
2017-02-28 13:00:44 +01:00
Josef Söntgen
5ad4da4b1b os: force Out_of_metadata exception in TRACE test
We have to create additional threads to trigger the Out_of_metadata
exception on certain platforms.

Fixes #2297.
2017-02-28 13:00:44 +01:00
Norman Feske
226ff08304 core: increase stack size of init-child entrypoint
With the commit "init: session-label rewriting", the stack usage
increased due to the handling of session-label strings as local
variables. The stack overrun occurred in the vmm scenario on
base-hw.
2017-02-28 13:00:44 +01:00
Adrian-Ken Rueegsegger
60dfddbe5a Increase fb_drv RAM quota in vbox auto scenarios
Otherwise the component runs out of memory with large screen
resolutions, e.g. 1920x1440@16.
2017-02-28 13:00:43 +01:00
Adrian-Ken Rueegsegger
bdfe3e1a8c Update Muen port
- Upgrade to Muen v0.8+
- Switch to https
- Download contrib when building kernel
- Append Muen compilation output to build log
- Explicitly init required submodule
2017-02-28 13:00:43 +01:00
Adrian-Ken Rueegsegger
6b66c819ef hw/doc: Update Muen tutorial 2017-02-28 13:00:43 +01:00
Adrian-Ken Rueegsegger
c7454dfb08 hw_x86_64_muen: Use scheduling info region
Return scheduling start and end values from scheduling info page.
2017-02-28 13:00:43 +01:00
Adrian-Ken Rueegsegger
86a3e0b8b3 hw_x86_64_muen: Add support for subject name to sinfo 2017-02-28 13:00:43 +01:00
Adrian-Ken Rueegsegger
712213af24 hw_x86_64_muen: Assert subject_info_type size 2017-02-28 13:00:43 +01:00
Reto Buerki
c16aa05f19 hw_x86_64_muen: Add support for mem content to sinfo 2017-02-28 13:00:42 +01:00
Christian Prochaska
4498137bd2 cpu_sampler: drop sub-init from run scripts
Now that environment sessions can be routed directly, the sub-init is not
needed anymore.

Fixes #2294
2017-02-28 13:00:42 +01:00
Christian Prochaska
a77e509283 cpu_sampler: kernel-agnostic build support
Fixes #2293
2017-02-28 13:00:42 +01:00
Christian Prochaska
e7958d999d gdb_monitor: kernel-agnostic build support
Fixes #2292
2017-02-28 13:00:42 +01:00
Martin Stein
daaddbd584 base*, os: get rid of all env() calls
Issue #1987
2017-02-28 13:00:42 +01:00
Martin Stein
9b8fcb5fd0 nano3d: get rid of env() calls
Issue #1987
2017-02-28 13:00:42 +01:00
Norman Feske
128faadc31 hw: suppress deprecated warning in signal.cc
The code will be revisited in the release cycle for version 17.05. As
there is nothing a user can do to fix the warning, let's remove it.
2017-02-28 13:00:41 +01:00
Martin Stein
56cafb3b57 hw: fix race in signal dispatching
There was a race when the component entrypoint wanted to do
'wait_and_dispatch_one_signal'. In this function it raises a flag for
the signal proxy thread to notice that the entrypoint also wants to
block for signals. When the flag is set and the signal proxy wakes up
with a new signal, it tried to cancel the blocking of the entrypoint.
However, if the entrypoint had not reached the signal blocking at this
point, the cancel blocking failed without a solution. Now, the new
Kernel::cancel_next_signal_blocking call solves the problem by storing a
request to cancel the next signal blocking of a thread immediately
without blocking itself.

Ref #2284
2017-02-28 13:00:41 +01:00
Sebastian Sumpf
2000b7c0e6 noux: add generic construction function
This function ('noux_construct') is called from each back-end's
construct method (libc or Genode component).

fixes #2291
2017-02-28 12:59:32 +01:00
Christian Prochaska
9067768d25 gdb_monitor: use 'with_libc()' 2017-02-28 12:59:32 +01:00
Alexander Boettcher
51515a598c tcp_terminal: avoid env deprecated warnings
Issue #2280
2017-02-28 12:59:31 +01:00
Christian Prochaska
e446fd5f7c Qt5: keyboard layout support
To select a different keyboard layout than the default 'en_us', override the
'language_chargen' function in your run script (after including
qt5_common.inc):

  proc language_chargen { } { return "de" }

where "de" refers to the character map file

  'repos/os/src/server/input_filter/de.chargen'

Issue #2264
2017-02-28 12:59:31 +01:00
Josef Söntgen
1f447c1460 mupdf: remove env deprecated warnings
Issue #2280.
2017-02-28 12:59:31 +01:00
Josef Söntgen
06f5ee21c0 file_terminal: remove env deprecated warnings
Issue #2280.
2017-02-28 12:59:31 +01:00
Josef Söntgen
567ec255f1 vbox_pointer: remove env deprecated warning
Issue #2280.
2017-02-28 12:59:31 +01:00
Josef Söntgen
552bb13f99 rom_logger: remove env deprecated warning
Issue #2280.
2017-02-28 12:59:31 +01:00
Norman Feske
23ad546a88 init: make RAM preservation configurable
This patch improves the accuracy of init's quota-saturation feature
(handing out all slack quota to a child by specifying an overly high RAM
quota for the child) and makes the RAM preserved by init configurable.
The preservation is specified as follows:

! <config>
!   ...
!   <resource name="RAM" preserve="1M"/>
!   ...
! </config>

If not specified, init has a reasonable default of 160K (on 32 bit) and
320K (on 64 bit).
2017-02-28 12:59:30 +01:00
Alexander Boettcher
28b359703d ram_fs: avoid Deref_unconstructed_object exception
if ROM is invalid. With the patch one gets a name of the ROM and the
server continues.
2017-02-28 12:59:30 +01:00
Alexander Boettcher
6c723fb1e8 vbox: test shared folder with overlay in ram_fs
avoids corrupted ext2fs in rump_fs
2017-02-28 12:59:30 +01:00
Alexander Boettcher
7c0542d4bc qemu-usb: avoid env deprecated warnings
Issue #2280
2017-02-28 12:59:30 +01:00
Josef Söntgen
ecd5bef7cb rom_to_file: remove Server library
Issue #2280.
2017-02-28 12:59:30 +01:00
Josef Söntgen
0c7200a0fe gpio: remove env deprecated warnings
And while there, remove usage of Server library.

Issue #2280.
2017-02-28 12:59:30 +01:00
Josef Söntgen
4f8804c334 input/imx53: remove env deprecated warnings
Issue #2280.
2017-02-28 12:59:30 +01:00
Norman Feske
29b8d609c9 Adjust file headers to refer to the AGPLv3 2017-02-28 12:59:29 +01:00
Martin Stein
8ab0a5c795 nic_router.run: avoid use of 'string cat'
It seems that our buildbot has a problem with the TCL command 'string
cat'. In most cases it is not necessary anyway as we can use the ""
enclosure instead. It unfolds inline procedure calls and variables
automatically. We don't want to use "" only in cases where the literal
shall contain many " characters itself as it is the case for XML
configs. Then we use the 'append' command and a helper variable instead.

Ref #2193
2017-02-28 12:59:28 +01:00
Norman Feske
70548959b7 os: fix session routes in rom_to_file.run 2017-02-28 12:59:28 +01:00
Sebastian Sumpf
d1fa549628 libports: adjust lwip and ldso scripts to new API 2017-02-28 12:59:28 +01:00
Sebastian Sumpf
35d2d582a4 base: free 'Cpu_free_component' from EP construction fails
It can happen that when Cpu_free_component is constructed the insertion
of the object through 'manage' succeeds for the EP put not for the pager
EP, which in turn raises an Out_of_meta_data exception. Because we are
within the constructor, the descstructor is not called, leading to a
dangling object pool entry for the EP.

issue #2289
2017-02-28 12:59:28 +01:00
Josef Söntgen
9ec553474e libc: remove global config accessor
Issue #2280.
2017-02-28 12:59:27 +01:00
Josef Söntgen
b3af297058 libc: remove global env from sysctl
Issue #2280.
2017-02-28 12:59:27 +01:00
Josef Söntgen
b2dd0ab436 libc: remove global env from socket_fs_plugin
Issue #2280.
2017-02-28 12:59:27 +01:00
Josef Söntgen
5ec7a0e2f8 libc: remove global env from mmap registry
Issue #2280.
2017-02-28 12:59:27 +01:00
Josef Söntgen
a79f7d234b libc: remove global env from fd_alloc
Issue #2280.
2017-02-28 12:59:27 +01:00
Norman Feske
150c286f0e init: dynamic configuration
This patch lets init apply configuration changes to a running scenario
in a differential way. Children are restarted if any of their session
routes change, new children can be added to a running scenario, or
children can deliberately be removed.

Furthermore, the new version of init is able to propagate configuration
changes (modifications of <config> nodes) to its children without
restarting them.
2017-02-28 12:59:26 +01:00
Norman Feske
bc236bbcde launchpad: remove superfluous include 2017-02-28 12:59:26 +01:00
Norman Feske
fcb861689a base: support for re-validating session routes
This patch supplements 'Session_state' with the methods needed to test
the validity of a session with a changed routing policy.
2017-02-28 12:59:26 +01:00
Norman Feske
a9795c93f9 init: use buffered XML for config 2017-02-28 12:59:26 +01:00
Norman Feske
e4fba26a85 init: Genode::String for unique and binary name
This patch removes the use of C-style string functions from init.
2017-02-28 12:59:26 +01:00
Sebastian Sumpf
9d67633b8b base-foc: remove obsolete mk files
* remove everything under base-foc/mk/spec
* add correct SPECS for x86 in base-foc/etc/specs.conf

issue #2288
2017-02-28 12:59:25 +01:00
Christian Prochaska
c4eea920a4 libc: fix resume mechanism
Fixes #2287
2017-02-28 12:59:25 +01:00
Josef Söntgen
76cb06794a libports: Libc::with_libc nested
Fixes #2286.
2017-02-28 12:59:25 +01:00
Martin Stein
c20bfd4414 echo_udp: do often create, bind, and close socket
Ref #2285
2017-02-28 12:59:25 +01:00
Martin Stein
d61cb2714c libc/socket_fs: unlink during close
If 'close' does not call 'unlink' like 'shutdown', the Lxip_socket_dir
never gets destroyed and thus the socket server leaks resources like
RAM and ports.

Ref #2285
2017-02-28 12:59:25 +01:00
Martin Stein
d5b1f4fa5f echo_udp.run: remove unnecessary stdcxx
Ref #2285
2017-02-28 12:59:25 +01:00
Martin Stein
43fcdc43e6 libc/socket_fs: warn on unexpected arg in shutdown
Our 'shutdown' implementation handles only the case that 'how' is 'RDWR'.
Thus, print an error and continue if a user calls it with another value.

Fixes #2285
2017-02-28 12:59:24 +01:00
Alexander Boettcher
1a6963813c libc: avoid race using Libc::suspend with pthreads
TOCTTOU bug, in our case time of check to time of sleep bug
2017-02-28 12:59:24 +01:00
Sebastian Sumpf
553a4222f4 base: entrypoint dissolve signal proxy
If not dissolved in ~Entrypoint, the signal proxy is found within NOVA's
and FOC's object pool upon Rpc_entrypoint destruction. This leads to a
deadlock because the signal proxy is destructed before the RPC EP.

issue #2284
2017-02-28 12:59:24 +01:00
Norman Feske
dfc4c58782 root/component.h: POLICY::release on exception
This patch ensures that the POLICY::release is called whenever the
session creation aborted with an exception. In the original version, an
exception like 'Quota_exceeded' caused a single-session root interface
to deny subsequent session requests.
2017-02-28 12:59:24 +01:00
Christian Prochaska
db0dc0d97c libc: unblock main thread in 'Kernel::resume_all()'
If 'Libc::Kernel::resume:all()' is called from a non-main thread, send a
signal to unblock the main thread from 'wait_and_dispatch_one_signal()'.

Fixes #2283
2017-02-28 12:59:24 +01:00
Alexander Boettcher
3226dd0649 vbox: remove signal receiver usage for fb & input
avoids deadlocks due to new libc and vfs usage
2017-02-28 12:59:23 +01:00
Alexander Boettcher
328da2975f vfs: fix races in fs_file_system with pthreads
Change metadata before submitting a packet. If the submitting thread is a
pthread, the metadata may be immediately change by the signal handler running
in the context of the entrypoint thread.
2017-02-28 12:59:23 +01:00
Josef Söntgen
69c48a3626 os: refactor Global_file_system_factory
The global file system factory is now created explicitly and the
global singleton accessor function was removed.

Fixes #2281.
2017-02-28 12:59:23 +01:00
Norman Feske
7d9f68493a base: support for multi-staged child startup
This patch enhances the 'Child' and 'Child_policy' with the ability to
separate the different steps of bootstrapping children. If the
'Child_policy::initiate_env_sessions()' returns false, the child's
environment sessions remain unrouted at construction time. This way,
child objects for many children can be initialized to a state that
allows the children to represent services for other children. Therefore,
session routing can be applied before any child executes.

At this stage, the environment RAM sessions of all children can be
created. Note that this step still has the limitation that RAM sessions
are generally expected to be provided by either the parent or a local
service.

Once all children are equipped with RAM, they can in principle receive
session-quota donations. Hence, all other environment sessions can now
be arbitrarily routed and initiated.

Once the environment of a child is complete, the child's process and
initial thread is created.
2017-02-28 12:59:23 +01:00
Norman Feske
9cba459958 base: remove Child::heap
This patch improves the accounting for the backing store of
session-state meta data. Originally, the session state used to be
allocated by a child-local heap partition fed from the child's RAM
session. However, whereas this approach was somehow practical from a
runtime's (parent's) point of view, the child component could not count
on the quota in its own RAM session. I.e., if the Child::heap grew at
the parent side, the child's RAM session would magically diminish. This
caused two problems. First, it violates assumptions of components like
init that carefully manage their RAM resources (and giving most of them
away their children). Second, if a child transfers most of its RAM
session quota to another RAM session (like init does), the child's RAM
session may actually not allow the parent's heap to grow, which is a
very difficult error condition to deal with.

In the new version, there is no Child::heap anymore. Instead, session
states are allocated from the runtime's RAM session. In order to let
children pay for these costs, the parent withdraws the local session
costs from the session quota donated from the child when the child
initiates a new session. Hence, in principle, all components on the
route of the session request take a small bite from the session quota to
pay for their local book keeping

Consequently, the session quota that ends up at the server may become
depleted more or less, depending on the route. In the case where the
remaining quota is insufficient for the server, the server responds with
'QUOTA_EXCEEDED'. Since this behavior must generally be expected, this
patch equips the client-side 'Env::session' implementation with the
ability to re-issue session requests with successively growing quota
donations.

For several of core's services (ROM, IO_MEM, IRQ), the default session
quota has now increased by 2 KiB, which should suffice for session
requests to up to 3 hops as is the common case for most run scripts. For
longer routes, the retry mechanism as described above comes into effect.
For the time being, we give a warning whenever the server-side quota
check triggers the retry mechanism. The warning may eventually be
removed at a later stage.
2017-02-28 12:59:23 +01:00
Norman Feske
641fb08b5f Automated test for init 2017-02-28 12:59:23 +01:00
Norman Feske
84fddafda7 init: enable init to report its internal state
This patch equips init with the ability to report its internal state in
the form of a "state" report. This feature can be enabled by placing a
'<report>' node in init's configuration.

The report node accepts the following arguments (with their default
values):

'delay_ms="100"': specifies the number of milliseconds to wait before
  producing a new report. This way, many consecutive state changes -
  like they occur during the startup - do not result in an overly
  large number of reports but are merged into one final report.

'buffer="4K"': the maximum size of the report in bytes. The attribute
  accepts the use of K/M/G as units.

'init_ram="no"': if enabled, the report will contain a '<ram>' node
  with the memory stats of init.

'ids="no"': supplement the children in the report with unique IDs, which
  may be used to infer the lifetime of children accross configuration
  updates in the future;

'requested="no"': if enabled, the report will contain information about
  all session requests initiated by the children.

'provided="no"': if enabled, the report will contain information about
  all sessions provided by all servers.

'session_args="no"': level of detail of the session information
  generated via 'requested' or 'provided'.

'child_ram="no"': if enabled, the report will contain a '<ram>' node
  for each child based on the information obtained from the child's RAM
  session.

Issue #2246
2017-02-28 12:59:22 +01:00
Norman Feske
9d683a56a0 base: add Child_policy::session_state_changed()
This method is a hook to enable a runtime to respond to state changes.
In particular, in init this hook is used to trigger the generation of a
new state report, if configured.

Furthermore, the patch introduces the 'generate_client_side_info' and
'generate_server_side_info' methods to the 'Session_state', which
generates an XML representation of the session states to appear in
reports produced by init.

Issue #2246
2017-02-28 12:59:22 +01:00
Martin Stein
a74a0092b3 nic_router.run: raise Qemu RAM size
Ref #2193
2017-02-28 12:59:22 +01:00
Martin Stein
d301022fe7 nic_router.run: do not append but concatenate
Makes the script more readable and saves 100 LOC.

Ref #2193
2017-02-28 12:59:22 +01:00
Martin Stein
412c5e5be4 run/platform_drv: add append-free interface
Normally, the platform driver helpers adapt the global run variables directly
via append. But the introduction of a more elegant run script style, that
incorporates dependent strings inline may be a good idea. Thus, we need the
backends of the helpers available as functions that return their string rather
than appending it.

The old interface still exists and uses the new interface as backend.

Ref #2193
2017-02-28 12:59:22 +01:00
Martin Stein
d2832c3e4d lwip/http_clnt: remove unused variable
Ref #2193
2017-02-28 12:59:22 +01:00
Martin Stein
a88954394a nic_bridge tests: simplify test names
Ref #2193
2017-02-28 12:59:21 +01:00
Martin Stein
dc4e2325d0 nic_router.run: use static IP config in general
Dynamic IP configuration is a problem when testing on real machines
in a network that behaves differently than the DHCP in QEMU.

Ref #2193
2017-02-28 12:59:21 +01:00
Martin Stein
a4d110aa60 nic_router: fix indentation in verbose log
Ref #2193
2017-02-28 12:59:21 +01:00
Martin Stein
959b80bab1 lxip/lwip tests: non-libc attributes to config tag
The 'server_ip' and 'server_port' attributes for 'lxip/udp_client' and
'lwip/http_clnt' as well as the 'port' attribute for 'lxip/udp_echo' and
'lwip/http_srv_static' are not directly libc-related so they should not
live in the libc tag but in the config tag of the component.

Ref #2193
2017-02-28 12:59:21 +01:00
Martin Stein
a9535d5311 nic_router.run: update to new usage of the VFS tag
Use <config><vfs/></config> instead of <config><libc><vfs/></libc></config>.

Ref #2193
2017-02-28 12:59:21 +01:00
Josef Söntgen
e266e3cf1d floating_window_layouter: remove deprecated env()
Issue #2280.
2017-02-28 12:59:21 +01:00
Norman Feske
e951425c59 nit_fader: fix "deprecated" warning
Issue #1987
2017-02-28 12:59:20 +01:00
Norman Feske
e17811fb7a cli_monitor: API transition
Issue #1987
2017-02-28 12:59:20 +01:00
Norman Feske
bfdadc55b2 base: Add Number_of_bytes::print method
This method attempts to print the number with a K/M/G unit if possible
and thereby increases the human readability of generated output.
2017-02-28 12:59:20 +01:00
Norman Feske
8cb0dc9c16 init: session-label rewriting
This patch enhances init with the support for rewriting session labels
in the target node of a matching session route. For example, a Noux
instance may have the following session route for the "home" file
system:

<route>
  <service name="File_system" label="home">
    <child name="rump_fs"/>
  </service>
  ...
</route>

At the rump_fs file-system server, the label of the file-system session
will appear as "noux -> home". This information may be evaluated by
rump_fs's server-side policy. However, when renaming the noux instance,
we'd need to update this server-side policy.

With the new mechanism, the client's identity can be hidden from the
server. The label could instead represent the role of the client, or a
name of a physical resource. For example, the Noux route could be
changed to this:

<route>
  <service name="File_system" label="home">
    <child name="rump_fs" label="primary_user"/>
  </service>
  ...
</route>

When the rump_fs receives the session request, it is presented with the
label "primary_user". The fact that the client is "noux" is not taken
into account for the server-side policy selection.

Issue #2248
2017-02-28 12:59:20 +01:00
Norman Feske
c0af463b81 base: Add Child_policy::Route
The new return value of 'resolve_session_request' allows the child
policy to define the label used as the policy selector at the server.

Because this patch introduces the distinction of the child-provided
label from the label as presented to the server along with the session
request, the latter is now handled as a dedicated 'Session_state'
argument.

Issue #2248
2017-02-28 12:59:20 +01:00
Sebastian Sumpf
2d199982eb os: add 'wait_and_dispatch_one_signal' test 2017-02-28 12:59:20 +01:00
Martin Stein
06e605defa LibC VFS: Warn on possible FD path leaks 2017-02-28 12:59:19 +01:00
Martin Stein
222a789fef LibC socket FS: Fix leak of remote and local files 2017-02-28 12:59:19 +01:00
Christian Prochaska
1df4e53cba Qt5: use 'Libc::with_libc()' where needed
Fixes #2282
2017-02-28 12:59:19 +01:00
Norman Feske
b1a9addeb6 os/child_policy_dynamic_rom.h: API transition
Issue #1987
2017-02-28 12:59:19 +01:00
Alexander Boettcher
9ba24c0722 vbox: use with_libc 2017-02-28 12:59:19 +01:00
Christian Helmuth
4eb04119a5 test: TCP echo server and client 2017-02-28 12:59:19 +01:00
Josef Söntgen
b1dca8e047 os: pass env to connections in uart test
Issue #2280.
2017-02-28 12:59:18 +01:00
Martin Stein
335685b7fe usb: get rid of combined specs
Issue #2280.
2017-02-28 12:59:18 +01:00
Josef Söntgen
15821e32ec nic: remove usage of deprecated env()
This commit includes changes to the Nic::Session_component interface.
We now pass the entire env to the component instead of only ram, rm and
the ep because we need the env to open connections from within the
Session_component implemenation. So far only the cadence_gem driver
needs this, though.

Issue #2280.
2017-02-28 12:59:18 +01:00
Josef Söntgen
e6e1d8c144 platform/arm: remove usage of deprecated env()
Issue #2280.
2017-02-28 12:59:18 +01:00
Josef Söntgen
0b9272bd9c timer: remove usage of deprecated env()
Issue #2280.
2017-02-28 12:59:18 +01:00
Josef Söntgen
de401f37fb uart/x86: remove usage of deprecated env()
Issue #2280.
2017-02-28 12:59:18 +01:00
Josef Söntgen
493d3e58cf ps2: remove usage of deprecated env()
Issue #2280.
2017-02-28 12:59:17 +01:00
Josef Söntgen
3c57a8b3c2 usb_session: pass Region_map explicitly
Issue #2280.
2017-02-28 12:59:17 +01:00
Josef Söntgen
a2cff03539 dde_linux: remove usage of deprecated env()
Fixes #2280.
2017-02-28 12:59:17 +01:00
Josef Söntgen
7d91b1d949 dde_bsd: remove usage of deprecated env()
Issue #2280.
2017-02-28 12:59:17 +01:00
Josef Söntgen
69925ee126 ahci: remove usage of deprecated env()
The remaining warnings are false-positives because os/attached_mmio.h
contains both constructor variants.

Issue #2280.
2017-02-28 12:59:17 +01:00
Christian Helmuth
eab477370f libc: select support for components
Libc components cannot use regular calls to select() as this may suspend
their execution. In this case incoming RPCs will be deferred until
select() returns and the component returns to the entrypoint dispatch
loop. The Libc::Signal_handler solves this problem with a its select()
that either returns the currently ready file descriptors immediately or
calls the registered handler function during libc resume.
2017-02-28 12:59:17 +01:00
Christian Helmuth
f7f18710de libc: tests for components using RPC and select() 2017-02-28 12:59:16 +01:00
Christian Helmuth
0aac473229 libc: component-compatible execution semantics
Now, the libc kernel supports to execute application code from all RPC
functions not only Component::construct(). This is enabled by the
Libc::with_libc() scope function.
2017-02-28 12:59:16 +01:00
Norman Feske
3a65f0bba3 libc: 'with_libc' mechanism to enter libc runtime
This commit extends an easy-to-use mechanism to allow Genode component
code to enter/leave the libc application context. This is needed
whenever low-level component code (like signal handlers or RPC
functions) need to interact with potentially blocking libc I/O
functions.

Please note that this commit contains the API-level design only. The
actual context switching code 'execute_in_application_context' is
missing.
2017-02-28 12:59:16 +01:00
Christian Helmuth
fdad5116dd libc: support for socket file system
The socket file system can be configured in the "socket" attribute of
the libc config node like follows.

  <vfs> <dir name="socket"> <fs/> </dir> </vfs>
  <libc ... socket="/socket"/>

This configures the socket file system libc backend to access files in
"/socket" for socket operations.
2017-02-28 12:59:16 +01:00
Christian Helmuth
ad185fe1fe vfs: improve read-ready handling in VFS server 2017-02-28 12:59:16 +01:00
Emery Hemingway
9d7cda04fa test: RFC862 UDP echo server 2017-02-28 12:59:15 +01:00
Sebastian Sumpf
304f2eaf38 lxip: VFS plugin
Provides file-system compatible to libc socket-fs requirements. This
includes pseudo file for network configuration.
2017-02-28 12:59:15 +01:00
Christian Helmuth
1f29e1854a lxip: poll_does_not_wait() for non-blocking API 2017-02-27 15:37:50 +01:00
Norman Feske
8e6306e8e3 base: tolerate nested signal handling (but warn) 2017-02-27 15:37:50 +01:00
Sebastian Sumpf
b66716d278 base: entrypoint 'wait_and_dispatch_one_signal'
There existed a race when 'wait_and_dispatch_one_signal' is called form
a RPC context, because the 'signal_proxy' or 'main' will block and the
signal semaphore, when the EP then calls 'wait_and_dispatch_one_signal',
the signal proxy is woken up ands sends an RPC to the EP, leading to a
dead lock if no further signal arrive, because the EP will then remain
blocked in the signal semaphore.

Therefore, for this case, the signal proxy will now perform a semaphore
up operation and does not perform an RPC if the EP is within
'wait_and_dispatch_one_signal'.
2017-02-27 15:37:50 +01:00
Norman Feske
652f92c9c9 init: 'unscoped_label' session-routing attribute
This patch enhances init with the ability to route individual
environment sessions. Prior this patch, environment sessions could be
routed only by an all-encompassing '<service>' node that would match
both child-initiated and environment sessions.

In contrast to the existing 'label', 'label_prefix', and 'label_suffix'
attributes of '<service>' nodes, which are always scoped with ther name
of the corresponding child, the 'unscoped_label' allows the definition
of routing rules for all session requests, including init's requests for
the child's environment sessions. For example, to route the ROM session
requests for a child's dynamic linker, the following route would match:

<route>
  <service name="ROM" unscoped_label="ld.lib.so"> ... </service>
</route>

Issue #2215
2017-02-27 15:37:49 +01:00
Martin Stein
0b5db07948 vfs fs: ignore dead handle IDs on handle_ack
When a directory gets destructed it dissolves the handles of each contained file
but the acknowledgement might be still in-flight. If we finally receive it,
it leads to an Unknown_id exception on the Handles ID Space in 'handle_ack'.
Now we catch it, print a warning, and go on.
2017-02-27 15:37:49 +01:00
Norman Feske
19868de69a launcher: API transition (deprecated warnings)
Issue #1987
2017-02-27 15:37:49 +01:00
Norman Feske
c6c79acf8e gems/wm: API transition (deprecated warnings)
Issue #1987
2017-02-27 15:37:49 +01:00
Norman Feske
aee90ed453 Adapt components to new Event::CHARACTER type
Issue #2264
2017-02-27 15:37:49 +01:00
Norman Feske
455bd9396e gems/terminal: support 'CHARACTER' events
This patch adds the handling of 'CHARACTER' events as emitted by the
input-filter's character generator (<chargen>). To avoid interpreting
press/release events twice (at the input filter and by the terminal's
built-in scancode tracker), the terminal's scancode tracker can be
explicitly disabled via <config> <keyboard layout="none"/> </config>.
In the future, the terminal's built-in scancode tracker will be
removed.

The use of the terminal with the input filter is illustrated by the
'terminal_echo.run' script.

Issue #2264
2017-02-27 15:37:49 +01:00
Norman Feske
2ce87216bc os: input_filter implementation and test
The input_filter is the successor of the input_merger. In addition to
merging input streams, the component applies several forms of input
transformations such as the application of keyboard layouts.

Issue #2264
2017-02-27 15:37:49 +01:00
Norman Feske
859d23d92b os: introduce Input::Event::CHARACTER type
Character events are created via a dedicated 'Event' constructor that
takes an 'Event:Utf8' object as argument. Internally, the character is
kept in the '_code' member. The 'Utf8' value can by retrieved by the
recipient via the new 'utf8' method.

Issue #2264
2017-02-23 15:03:29 +01:00
Johannes Schlatow
762728fee0 base: remove superfluous line feeds in print_lines
Fixes #2279
2017-02-23 15:03:29 +01:00
Christian Helmuth
eda0828ca0 Skip binary files in GEN_INCLUDES
A binary file may be a temporary Vim .swp file when examining contrib
sources. The commit prevents build errors like

  .../repos/dde_linux/lib/mk/lxip_include.mk:29:
  target '.../x86_64/var/libcache/lxip_include/include/include/include/Binary'
  given more than once in the same rule
  .../repos/dde_linux/lib/mk/lxip_include.mk:29:
  target '.../x86_64/var/libcache/lxip_include/include/include/include/file'
  given more than once in the same rule
  ...
2017-02-23 15:03:28 +01:00
Christian Helmuth
61b6dccf13 Queued read/write/read_ready in VFS and servers 2017-02-23 15:03:28 +01:00
Christian Helmuth
01daf19947 Extend libc counter tests 2017-02-23 14:54:51 +01:00
Christian Helmuth
6e5f3d432e Post signal-handler hook in entrypoint
A Signal_handler may schedule a hook function that is executed after the
signal handler returned. This can be used if the hook function may
trigger a (nested) signal handler by means of
wait_and_dispatch_one_signal(). Otherwise, an occurrence of the same
signal that triggered the original signal handler results in a dead lock
just before calling the nested handler (due to the Signal_context
destruction lock).
2017-02-23 14:54:51 +01:00
Christian Helmuth
b805e001db Add READ_READY support to file-system session
The read-ready packet informs the server that the client wants to be
notified if a handle becomes readable. When becoming readable, the
server acknowledges packet and the client may queue a read requests
accordingly.
2017-02-23 14:54:51 +01:00
Christian Helmuth
8185a49b4c libc: replace Timed_semaphore by suspend with timeout 2017-02-23 14:54:50 +01:00
Sebastian Sumpf
3048017d90 lxip: schedule timeout + poll wait
* poll_wait + schedule_timeout +  block on wait_and_dispatch_one_signal
2017-02-23 14:54:50 +01:00
Martin Stein
ed370a8f5c Introduce gpio_drv function in run scripts
Do not use automatic alias in the run tool for the name of the
gpio-driver binary.

Ref #2268
2017-02-23 14:54:50 +01:00
Christian Helmuth
957653d4b9 libc: separate unit for freeaddrinfo/getaddrinfo
Preperation for merge of libc_resolv into libc.
2017-02-23 14:54:50 +01:00
Christian Prochaska
2d700d0b2d lxip: return zero-initialized memory in '__alloc_percpu()' 2017-02-23 14:54:49 +01:00
Christian Prochaska
59f38fe38c lxip: implement 'rt_genid_ipv4()' and "rt_genid_bump_ipv4()' 2017-02-23 14:54:49 +01:00
Christian Prochaska
7b3a6e6347 lxip: delete default gateway route before reconfiguration 2017-02-23 14:54:49 +01:00
Sebastian Sumpf
b8b34efef9 lxip: dhcp update on link state change 2017-02-23 14:54:49 +01:00