Commit Graph

7217 Commits

Author SHA1 Message Date
Johannes Schlatow
4daf19ec7e vfs_ttf: update glyphs when font file changes
genodelabs/genode#4135
2021-05-28 14:15:27 +02:00
Christian Prochaska
18a43c1afd base-foc: fix assignment in 'Ipc_pager::acknowledge_exception()'
Issue #4094
2021-05-28 14:15:26 +02:00
Christian Helmuth
813f4d976b lxip: allocate skb with properly aligned IP header
Comment in Linux sources:

  Since an ethernet header is 14 bytes network drivers often end up with
  the IP header at an unaligned offset. The IP header can be aligned by
  shifting the start of the packet by 2 bytes. Drivers should do this
  with:

  skb_reserve(skb, NET_IP_ALIGN);

This is ensured when using netdev_alloc_skb_ip_align().

Issue #4094
2021-05-28 14:15:26 +02:00
Sebastian Sumpf
a24224ffc3 usb_host: improve isochronous performance on Intel
This patch takes advantage of block transfer interrupts on Intel XHCI
controllers which is used during isochronous transfers. Because of a bug
in hardware (see usb_host_isoc_bei.patch header), this feature has been
disabled for Intel leading to up to 8000 interrupts/s for isochronous
transfer causing severe CPU consumption on Genode. With this commit we
lower host driver consumption to normal levels.

issue #4149
2021-05-28 14:15:26 +02:00
Sebastian Sumpf
9543161827 usb_host: Move task to device in USB session
A Lx::Task is now associated to a USB device not the session any more.
This implies that a task lives as long as the device making it possible
to gracefully handle outstanding requests (i.e., synchronous) in case
the session has been closed.

issue #4149
2021-05-28 14:15:26 +02:00
Martin Stein
a0517686ca ports/libsparkcrypto: update for GCC 10
The old port version contained '*.ali' files that were build with an older GCC
which led to problems when compiling packages that use the port with the new
GCC 10. The '*.ali' files of the new port version were generated with GCC 10.

Fixes #4145
2021-05-28 14:15:26 +02:00
Sebastian Sumpf
9209dfc9d5 ldso: output loaded objects of 'Shared_object' interface
When loading shared libraries via the 'Shared_object' interface display
all additionaly loaded libraries in case 'ld_verbose' is configured. Up
until now, only the loaded library was displayed. In order to determine
if a dependend library had arlready been loaded prior to loading the
'Shared_object' the reference counter is used.

fixes #4147
2021-05-28 14:15:26 +02:00
Alexander Boettcher
f8d0552d52 libc_integration: fix out-of-bound access
which leads to sporadic pagefaults/segmentation faults.

Fixes #3967
2021-05-28 14:15:26 +02:00
Alexander Boettcher
1c20ed12c1 qemu: sanity check misconfigured memory for okl4
Issue #4095
2021-05-28 14:15:26 +02:00
Alexander Boettcher
d516544a1f ssh_exec_channel.run: use default Qemu memory size
The default size is on most kernels 512M. On OKL4 we have to use 800M,
because of the statically configured memory ranges in the OKL4 kernel.

By avoiding a specific amount of memory, the default Qemu memory sizes are
used.

Issue #4095
2021-05-28 14:15:26 +02:00
Martin Stein
f8b2fd522b ports/ada-runtime: update to support gcc 10
Fixes #4128
2021-05-28 14:15:26 +02:00
Christian Prochaska
471d34a367 Remove mpc and mpfr ports
These ports are not needed anymore with the 21.05 tool chain update.

Issue #4094
2021-05-28 14:15:26 +02:00
Christian Prochaska
d5e4ffd191 sanitizer: update to version 10.3.0
Issue #4094
2021-05-28 14:15:26 +02:00
Christian Prochaska
4a4b754bf2 gcov: update to version 10.3.0
Issue #4094
2021-05-28 14:15:26 +02:00
Christian Prochaska
a0f5d34e25 stdcxx: update to version 10.3.0
Issue #4094
2021-05-28 14:15:26 +02:00
Christian Prochaska
9c05cda6e7 tool_chain: update gcc to version 10.3.0
Issue #4094
2021-05-28 14:15:26 +02:00
Sebastian Sumpf
6639261126 binutils: augment equally-named sections again
Revert GNU ld to the old behavior where sections with the same name in multiple
ld scripts are merged. Binutils 2.36.1 creates two sections with the same name.

Fixes #4126
2021-05-10 11:52:27 +02:00
Christian Prochaska
fc902d9e66 tool_chain: update binutils to version 2.36.1
Issue #4094
2021-05-10 11:19:13 +02:00
Christian Prochaska
6a11b78cdf tool_chain: use gcc-provided dependency libraries
Download gmp, mpc and mpfr with the download script provided by the
gcc source tree and let the gcc build system handle the build of these
libraries with the correct compile options. This fixes build issues on
armhf Linux and removes the need to maintain mpc and mpfr ports in
the Genode tree.

Issue #4094
2021-05-10 11:19:11 +02:00
Christian Helmuth
777923f9bd depot: update recipe hashes 2021-05-10 11:18:12 +02:00
Martin Stein
d2bf565503 nic/zynq: fix packed conversion error with gcc 10
Fixes #4142
2021-05-10 11:17:21 +02:00
Alexander Boettcher
384a8da50b ssh_terminal: use pthread_mutex
to avoid sporadic deadlocks between EP thread and the server loop pthread.

Issue #4095
2021-05-10 11:17:20 +02:00
Alexander Boettcher
b6bdd91cfa nova: avoid unaligned warnings by gcc10
Issue #4126
2021-05-10 11:17:20 +02:00
Christian Helmuth
a5385cebf4 block_cache: explicitly instantiate template function
The explicit instantiation is required because the function is defined
in the compilation unit only but referenced externally.

Fixes #4108
2021-05-10 11:17:20 +02:00
Josef Söntgen
c5c3d7ca98 gpt_write: address unaligned access for name
Turn member into byte array to prevent unaligned memory access.

Fixes #4141.
2021-05-10 11:17:20 +02:00
Norman Feske
d19b751632 nano3d: remove surface-clear optimization
This patch fixes a GCC-10 compile error. Even though the optimization
was quite effective - I measured a speedup of factor 2 - it is not all
that important for the overall application performance. In the nano3d
case, we are talking about 1 vs. 2 percent of CPU time.

Fixes #4140
2021-05-10 11:17:20 +02:00
Christian Prochaska
ff160decec gdb: fix build errors with gcc 10
Fixes #4139
2021-05-10 11:17:20 +02:00
Norman Feske
a4115cfea9 base-linux: discharge timestamp on AARCH64
The kernel-agnostic 'Trace::timestamp' function for arm_64 executes the
'mrs %0, pmccntr_el0' instruction, which is not permitted for user-level
programs on Linux. This patch shadows the generic timestamp.h header
with dummy that returns zero. This return value prompts the timeout
framework to disable the interpolation of time based on timestamps. This
avoid the illegal-instruction abort but comes with two llimitations:

First, time measurements are effectlively limited to a granulariry of 1
millisecond (deliberately constrained by the timer driver).

The quirk is applied when using the base-linux API. Should a generic
application (that uses the base API only) call 'Trace::timestamp'
directly, the illegal instruction is executed.

Issue #4136
2021-05-10 11:17:20 +02:00
Norman Feske
2f9d430c00 base-linux: 64-bit ARM support
This patch adds support for running Genode/Linux on the AARCH64
architecture.

- The kernel-agnostic startup code (crt0) had to be extended to
  capture the initial stack pointer, which the Linux kernel uses
  to pass the process environment. This is in line with the
  existing startup code for x86_32 and x86_64.

- The link order of the host libraries linked to lx_hybrid
  programs had to be adjusted such that libgcc appears at last
  because the other libraries depend on symbols provided by
  libgcc.

- When using AARCH64 Linux as host, one can execute run scripts
  via 'make run/<script> KERNEL=linux BOARD=linux' now.

Issue #4136
2021-05-10 11:17:20 +02:00
Christian Helmuth
718f44ae5b Check max_len before dereferencing pointer in Cstring constructor
Fixes #4112
2021-05-10 11:17:20 +02:00
Martin Stein
66feb939e6 cbe_tester: compile errors/warnings with gcc 10
Fixes #4113
2021-05-10 11:17:20 +02:00
Christian Helmuth
1baf844e20 vfs_stress: fix handling of 'char' in error message
Issue #4112
2021-05-10 11:17:20 +02:00
Martin Stein
5fa2efa745 net/dhcp: print readable message types
When a DHCP packet is printed out, it first tries to determine the most
specific message type from the DHCP options and print its human-readable name
right after the protocol name. If finding the message type fails, the less
specific opcode is printed instead, but also in a human-readable way.

Fixes #4131
2021-05-10 11:17:20 +02:00
Norman Feske
ad847d0543 sculpt: fix glitch in fs-browser back arrow
Fixes #4124
2021-05-10 11:17:20 +02:00
Norman Feske
0b36d81c0c base-linux: separate x86-specific code
By moving core's build-description to a library - a pattern already
employed for the other base platforms - we become able to cleanly split
x86-specific code (I/O-port access) from generic code. This is a
prerequisite for enabling non-x86 architectures such as AARCH64.

Issue #4136
2021-05-10 11:17:20 +02:00
Jean-Adrien DOMAGE
a4727c90a8 lx_fs: add os/run/lx_fs_import.run run script
This new runscript demonstrates how a file can be overwritten by vfs
import with the flag overwrite set to false. This is due to a bug
in lx_fs that is not propagating an ernno EEXIST syscall error.

Issue genodelabs#4104
2021-05-10 11:16:24 +02:00
Jean-Adrien DOMAGE
e65b7f3b82 lx_fs: fix errno EEXIST not propagated
This commit introduces a fix for lx_fs to propagate errno EEXIST error.
This prevents vfs <import overwrite="false"> to overwrite an imported
file, if it already exists, without the overwrite flag set to true.

Issue genodelabs#4104
2021-05-10 11:16:24 +02:00
Josef Söntgen
0f0edc0134 usb_host: implement sg_pcopy_* as TRACE dummies
The former implementation called 'TRACE_AND_STOP' which led to the
'usb_host_drv' to stop whenever such a function was called. Rather
than stopping return '0' and let the contrib code deal with this
situation.

Issue #4116.
2021-05-10 11:16:24 +02:00
Josef Söntgen
d0f084d449 usb_host: backport xhci bounce-buffer fix
This commit backports the Linux upstream commit (d4a6106) [*]
that introduces a check to prevent the sglist from being used
unconditionally.

[*] 'xhci: fix bounce buffer usage for non-sg list case'

Fixes #4116.
2021-05-10 11:16:24 +02:00
Christian Prochaska
c7b2314d23 foc: fix errors with gcc 10 and binutils 2.36
Fixes #4118
2021-05-10 11:16:24 +02:00
Christian Helmuth
eb94f03416 microcode.run: do not twiddle with MAKEFLAGS
Unconditionally setting MAKEFLAGS to just 's' is not nice because other
flags cannot be passed through the run script. What the script desires
is to disable the automatically enabled '--print-directory' for sub-make
instances when calling tool/port/current by declaring
'--no-print-directory'.
2021-05-05 11:55:27 +02:00
Norman Feske
516a9a6925 depot: update recipe hashes 2021-05-05 11:35:31 +02:00
Norman Feske
fdb1a4dd88 base-linux: avoid legacy syscalls
Until now, Genode's Linux system call bindings were based on original
Unix system calls that were later superseded by more flexibile variants.
E.g., 'openat' is a modern version of 'open'. Even though Linux upholds
the compatiblity with the original versions for existing architectures
like x86, the legacy syscalls are absent for the recently added AARCH64
architecture. A good overview of the system calls accross the prominent
architectures can be found at

https://chromium.googlesource.com/chromiumos/docs/+/master/constants/syscalls.md

This patch updates Genode's syscall bindings to avoid legacy versions,
thereby easing the support for AARCH64. The used "modern" versions
were introduced back in Linux version 2 days. So we are fine to rely
on them.

The patch slightly changes the signature for lx_stat because this system
call is merely used to check for the existance of a file and its size.
The new name 'lx_stat_size' draws a closer connection to its use case.
That said, the stat syscall has not been updated to the modern statx
since statx is still a fairly recent addition.

Issue #4136
2021-05-05 11:35:31 +02:00
Norman Feske
d477062c56 base-linux: simplify clone syscall binding
This patch simplifies the use of the clone system call for creating
processes and threads. Until now, the binding used an opaque pointer
argument to pass context information to the newly created process or
thread. However, upon close inspection, this is not a strict
requirement.

A newly created thread accesses its contextual information by
using its stack pointer as key. The pointer argument is not used.

The creation of processes is strictly serialized because the
intermediate stack used in-between clone and execve is a global
variable. Since we rely on the serialization anyway, we can pass the
context information of a new process via a global variable as well.

This change simplifies the syscall binding for the upcoming AARCH64
support, which would otherwise require us to deal with the notion
of TLS on Linux.

Issue #4136
2021-05-05 11:35:31 +02:00
Christian Prochaska
00d13cf304 qt5: fix build errors with gcc 10
Fixes #4132
2021-05-05 11:35:31 +02:00
Martin Stein
49184fb938 net: circumvent stringop-overflow error
With the update to GCC 10, the compiler stopped with an error when compiling
places where a MAC address is copied from outside into a packed object using
the Net::Netaddress::copy method (e.g. in
Net::Arp_packet::dst_mac(Mac_address)):

! error: writing 6 bytes into a region of size 4 [-Werror=stringop-overflow=]

While trying to find a clean solution for this error, I found posts on
gcc.gnu.org and github that stated that the size calculations that cause these
errors are incorrect. Indeed, I could verify that the actual size of the two
regions was static and exactly the same in places were the error occured.

Furthermore, I couldn't find a way of making it more clear to the compiler
that the sizes are the same. By accident, we found that using the address of
the first element of the array that forms the second region instead of the
array address itself, somehow circumvents the error.

Fixes #4109
2021-05-05 11:35:31 +02:00
Martin Stein
52e8c95321 net: fix packed-conversion compiler warning
With the update to GCC 10 the compiler used to warn when using the internet
checksum functions on packet classes (like in
Net::Ipv4_packet::update_checksum):

warning: converting a packed ‘Net::[PACKET_CLASS]’ pointer
         (alignment 1) to a ‘const uint16_t’ {aka ‘const short
         unsigned int’} pointer (alignment 2) may result in an
         unaligned pointer value

Apparently, the 'packed' attribute normally used on packet classes sets the
alignment of the packet class to 1. However, for the purpose of the
internet-checksum functions, we can assume that the packet data has no
alignment. This is expressed by casting the packet-object pointer to a pointer
of the new packed helper struct 'Packed_uint16' that contains only a single
uint16_t member before handing it over to the checksum function (instead of
casting it to a uint16_t pointer).

Ref #4109
2021-05-05 11:35:31 +02:00
Christian Prochaska
9b854e1496 Prevent recursive 'memset()' calls with gcc 10
Fixes #4125
2021-05-05 11:35:31 +02:00
Christian Prochaska
d5e7870532 virtualbox5: fix build errors with gcc 10
Fixes #4106
2021-05-05 11:35:31 +02:00
Christian Prochaska
bc8dbc6b1a bash: fix build error with gcc 10
Fixes #4107
2021-05-05 11:35:31 +02:00
Christian Prochaska
8f23e377d9 lxip: fix build error with gcc 10
Fixes #4102
2021-05-05 11:35:31 +02:00
Christian Prochaska
aebece5110 readline: fix build error with gcc 10
Fixes #4103
2021-05-05 11:35:31 +02:00
Christian Prochaska
82604f2c2b lx_fs: fix build errors with gcc 10
Fixes #4123
2021-05-05 11:35:31 +02:00
Norman Feske
4563baae77 app/text_area: fix build error with gcc 10
Fixes #4098
2021-05-05 11:35:30 +02:00
Christian Prochaska
c4e3d3dbc4 hw: fix build error with gcc 10
Fixes #4115
2021-05-05 11:35:30 +02:00
Alexander Boettcher
eb53f8c113 seoul: adjust to GCC 10.03
Fixes #4097
2021-05-05 11:35:30 +02:00
Christian Prochaska
07649b667b sel4: fix build errors with gcc 10
Fixes #4121
2021-05-05 11:35:30 +02:00
Christian Prochaska
0f679bb35e pistachio: fix build error with gcc 10
Fixes #4119
2021-05-05 11:35:30 +02:00
Christian Prochaska
d6e9d74038 nitpicker: fix build error with gcc 10
Fixes #4110
2021-05-05 11:35:30 +02:00
Christian Prochaska
405e6744fb nova: update kernel for gcc 10
Fixes #4114
2021-05-05 11:35:30 +02:00
Christian Prochaska
fad85c3fd5 virtualbox6: fix build errors with gcc 10
Fixes #4105
2021-05-05 11:35:30 +02:00
Christian Prochaska
49392dfa44 dde_ipxe: fix build error with gcc 10
Fixes #4101
2021-05-05 11:35:30 +02:00
Christian Prochaska
e627f8320f verify: fix build error with gcc 10
Fixes #4099
2021-05-05 11:35:30 +02:00
Christian Prochaska
8196e229b0 netperf: fix build error with gcc 10
Fixes #4096
2021-05-05 11:35:30 +02:00
Christian Prochaska
0a8394c891 depot_autopilot: store signal context capability as copy
Fixes #4129
2021-05-05 11:35:30 +02:00
Christian Prochaska
66e8f8d764 base: increase bss alignment to 8 bytes
Fixes #4127
2021-05-05 11:35:30 +02:00
Christian Prochaska
84e4cbb54c cxx: add 'strchr()'
Fixes #4122
2021-05-05 11:35:30 +02:00
Tomasz Gajewski
23b21812dd Fixes in gdb_monitor_interactive/target_config.run
Fixes #4134
2021-05-05 11:35:30 +02:00
Norman Feske
d66e55ec37 aes_cbc_4k.run: increase timeout
needed for foc/qemu/x86_32
2021-05-05 11:35:29 +02:00
Martin Stein
5dbc9ef244 nic_router: more descriptive port allocator code
This renames some members and local variables in the port allocator in order to
make the code more descriptive.

Fixes #4086
2021-05-05 11:35:29 +02:00
Sid Hussmann
4e822436fc nic_router: use increasing src port for new nat
The NAT feature of the NIC router used to prefer re-using source ports that
have been freed recently. From an external server's perspective, if a client
dies and restarts, chances are high that the new connect arrives with the same
source-IP/source-port as the old connection. The server has to forcefully reset
the connection. If that happens a lot, the server may even start to ignore
further connections from this IP/port combination for a while as a mitigation.

This patch adds a continuous counter feature that makes sure that every new
port allocation will increment and result in a port that hasn't been used for a
long time.

The NAT feature of the nic_router is now more in line with RFC 6056 chapter 4.

Ref #4086
2021-05-05 11:35:29 +02:00
Alexander Boettcher
ce75b25fd4 ssh_exec_channel: adjust cap quota for seL4
Issue #4095
2021-05-05 11:35:29 +02:00
Josef Söntgen
118e8ee6e1 ssh_terminal: flush buffer on Terminal cleanup
Issue #4095.
2021-05-05 11:35:29 +02:00
Alexander Boettcher
f236e99b5c ssh_terminal: avoid deadlock of EP and pthread.0
pthread.0 acquires a write buffer mutex and calls potentially
blocking fs operations. The EP thread handles session requests and tries to
acquire the same write buffer lock. IO progress events for pthread.0 are
handled by the EP thread, which however is blocking on the write buffer mutex.

The commit uses two write buffers, one which is filled by the EP and a second
which is used by pthread.0. The two buffers are swapped protected by a mutex
without invoking blocking fs operations.

Issue #4095
2021-05-05 11:35:29 +02:00
Alexander Boettcher
86e09b60c4 exec_terminal: sandbox errors about unknown node
The exec_terminal generates a config report which is used as input ROM for
sandbox/init, which does not support an "<empty>" node.

An empty config node is empty, without an node.

Issue #4095
2021-05-05 11:35:29 +02:00
Johannes Schlatow
373b45a0f0 depot: fix content.mk of drivers_managed-pc
Was still using the event_filter.config from drivers_interactive-pc
although a dedicated file is present in the raw archive.

The fix is just for consistency reasons, as sculpt manager is generating the
event_filter.config anyway.
2021-05-05 11:35:29 +02:00
Johannes Schlatow
a2491c30b3 event_filter: add new test cases
genodelabs/genode#4069
2021-05-05 11:35:29 +02:00
Johannes Schlatow
d80b2a150a event_filter: add <log> node
genodelabs/genode#4069
2021-05-05 11:35:28 +02:00
Johannes Schlatow
c802de2cf9 event_filter: add <ignore-key> node
Fixes genodelabs#4069
2021-05-05 11:35:28 +02:00
Johannes Schlatow
e86387d557 event_filter: allow remapping of KEY_UNKNOWN
KEY_UNKNOWN is a collective symbols for all unknown keycodes.
Remapping thus requires iterating through all corresponding codes
instead of only applying the policy to the first match.

Issue genodelabs#4069
2021-05-05 11:35:28 +02:00
Norman Feske
f6aabfe233 Sculpt: prevent nitpicker's resize warnings
This patch increases the RAM quota of the top-level nitpicker instance
to 12 MiB so that resize operations can be buffered for resolutions up
to 2560x1080. It mutes diagnostic messages of the form "Warning: Gui
(...) not enough RAM to preserve buffer content during resize" and
improves the window-resize experience.
2021-05-05 11:35:28 +02:00
Norman Feske
8617e5cee0 Sculpt: un-inspect failed USB storage
With this patch, the user is able to re-gain access to the inspect view
by toggling the inspect button of a file system unrelated to the failed
USB storage device.

Fixes #4090
2021-05-05 11:35:28 +02:00
Johannes Schlatow
2db94b8438 platform_drv/x86: support to disable MSI-X
+ disable for wifi driver MSI-X

Issue #4079
2021-05-05 11:35:28 +02:00
Alexander Boettcher
7b9e7361ba vbox5: add capture pkg version
Issue #4078
2021-05-05 11:35:28 +02:00
Alexander Boettcher
910ea16405 qemu-usb: restrict build to x86
Issue #4078
2021-05-05 11:35:28 +02:00
Alexander Boettcher
58db8c647a qemu-usb: add usb webcam model
Fixes #4078
2021-05-05 11:35:28 +02:00
Alexander Boettcher
4826bd82fe qemu-usb: fix spelling
Issue #4078
2021-05-05 11:35:28 +02:00
Alexander Boettcher
7b90f8f857 libports: add libyuv support
Issue #4078
2021-05-05 11:35:28 +02:00
Johannes Schlatow
bf3ad3baff vbox5/6: pass extra mouse buttons to VM
Fixes #4120
2021-05-05 11:35:28 +02:00
Johannes Schlatow
8a4b52d9e3 vbox: only clear screen if virtual_fb_mode changed
Fixes genodelabs/genode#4085
2021-05-05 11:35:28 +02:00
Johannes Schlatow
a47fd36b9f vbox: fix high VM load after resize
break circle of repeated guest notifications if the guest never
acknowledges a VMMDEV_EVENT_DISPLAY_CHANGE_REQUEST

genodelabs/genode#4084
2021-05-05 11:35:28 +02:00
Christian Prochaska
a2e62db6ec qt5: fix libpng vulnerabilities
Fixes #4089
2021-05-05 11:35:28 +02:00
Alexander Boettcher
7503472ae6 stdcxx: add missing symbols for istream and thread
Issue #3967

triggers using -O0 with test-libc_integration:

libc_integration/main.cc:146: undefined reference to `std::istream::operator>>(unsigned long&)'

contrib/stdcxx-80f380143250d4f951433876698b54fdac32b95f/include/stdcxx/std/thread:67: undefined reference to `vtable for std:🧵:_State'
2021-05-05 11:35:27 +02:00
Johannes Schlatow
1c49da8ce4 terminal: don't overwrite last column until eol
Introduce a new _overflowed state variable to indicate whether the
horizontal boundary was reached already and to omit subsequent character
output.

This state is necessary to maintain a valid cursor position at all
times. The _overflowed attribute is reset once the cursor is moved into
a valid position again.

To harmonise the bounds checking for _cursor_pos modifications, the
`constrain()` method was added.

Fixes genodelabs/genode#4093

Also fixes a bug in `vpa()` and `vpb()` which moved the cursor
horizontally instead of vertically.
2021-05-05 11:35:27 +02:00
Norman Feske
9cb8c37e3a terminal: fix sporadic freeze on font-size changes
The direct execution of application-level code by a watch handler is
troublesome because those handlers are executed at the I/O signal level.
In the concrete case, the watch handler got recursively called because
the handler called _handle_config (application-code), which called the
VFS, which in turn performed a wait_and_dispatch_one_io_signal, which
again invoked the watch handler.

The patch works around the problem by letting the watch notification
trigger the application-level signal for the _config_handler.

Fixes #4091
2021-05-05 11:35:27 +02:00
Pirmin Duss
bb6617ad03 New libc_integration test
I created a test program which stresses the interplay between libc,
pthreads and vfs_pipe and may detect regressions.

The program starts a thread that spawns a bunch of workers, sends and
receives data to them through a pipe. When all data of a worker is
collected, the worker is finished (join()) and a new worker is started.
Both the number of bytes sent to the worker and the size of its
answer are random.

Issue #3967
2021-05-05 11:35:27 +02:00
Tomasz Gajewski
f49ec5b171 tool/run: extract function to copy files
Issue #4073
2021-05-05 11:32:09 +02:00
Stefan Kalkowski
421d2bed40 platform driver: make device info XML optional
* The device XML information dataspace is only provided,
  when the client's policy states `info="yes"`
* The device XM information gets changed to include the
  physical resource names (I/O memory and IRQ addresses)
  instead of virtual ids and page offset

Fix #4077
2021-05-05 11:31:16 +02:00
Norman Feske
6caa74a18e Remove os/slave.h API
Fixes #3754
2021-05-05 11:21:43 +02:00
Norman Feske
5ac3c335dc Remove pkg/test-dynamic_config_slave
Issue #3754
2021-05-05 11:21:43 +02:00
Norman Feske
e8b97ad684 test/resource_yield: don't use os/slave.h
Issue #3754
2021-05-05 11:21:43 +02:00
Christian Helmuth
3f450a77e1 Fix touchscreen config in usb_hid README 2021-05-05 11:21:43 +02:00
Johannes Schlatow
462bff5aef dde_linux: test subdevice id for device matching
As linux drivers may distinguish device configuration by pci subdevice id in
addition to the pci device id, the former must also be used for finding the
matching entry. Otherwise, e.g., the iwlwifi driver might load the wrong
firmware.

Side note: Add break statement to save superfluous iterations after
match was identified.

Fixes genodelabs#4076
2021-05-05 11:21:43 +02:00
Norman Feske
ace7c9172b Disambiguate Mmio::local_addr
This is a follow-up fix for "Streamline platform-device API on ARM".
There is an ambiguity of the 'local_addr' method between the inherited
'Attached_dataspace' and the local declaration, which results in the
double application of the sub-page Range::start.

Issue #4075
2021-05-05 11:21:43 +02:00
Christian Prochaska
190eafeaa6 base: handle 'unpack_string()' error in 'Arg::string()'
Fixes #4100
2021-05-05 11:21:43 +02:00
Josef Söntgen
ddf6a0c276 os: add invalid path exception to Path_base
In case the path is invalid during import raise the 'Path_invalid'
exception.

Issue #4088
2021-05-05 11:21:42 +02:00
Josef Söntgen
8f30fc993d libc: check path pointer in file I/O functions
Fixes #4088
2021-05-05 11:21:42 +02:00
Alexander Boettcher
33a64f79dc libc: place pthreads round-robin
if the number of threads started exceed configured placement configuration

Issue #3967
2021-05-05 11:21:42 +02:00
Pirmin Duss
7de62734e5 libc: add pipe2 symbol to symbols
Issue #3967
2021-05-05 11:21:42 +02:00
Norman Feske
d73eaaa14c libc: exclude arm_initfini.c
This compilation unit contains a global constructor, which violates our
assumption that the libc is free of global constructors on ARMv7.
Specifically, the graphical terminal fails with the following message:

[init -> terminal] Error: Component::construct() returned without executing
                          pending static constructors (fix by calling
                          Genode::Env::exec_static_constructors())
[init -> terminal] Error: Uncaught exception of type 'Linker::Fatal'

In this case, the libc-less terminal uses the VFS. The VFS mounts the
ttf VFS plugin. The ttf VFS plugin depends on the libc.

The compilation unit 'arm_initfini.c' can safely be excluded because it
merely initializes the global '_libc_arm_fpu_present' variable, which
is not used by the current version of our libc/libm.

Fixes #4080
2021-04-20 12:12:48 +02:00
Norman Feske
efbed6f7bf depot: update recipe hashes 2021-04-20 12:10:58 +02:00
Norman Feske
5ca024ff8b vfs_block.run: adjust cap quota for seL4 2021-04-20 12:10:58 +02:00
Norman Feske
dc8c899c1d Streamline platform-device API on ARM
This API rework eases the access to memory-mapped I/O registers and
interrupts when using the platform driver. It introduces the notions of

- Platform::Device       - one device obtained from a platform session
- Platform::Device::Mmio - locally-mapped MMIO registers of a device
- Platform::Device::Irq  - interface for receiving device interrupts

The patch touches several drivers. Some drivers would require a
significant structural change to adopt the new API (e.g., net/virtio,
dde_linux drivers, imx gpio). In these cases, the patch adds
compatibility shims meant to be temporary. In other cases (e.g., imx
i2c), the adaptation was simple enough to carry through.

Fixes #4075
2021-04-20 12:10:58 +02:00
Stefan Kalkowski
d1cf9c86b8 os: introduce device type in platform driver
* Move "compatible" property value to "type" attribute
* Turn device_by_property helper in Platform::Connection into device_by_type

Fix #4074
2021-04-20 12:10:58 +02:00
Norman Feske
46ca576eac Adjust gcov cap quota for seL4 2021-04-20 12:10:58 +02:00
Norman Feske
70281715c6 ssh_exec_channel.run: fix server IP pattern
This patch adjusts the matching of the IP address such that the external
IP address is used as opposed the the NAT-local address. It is follow-up
fix of the conversion to the uplink session interface.

Issue #3961
2021-04-20 12:10:58 +02:00
Norman Feske
4546148ab7 Adjust test-libc_fifo_pipe cap quota for seL4 2021-04-20 12:10:58 +02:00
Sebastian Sumpf
80cf47d906 ldso: protect object list with mutex
When we allowed symbol resolution during exceptions, we used the shared
object lock to protect ELF object list manipulation (e.g., dlopen,
dclose) when executing exception unwinding code in the linker.
Unfortunately, sometimes libraries that are loaded by 'dlopen' may raise
exceptions in the process, leading to a deadlock within the unwind code.
In order to resolve this, we now protect the object list operations
(i.e., enqueue, removal, iteration) by a separate mutex. This allows
the shared object interface to throw exceptions.

issue #4071
2021-04-20 12:10:58 +02:00
Norman Feske
7c01053842 Adjust test-fault_detection cap quota for seL4 2021-04-20 12:10:58 +02:00
Norman Feske
e28709d54d acpi_drv: use expanding reporter
This makes the driver work on newer machines that produce reports larger
than 16 KiB. E.g., Sculpt OS boots successfully on a Lenovo P53s laptop
now.
2021-04-20 12:10:58 +02:00
Norman Feske
dc89ebf978 core: kernel-agnostic 'Mapping' type
This patch unifies the core-internal 'Mapping' type across all base
platforms.

As one minor downside on seL4, the diagnostic error messages when
observing faults other than page faults no longer print the faulting
thread and PD names.

Issue #2243
2021-04-20 12:10:57 +02:00
Norman Feske
7ae1210531 fs_rom: remove "ROM file is missing" messages
These messages pollute the boot log of Sculpt OS when ROM modules are
requested for files of the config fs before the sculpt manager has
created their first version.
2021-04-20 12:10:57 +02:00
Norman Feske
c9d904df71 vfs/tar: remove "tar archive ..." message
This diagnostic output is a mere debugging artifact. By removing them,
we make the boot of Sculpt less noisy.
2021-04-20 12:10:57 +02:00
Norman Feske
21e9e1840a chroot: forward cap-quota upgrades to the server
Fixes #4072
2021-04-20 12:10:57 +02:00
Norman Feske
4e714d3f3a base: handle cap depletion during session upgrade
When the own cap quota of a client does not suffice for a cap upgrade of
an existing session to a server, the client must issue a cap-resource
request to the parent. This logic was already in place for RAM quota but
was missing for cap quota.

Issue #4072
2021-04-20 12:10:57 +02:00
Martin Stein
2084404aba nic_router: explain state report in README 2021-04-20 12:10:57 +02:00
Sebastian Sumpf
9c9302e51d ldso: allow symbol resolution during dl_itera_phdr
When callback functions of `dl_iterate_phdr` required further jump slot
relocations this lead to a deadlock. Therefore, we allow the resolution
of further symbols from callback functions, but protect the ELF object
list during the iteration, which blocks any dynamic loading (e.g.,
dlopen/dlcose) of shared object by other threads while in program header
iteration.

fixes #4071
2021-04-20 12:10:57 +02:00
Norman Feske
af490bdd5b Revert "sculpt: tweak window motions in leitzentrale"
Apparently the skewed motion timings came from the issue fixed by
"timer: restore semantics of periodic timeout 0". With the current
version of the timer, the original motion parameters work just fine.
2021-04-20 12:10:57 +02:00
Norman Feske
0339318572 platform_session: cache arg for alloc_dma_buffer
This patch extends the 'Platform_session::alloc_dma_buffer' interface
with a 'Cache' argument that corresponds to the argument accepted by
'Ram_allocator::alloc', which is used by the platform driver under the
hood.

Since the x86 platform driver used to be hardwired to allocate DMA
buffers as UNCACHED, I adjusted all drivers by specifying the UNCACHED
argument. Right now, this is needed as a hint for core to steer the
allocation of I/O page tables. Once we eliminate the need for such hints
(by introducing an explicit 'Region_map::attach_dma' operation), we can
revisit the drivers individually because cached DMA buffers should
generally be fine on the x86 architecture.

Issue #2243
2021-04-20 12:10:57 +02:00
Norman Feske
53e44f8bfd x86/platform_session: import Genode namespace
This change avoids many repetetive Genode:: prefixes, making the code
easier to read. The patch also includes a few consistency fixes
regarding include guards and file headers. It also renames
Platform_device::String to Platform_device::Device:name.

Issue #2243
2021-04-20 12:10:57 +02:00
Norman Feske
a839b4f0bb gdb_monitor: adapt to sandbox library changes
Issue #4068
2021-04-20 12:10:57 +02:00
Norman Feske
468e7a825c base/cache.h: rename Cache_attribute to Cache
The short name is better because the type will become prominently
visible at the API.

Issue #2243
2021-04-20 12:10:31 +02:00
Norman Feske
3ed8df9089 x86/platform_drv: add Platform::Session::dma_addr
This patch adds the designated alternative to Dataspace::phys_addr to
the platform-session interface. Under the hood, the platform driver
still calls Dataspace::phys_addr but it should eventuelly become the
only caller before we can abolish this function.

Issue #2243
2021-04-20 12:03:05 +02:00
Norman Feske
97a9ad114c platform_session: bus_addr_dma_buffer to dma_addr
Issue #2243
2021-04-20 12:03:04 +02:00
Norman Feske
f5f5b8c1f1 sandbox/init: route model
This commit optimizes the 'Child::resolve_session_request'
implementation by introducing an internal 'Route_model' for quickly
traversing routing rules instead of parsing XML on each session request.

Fixes #4068
2021-04-20 12:03:04 +02:00
Norman Feske
b661459aca sandbox/init: parse config using 'List_model'
This commit replaces the hand-crafted config processing by the use of
the 'List_model' utility. This has the following advantages:

- The parsing follows a common formalism that makes the code
  easier to maintain and to understand. Several parts of the code
  had to be changed (for the better) to make it fit the list model
  approach. E.g., the child states have become more expressive
  and logical.

- In the common case, the XML data is traversed only once, which
  increases the parsing speed in dynamic scenarios.

- The code becomes easier to optimize. In particular, the patch skips
  the re-evaluation of the session routing if no service is affected
  by the config change.

The patch also revisits the init test by removing overly long sleep
phases and extending a few sleep phases that were too short when
executing the test on Qemu.

Issue #4068
2021-04-20 12:03:04 +02:00
Norman Feske
f925fef17b base: Refine Range_allocator::alloc_aligned
This patch changes the 'alloc_aligned' interface as follows:

- The former 'from' and 'to' arguments are replaced by a single
  'range' argument.

- The distinction of the use cases of regular allocations vs.
  address-constrained allocations is now overed by a dedicated
  overload instead of relying on a default argument.

- The 'align' argument has been changed from 'int' to 'unsigned'
  to be better compatible with 'addr_t' and 'size_t'.

Fixes #4067
2021-04-20 12:03:04 +02:00
Tomasz Gajewski
97d44c5a79 app/menu_view: use CUSTOM_TARGET_DEPS 2021-04-20 12:03:04 +02:00
Tomasz Gajewski
1867cf4967 iwl_firmware: use CUSTOM_TARGET_DEPS 2021-04-20 12:03:04 +02:00
Tomasz Gajewski
f3f8d9a6de build system: support for CUSTOM_TARGET_DEPS 2021-04-20 12:03:03 +02:00
Norman Feske
99f4b3cd07 Debug macros for easy performance profiling
The debug macros 'GENODE_LOG_TSC' and 'GENODE_LOG_TSC_NAMED' allow for
the easy gathering of the TSC ticks consumed by the calling scope.

Fixes #4066
2021-04-20 12:03:03 +02:00
Norman Feske
ac07f9d08e sculpt: skip GUI handling until framebuffer is up
This avoids unneeded activity of the Leitzentrale GUI (e.g., the
decorator) at the early boot phase of Sculpt.
2021-04-20 12:03:03 +02:00
Norman Feske
ed9487b452 rtc_drv: defer init until first use
This patch avoids the RTC driver's aggressive polling during the
(CPU-bounded) boot of Sculpt OS. As the RTC is not needed during bootup,
this patch reduces the boot time (on Qemu) by 2-4 seconds.

Fixes #4065
2021-04-20 12:03:03 +02:00
Norman Feske
729b22f04f rtc_drv/x86: code structure
Give the driver code a proper context in the form of a 'Driver' class.

Adjusted while investigating issue #4065.
2021-04-20 12:03:03 +02:00
Norman Feske
698f6eb86c gdb_monitor: weaken reliance on sandbox internals
GDB monitor re-uses internal parts of the sandbox library. It thereby
relies on the internal detail of how local headers are included (using
"" instead of the now usual practice <>). A seemingly unrelated change
"init/sandbox: avoid repetitive state reports" eventually broke the
build of the GDB monitor.

This patch makes the GDB monitor less reliant on the way of how the
sandbox includes headers internally.

It also fixes a few warnings caused by the double definition of
__GENODE__ (adding an missing include guard and making the #define
conditional).

Related to issue #4064
2021-04-20 12:03:03 +02:00
Norman Feske
73e8d64c34 init/sandbox: avoid repetitive state reports
Fixes #4064
2021-04-20 12:03:03 +02:00
Christian Helmuth
cb9a26f1ed vbox6: sculpt runtime package
Issue #4031
2021-04-20 12:03:03 +02:00
Norman Feske
49481dd3fb timer: restore semantics of periodic timeout 0
The 'Timer::Session::trigger_periodic' RPC function used to accept 0 as
a way to de-schedule the periodic processing. Several components such as
nitpicker relied on this special case. In "timeout: rework timeout
framework", the value of zero was silently clamped to 1, which has the
opposite effect: triggering signals at the maximum rate. This results in
a visible effect in Sculpt where the leitzentrale-nitpicker instance
produces a constant load of 2% CPU time.

This patch restores the original timer semantics by

- Documenting it in timer_session.h,

- Handling the case explicitly in the timer implementation, and

- Replacing the silent clamping of the unexpected value 0 passed
  to the timeout framework by a diagnostic error message.

Issue #3884
2021-04-20 12:03:03 +02:00
Norman Feske
dc8dd3396d base: move Xml_generator::Node::Node behind ABI
Fixes #4063
2021-04-20 12:03:03 +02:00
Christian Helmuth
9ac23a18d4 vbox6: synchronize guest-memory handling 2021-04-20 12:03:03 +02:00