Commit Graph

6301 Commits

Author SHA1 Message Date
Norman Feske bbc21cf063 util/bit_array.h: remove use of memset and memcpy
This makes the code less dependent on functions considered unsafe.

Fixes #3748
2020-05-05 13:30:15 +02:00
Christian Helmuth f722aa3325 os: src recipe for lx_fs 2020-05-04 15:59:29 +02:00
Norman Feske eb0a33302a libc: strip trailing '/' for directory operations
Fixes #2686
2020-05-04 15:28:47 +02:00
Christian Prochaska 151828752c vfs: handle read error in fs file system
Issue #3742
2020-04-28 11:43:12 +02:00
Christian Prochaska 6a8fb48c13 vfs server: keep ack packet intact on failure
Issue #3742
2020-04-28 11:42:52 +02:00
Christian Prochaska 07b87f6f1f pthread: initialize static condition variables
Fixes #3741
2020-04-28 11:42:16 +02:00
Christian Prochaska 905b0c4aef libc: remove log2.patch
Fixes #3740
2020-04-28 11:41:38 +02:00
Christian Prochaska 6505ce47ae libc vfs plugin: report non-zero link count in 'stat()'
Fixes #3739
2020-04-28 11:40:58 +02:00
Christian Prochaska 31d7b3eb97 vfs_lwip: guard 'blocked_handles' Fifo
Fixes #3738
2020-04-28 11:37:56 +02:00
Alexander Boettcher 80d89c20fd top: use batched subject_infos of trace session
Issue #3610
2020-04-28 08:58:03 +02:00
Alexander Boettcher 1a94338389 trace: support to request subject infos batched
Optimize requesting the Subject_infos from O(n) to O(1) RPC call.

Issue #3610
2020-04-28 08:57:57 +02:00
Norman Feske dd899fde29 depot: update recipe hashes 2020-04-24 14:37:57 +02:00
Norman Feske 1bf796d69a Remove Rust support
Fixes #3488
2020-04-24 14:37:57 +02:00
Norman Feske c12d76686e Move OpenVPN to genode-world repository
Fixes #3737
2020-04-24 14:37:57 +02:00
Stefan Kalkowski 199821a247 os: re-enable drivers_interactive for i.MX53
* Fix IPU hardware structure layout
* Turn Signal_handler into Io_signal_handler
* Eliminate the faulty msleep in I2C initalization sequence
* Fix routes and resources for tablet board (i.MX53 SMD)

Fix #3735
2020-04-24 14:37:57 +02:00
Norman Feske 840f383e46 Remove input_merger component
Fixes #3736
2020-04-24 14:37:57 +02:00
Norman Feske 6f6340644b Hide binary_ready_hook_for_platform from public
The hook is meant to be internal to the framework. So better keep its
declaration in the framework-internal globals.h header.

Issue #3581
2020-04-24 14:37:47 +02:00
Norman Feske b134867f31 Remove Rpc_entrypoint::Native_context
This patch largely reverts the commit "base: lay groundwork for
base-linux caps change" because the use of 'epoll' instead of 'select'
alleviated the need to allocate large FD sets, which motivated the
introduction of the 'Native_context' hook.

Related to issue #3581
2020-04-21 16:50:37 +02:00
Norman Feske 01bf32b998 Remove ram_fs server
Fixes #3734
2020-04-21 16:27:07 +02:00
Norman Feske f14cc2edab Replace use of ram_fs by VFS server
Issue #3734
2020-04-21 16:24:37 +02:00
Norman Feske f0c4fc1e22 sandbox: defer requests for upcoming server
The sandbox library supports the forwarding of session requests from the
outside to one of the hosted children according to a policy. This patch
introduces the distinction between two cases, which previously triggered
the denial of the session request.

- There exists no matching policy for the requested session
- There exists a matching policy but the referred server child
  does not exist (yet)

Whereas the proper response to the first case is the denial of the
request, the second case can occur in situation where a dynamic init is
used to implement a staged startup, for example via the deploy
mechanism. In such cases, a policy may exist as a static rule while the
server has not been started yet. This patch changes the behavior such
that such requests are stalled.

The patch is accompanied with test cases for exercising both situations.

Fixes #3733
2020-04-21 14:52:29 +02:00
Alexander Boettcher f891f4c963 vm_stress: change output message for ci scripts
so that it detect it correctly as not available instead of a failure on
normal work days

Issue #3683
2020-04-20 12:36:00 +02:00
Stefan Kalkowski 9f28f4f803 hw: avoid BASE_DIR relative path definitions
Fix #3728
2020-04-17 12:55:13 +02:00
Stefan Kalkowski 0e49336b96 Retire Exynos 5 support (fix #3725) 2020-04-17 12:53:57 +02:00
Stefan Kalkowski 941e918b46 vmm: unify armv7/v8 virtualization
Fix #3638
2020-04-17 12:52:02 +02:00
Stefan Kalkowski 74e75d7fbc hw: enable virtualization support for virt_qemu
Ref #3638
2020-04-17 12:51:53 +02:00
Stefan Kalkowski 58db6542f8 hw: check for security extension support in GICv2
Ref #3638
2020-04-17 12:51:44 +02:00
Tomasz Gajewski fca2a05adf trace: extend test for log_output
Issue #3714
2020-04-17 12:48:17 +02:00
Tomasz Gajewski 4639978b3a trace_logger: avoid output of empty lines
It avoids output of empty lines in output buffer if traced messages end
with \n (what is common with messages logged from dde_linux).

Issue #3714
2020-04-17 12:48:13 +02:00
Tomasz Gajewski 870d348d77 trace: redirect logs to trace based on policy
If trace is enabled for component than an attempt to put message into
trace buffer is performed using log_output policy. If it succeeds than
message is not put to logs using log service.

Fixes #3714
2020-04-17 12:47:48 +02:00
Tomasz Gajewski db8ec81e9f trace: log_output policy that redirects logs to trace
Issue #3714
2020-04-17 12:47:35 +02:00
Tomasz Gajewski 1d9a2dce94 trace: extend policy with log_output
Issue #3714
2020-04-17 12:47:19 +02:00
Roman Iten 12ea494477 vfs/File_content: fix end condition in for_each_line
Fixes #3729
2020-04-17 12:45:10 +02:00
Christian Helmuth b60b591d06 depot: update recipe hashes 2020-04-17 12:40:13 +02:00
Christian Helmuth 9fbc68bda1 libports: icu library moved to GitHub 2020-04-17 12:40:13 +02:00
Norman Feske 132569d12b base-linux: socket descriptor caps for RPC
On Linux, Genode used to represent each RPC object by a socket
descriptor of the receiving thread (entrypoint) and a globally-unique
value that identifies the object. Because the latter was transferred as
plain message payload, clients had to be trusted to not forge the
values. For this reason, Linux could not be considered as a productive
Genode base platform but remained merely a development vehicle.

This patch changes the RPC mechanism such that each RPC object is
represented by a dedicated socket pair. Entrypoints wait on a set of
the local ends of the socket pairs of all RPC objects managed by the
respective entrypoint. The epoll kernel interface is used as the
underlying mechanism to wait for a set of socket descriptors at the
server side.

When delegating a capability, the remote end of the socket pair is
transferred to the recipient along with a plaintext copy of the
socket-descriptor value of the local end. The latter value serves as a
hint for re-identifiying a capability whenever it is delegated back to
its origin. Note that the client is not trusted to preserve this
information. The integrity of the hint value is protected by comparing
the inode values of incoming and already present capablities at the
originating site (whenever the capability is invoked or presented to the
owner of the RPC object).

The new mechanism effectively equips base-linux with Genode's capablity
model as described in the Chapter 3 of the Genode Foundations book.
That said, the sandboxing of components cannot be assumed at this point
because each component has still direct access to the Linux system-call
interface.

This patch is based on the extensive exploration work conducted by
Stefan Thoeni who strongly motivated the inclusion of this feature into
Genode.

Issue #3581
2020-04-17 12:40:13 +02:00
Alexander Boettcher 319d2be1af seoul: add vm_stress script version
Issue #3683
2020-04-17 12:40:13 +02:00
Alexander Boettcher 29911cf114 seoul: update contrib branch
- reactivate vga update, range was to small
- remove diagnostic messages
- add support to ignore machine check MSR MCG CAP

Issue #3683
2020-04-17 12:40:13 +02:00
Alexander Boettcher 8be72b0be1 vbox5: add testing VMs causing load
Issue #3683
2020-04-17 12:40:13 +02:00
Ehmry - 6359445a8e Add <exit propagate="…"/> to Init config schema
Fix #3724
2020-04-17 12:40:13 +02:00
Christian Helmuth c783764d0b Region-map attach/detach stress depot_autopilot test
Issue #3715
2020-04-17 12:40:13 +02:00
Stefan Kalkowski ff378a8c5b hw: cache maintainance on mapping removal too
Older ARM processors like ARMv6, or Cortex A8 need to write back changes
of the page-tables to physical ram because the MMU does not use the cache.
This naturally needs to be done not only when adding a mapping,
but on removal too.

Fix #3715
2020-04-17 12:40:13 +02:00
Norman Feske 03c3040a1d Remove stale documentation
The topics are either covered by the Genode Founations book for by our
tools, in particular the integration of the prepare_port mechanism with
the run tool.
2020-04-17 12:40:13 +02:00
Christian Helmuth cc4e21e7a7 Fix some details in run scripts
- don't use 'qemu -serial mon:stdio' anymore as it no longer works as
  expected
- use "bash -l" with [terminal] to read user's profile configuration,
  e.g., PATH settings
- added missing boot modules and cap quotas
2020-04-17 12:40:13 +02:00
Norman Feske 6dfd268ef1 base/registry.h: remove misleading comment 2020-04-17 12:40:13 +02:00
Christian Helmuth 838c5ba7de ieee754: enable output check for ARM64
Issue #3723
2020-04-17 12:40:13 +02:00
Christian Helmuth 4ab990ad5b libc: provide C++ runtime symbols in ABI
This commit puts all C++ runtime/support symbols of ld.lib.so in a
dedicated section of base/lib/symbols/ld and mirrors the section to
libports/lib/symbols/libc. So, the libc ABI resolves potential C++
runtime dependencies of base-ABI-agnostic components at link time. The
runtime resolution is done by the linker by symbol lookup in ld.lib.so.

Issue #3720
2020-04-17 12:40:13 +02:00
Alexander Boettcher 13cd25e7b0 vfs/ram: avoid 2x mutex releases in guard
Issue #3612
2020-04-17 12:40:12 +02:00
Alexander Boettcher 2b41323fe6 test-* recipes: fix xmllint errors
config_0.xml.tmp:26: element config: Schemas validity error :
  Element 'config': Character content other than whitespace is
  not allowed because the content type is 'element-only'

Issue #3612
2020-04-17 12:40:12 +02:00
Norman Feske 7bf47b1982 base-linux: boost max open fds to the hard rlimit
This patch increases the default limit of the maximum number of open
file descriptors to the hard limit of the system. This is needed for
complex scenarios, which require more FDs than the default of 1024
at core.

Related to issue #3581

Fixes #3721
2020-04-17 12:40:12 +02:00
Alexander Boettcher 22d71d5a8b os: use Mutex/Blockade
Issue #3612
2020-04-17 12:40:12 +02:00
Alexander Boettcher 3956530634 base: use Mutex/Blockade
Issue #3612
2020-04-17 12:40:12 +02:00
Alexander Boettcher e87d60ddf7 core: use Mutex/Blockade
Issue #3612
2020-04-17 12:40:12 +02:00
Norman Feske 85a1f91f59 Sanitize Framebuffer::Mode member access
Fixes #3719
2020-04-17 12:40:12 +02:00
Alexander Boettcher dc90740549 nic_router: accept DHCP reply with missing option
The options are not always set, which throws exception. This leads to not
accepting the selected IP address.

Fixes #3716
2020-04-17 12:40:12 +02:00
Tomasz Gajewski d111af922a trace documentation: fix reference to events definitions 2020-04-17 12:40:12 +02:00
Norman Feske 40c21b6d0f window layouter: restore screen tiling
This commit fixes a regression introduced by "window_layouter: add
dynamic screen handling", rendering the sub-division of screens in
columns and row unusable. The said commit removed a condition needed
for the correct window placement. This patch restores the condition.

Issues #3646
2020-04-17 12:40:12 +02:00
Norman Feske 4dd110ce5e Remove noux runtime
The feature set of noux is fully covered by the regular C runtime now.

Fixes #3696
2020-04-17 12:39:33 +02:00
Norman Feske d6bdeed38f report_dump: replace noux by plain bash
This patch also introduces the use of the RTC for creating directory
names and increases the rate of snapshot creation from 10 seconds to
one minute to make sure that directories are named differently when
reading the RTC clock at granularity of minutes.

Issue #3696
2020-04-17 12:39:33 +02:00
Stefan Thöni e8fb7ad470 report_rom: add package recipe 2020-04-17 12:39:33 +02:00
Stefan Thöni 5b68286e07 fs_report: add package recipe 2020-04-17 12:39:33 +02:00
Stefan Thöni bb12d79ae9 vfs: add package recipe 2020-04-17 12:39:33 +02:00
Alexander Boettcher d657b61f1b x86: support msi-x by platform driver
Fixes #3699
2020-04-17 12:39:33 +02:00
Norman Feske 42a77c531a sculpt: remove noux runtime from inspect view
Issue #3696
2020-04-17 12:39:32 +02:00
Norman Feske 5347278136 sculpt: perform prepare step without noux
Issue #3696
2020-04-17 12:39:32 +02:00
Norman Feske ca5c25ac04 sculpt: replace log-noux instance by stdin2out
Issue #3696
2020-04-17 12:39:32 +02:00
Norman Feske bb35b997b8 New stdin2out utility as replacement for tail -f
This little utility allows us to remove the noux instance for the log
view of Sculpt OS.

Issue #3696
2020-04-17 12:39:32 +02:00
Norman Feske 9c95e4bb4f sculpt: replace noux-based e2fsprogs by fs_utils
With this patch, Sculpt executes the e2fs file-system utilities
directly instead of hosting them within the noux runtime.

Issue #3696
2020-04-17 12:39:32 +02:00
Norman Feske e63195a940 e2fsprogs: disable HAVE_GETMNTINFO
This patch avoids calls of '__sys_getstatfs' (indirectly via
'getmntinfo'), which does not return any meaningful values in Genode's
libc. Otherwise, the libc's dummy implementation prompts resize2fs to
back out.

Issue #3696
2020-04-17 12:39:32 +02:00
Norman Feske 0836293d1a libports: src/fs_utils depot archive
The depot archive contains the utilities of e2fsprogs that are needed
for Sculpt OS as standalone components.
2020-04-17 12:39:32 +02:00
Norman Feske 330672e030 libports: mke2fs and resize2fs as standalone apps
This patch makes the e2fsprogs 'mke2fs' and 'resize2fs' available as
standalone components that can be used by Sculpt OS directly without
a Unix emulation environment.
2020-04-17 12:39:32 +02:00
Josef Söntgen 150d143755 os: use Request_stream API in NVMe driver
As a result of the API change the memory handling could be simplified.
Since the Block session dataspace is now directly used for DMA, we
actually only have to provide the memory for setting up PRP lists for
large requests (for the moment more than 8 KiB of data).

As we limit the maximum data transfer length to 2 MiB, we get by with
just a page per request. Those memory is allocated beforehand for the
maximum number of I/O requests, which got bumbed to 512 entries. Since
not all NVMe controllers support such large a maximum data transfer
length and this many entries, especially older ones, the values are
capped according to the properties of the controller during
initialization. (The memory demands of the component are around 3 MiB
due to setting up for the common case, even if a particular controller
is only able to make use of less.)

(Although there are controllers whose maximum memory page size is more
than 4K, the driver is hardcoded to solely use 4K pages.)

In addition to those changes, the driver now supports the 'SYNC' and
'TRIM' operations of the Block session by using the NVMe 'FLUSH' and
'WRITE_ZEROS' commands.

Fixes #3702.
2020-04-17 12:39:32 +02:00
Christian Helmuth e63c5e6c69 base: rework interplay of signal-proxy and entrypoint
The former scheme left open a race window between
_process_incoming_signals() and wait_and_dispatch_one_io_signal()
resulting in both threads calling block_for_signal() and blocking
forever with one unprocessed signal.

Fixes #3704
2020-04-17 12:39:32 +02:00
Christian Helmuth 69080014b0 depot_autopilot: test case for entrypoint
Test for entrypoint destruction and signalling.

Issue #3704
2020-04-17 12:39:32 +02:00
Stefan Kalkowski f051065582 Retire OMAP4 support
Fix #2850
2020-04-17 12:39:32 +02:00
Piotr Tworek 585c4b8c69 hw: Add support for Qemu virt arm platforms.
This patch adds support for booting base-hw kernel on qemu-arm virt
machines. The arm_virt machine has 2GB of RAM, 2 Cortex A15 cores and
uses GICv2 interrupt controller. The arm_64_virt machine also has 2GB of
RAM, but has 4 Cortex A53 cores and uses GICv3. Both machines use PSCI
to boot additional CPU cores.

Fixes #3673
2020-04-17 12:39:32 +02:00
Piotr Tworek dad1de1865 hw: Add interface for making basic ARM PSCI calls.
So far this only exposes two functions allowing the code to turn on
additional CPUs. There is much more functionality defined by PSCI spec
but so far its not needed by Genode.

Fixes #3672
2020-04-17 12:39:32 +02:00
Pirmin Duss 6f1357c6f8 libc: add symbol used by protobuf
Issue #3692
2020-04-17 12:39:32 +02:00
Josef Söntgen 336228f357 os: handle SYNC packet in lx_fs
Call 'fsync(2)' on files and directories.

Fixes #3711.
2020-04-17 12:39:32 +02:00
Josef Söntgen df553e9360 os: remove catch-all from FS VFS update mtime
Only 'alloc_packet' is supposed to throw an exception, which is already
caught. The 'submit_packet' call does not need further handling.

Issue #3713.
2020-04-17 12:39:32 +02:00
Josef Söntgen ddc0caa605 os: remove error messages from FS VFS update mtime
The update modification timestamp is implemented as one-shot where
the caller is expected to try again if the first attempt failed (see
current libc implementation). So the message is misleading as further
attempts might succeed.

Issue #3713.
2020-04-17 12:39:32 +02:00
Christian Helmuth 0df358a550 nova: early message on successful boot
This patch fixes a regression with run/log_core introduced by

  2064ffd64b nova: support multidimensional affinity space

The run tool uses a log message 'run_boot_string' to detect successful
boot as well as to detect unexpected reboots. This message should never
be logged twice and, thus, should not be part of the core_log. The patch
mentioned above moved the former run_boot_string after the core_log
initialization.
2020-04-17 12:39:31 +02:00
Pirmin Duss 9da428dccf vfs_import: implement write loop for copy_file
This is required to allow import of large file.

Fixes #3655
2020-04-17 12:37:26 +02:00
Norman Feske 46fa8197a2 depot: update recipe hashes 2020-03-26 11:39:02 +01:00
Christian Helmuth 52d798ff40 init: support heartbeat in config.xsd 2020-03-26 11:39:02 +01:00
Stefan Kalkowski 256b2fa3e1 hw: cortex a9 diagnostic register fixup
This is a follow-up fix for commit 202333c881.
It checks for the diagnostic registers being already setup correctly.
Otherwise on platforms with secure firmware, like Pandaboard it will stuck.

Ref #3639
2020-03-26 11:39:02 +01:00
Norman Feske d8bcaa4fa4 base-linux: disable ASLR for child processes
ASLR collides with the libc's fork mechanism on 32-bit. In particular,
the tool_chain_auto.run scenario would sporadically fail while mirroring
the parent's address space.

Fixes #3710
2020-03-26 11:39:02 +01:00
Ehmry - 7a5841b637 ahci: driver improve diagnostic messages for empty ports
Fix #3709
2020-03-26 11:39:02 +01:00
Ehmry - 45a74023a7 part_block: support for up to 128 sessions
Allow sessions for each of the 128 sessions supported by GPT.

Fix #3705
2020-03-26 11:38:59 +01:00
Alexander Boettcher 6f3f46c7ba top: support affinity space height up to 4
Issue #3635
2020-03-26 11:38:59 +01:00
Alexander Boettcher 2064ffd64b nova: support multidimensional affinity space
Fixes #3635
2020-03-26 11:38:59 +01:00
Norman Feske 685bd763f9 ldso: place dynamic allocations within linker area
This is needed to execute the tool-chain scenario on base-nova.
Otherwise, the fork mechanism stumbles upon a region conflict
between ldso allocations and the application heap.

Fixes #3706
2020-03-26 11:38:59 +01:00
Norman Feske 0f3ac4cb9f base-hw: let upgrade_cap_slab reflect Out_of_caps
This patch reflects the Out_of_caps exception from core to the client,
in addition to the already covered Out_of_ram exception. It thereby
eliminates a potential abort in core, which I observed with the
tool_chain_auto.run script:

  Kernel: RPC upgrade_cap_slab
  Error: Uncaught exception of type 'Genode::Quota_guard<Genode::Cap_quota>::Limit_exceeded'
  Warning: abort called - thread: entrypoint

In addition to propagating the exception, the patch add the client-side
exception-handling code to the base library.

Fixes #3703
2020-03-26 11:38:59 +01:00
Norman Feske 208294b0d3 Turn pkg/noux-system into pkg/system_shell
The new package does no longer require noux.

Issue #3696
2020-03-26 11:38:59 +01:00
Norman Feske cf052996d3 Remove pkg/noux-build-x86
Use-case-specific Unix runtimes should better be realized via Goa now.

Issue #3696
2020-03-26 11:38:58 +01:00
Norman Feske 4961c84f12 Remove noux from vbox_share.inc
This snippet is used by the vbox5_win7_64_share.run script.

Issue #3696
2020-03-26 11:38:58 +01:00
Norman Feske 2f598e5680 Remove noux_uname.run script
This run script is outdated and not regularly tested. In fact, the
tested mechanism (obtaining values from a '.sysctl/' directory) is
nowhere to be found, neither in noux nor the libc. The test still
returns success as it merely checks for the completion of the sequence,
not the printed results. Hence, it is not worth preserving.

Issue #3696
2020-03-26 11:38:58 +01:00
Norman Feske 951f484fad Remove noux_gdb.run script
This interactive run script is not regularly tested nor used.

Issue #3696
2020-03-26 11:38:58 +01:00
Norman Feske c086bba71a Remove noux_fs.run
The test exercised the mounting of an ext2 file system in the noux
runtime. This feature is nowadays routinely stressed by Sculpt OS.

Issue #3696
2020-03-26 11:38:57 +01:00
Norman Feske 5a02b5fd23 Remove noux_fork.run script
This run script is superseded by pkg/test-fork.

Issue #3696
2020-03-26 11:38:57 +01:00