Commit Graph

12310 Commits

Author SHA1 Message Date
Martin Stein
c907e44a02 register framework: read bitfields to fitting uint
* Replaces bool access types with uint8_t access types
* Ensures, that the framework always uses the smalles possible uint type
  for the return value wherever a bitfield is read and returned to the user.

Ref #4924
2023-07-14 12:01:18 +02:00
Norman Feske
79e262921e depot: update recipe hashes 2023-06-16 11:24:26 +02:00
Timo Nicolai
0a81bd5d5a depot_download_manager: fix verifying failed download
In some instances, the fetchurl progress determined by
depot_download_manager will be empty when the download fails (e.g. due
to a 404), this commit fixes a bug where this would be interpreted as
the download having completed which would subsequently start hash
verification of a package that has never actually been downloaded.

Fixes #4919
2023-06-16 11:24:26 +02:00
Christian Helmuth
c09b4ba46b depot: recipe for acpi_event 2023-06-16 11:24:26 +02:00
Johannes Schlatow
6e607349e1 depot: add black_hole and fonts_fs to pkg/goa
Goa now makes use of the black-hole component and has been enabled to provide
a fonts_fs.

genodelabs/genode#4928
genodelabs/goa#42
2023-06-16 11:24:26 +02:00
Alice Domage
fb0e8fffa2 New depot_remove component
The depot_remove component can delete PKG archives with
automatically resolving dependencies and deleting archives that are not
required on the system anymore.

Issue genodelabs#4866
2023-06-16 11:24:26 +02:00
Martin Stein
40338f9acb ping*.run: raise test timeout
On some platforms (x86_32/pistachio, x86_64/sel4) system startup is slow
and the previously configured 30 seconds not sufficient. With this commit, the
timeout is raised to 60 seconds only when running on such a platform.

Ref #4923
2023-06-16 11:24:26 +02:00
Martin Stein
21d4b8aba0 nic_router_disable_arp.run: raise test timeout
The previous, rather small timeout of 30 seconds caused problems on
x86_64/sel4.

Ref #4923
2023-06-16 11:24:26 +02:00
Martin Stein
62db70e2ea nic_router_dhcp: raise test timeout
It seems that the previous rather small timeout of 35 seconds caused problems
with our nightly tests on fiasco/x86_32.

Fixes #4923
2023-06-16 11:24:26 +02:00
Martin Stein
563f55e57b nic_dump.run: relax test procedure
This test was originally a copy of ping.run and therefore unnecessarily
inherited all its complexity for testing ping component behavior. Additionally,
ping.run was more actively maintained and evolved over time whereas
nic_dump.run didn't receive the same care. Now, the test fails on certain
platforms although NIC dump works just fine. Therefore, this commit reduces the
test behavior to what is really necessary for testing nic_dump and by doing so,
also fixes the failing targets.

Fixes #4926
2023-06-16 11:24:26 +02:00
Martin Stein
45e5a33b26 sd_card.run: fix broken config and automate
Fixes #4925
2023-06-16 11:24:26 +02:00
Martin Stein
cc99646b23 nic_router_flood.run: adjust success condition
On x86_32 okl4, the test timed out although the test timeout was already at
240 seconds for this platform. Instaed of raising it further, this commit
reduces the number of ping rounds for all platforms that are considered as
slower by the test.

Ref #4923
2023-06-16 11:24:26 +02:00
Norman Feske
e8ee2cc227 tool_chain_auto.run: incr. stack size for x86_32 2023-06-16 11:24:26 +02:00
Norman Feske
f789c8152c stdcxx: add missing symbol
Needed for building noux_pkg/gcc_x86 for x86_32 when using the
compiler's default optimization level (not Genode's default CC_OLEVEL).
2023-06-16 11:24:26 +02:00
Norman Feske
70cf9fe3dd doc/news.txt: grammar fix 2023-06-16 11:24:26 +02:00
Christian Helmuth
98cbfa3561 genode_c_api: MAC address reporter utility
Issue #4918
2023-06-16 11:24:26 +02:00
Christian Helmuth
29b441c6fa net: const Network_address source buffer
Issue #4918
2023-06-16 11:24:26 +02:00
Norman Feske
a27e46989f tool_chain_auto.run: use [build_artifacts]
The run script used to miss a few build targets for boot modules
specified at the 'build_boot_image' step.
2023-06-16 11:24:26 +02:00
Norman Feske
57b66987dd mk/gnu_build.mk: declare .tar as BUILD_ARTIFACTS
This way, run scripts using GNU build targets can use the result of
[build_artifact] for the 'build_boot_image' step.
2023-06-16 11:24:26 +02:00
Sebastian Sumpf
d7440a8b1c tool/ports/current: use silent option for GNU Make 4.4
If this file is called from a Makefile via

! $(shell <path>/tool/ports/current qt5-host)

'shell' will return

"Entering directory '' <path-to-libc> Leaving directory '' Stop.",

and thus, producing multiple targets in the 'tool_chain_qt5' case.

issue #4725
2023-06-16 11:24:26 +02:00
Norman Feske
3c5d27506f base: stricter distinction between rx and rwx
This patch restricts 'Region_map::attach_executable' to create read-only
mappings, while offering the option to map the full rights using a new
'attach_rwx' method.

The 'attach_rwx' method is now used by the dynamic linker to explicitly
attach the linker area with full rwx rights. With the old page-fault
handling code, the execute flag was evaluated only for leaf dataspaces,
not for managed dataspaces while traversing region-map hierarchies.
With the new page-fault handling code, the execute bit is downgraded
to no-execute when passing a managed dataspace that is not attached
as executable.

Issue #4920
2023-06-16 11:24:26 +02:00
Norman Feske
a4c59c03e3 core: rework page-fault resolution
The change "core: allow offset-attached managed dataspaces" addressed a
corner case of the use of nested region maps. Apparently, this change
negatively affects other scenarios (tool_chain_auto).

In order to confidently cover all the differnt situations, this patch
reworks the page-fault resolution code for improved clarity and safety,
by introducing dedicated result types, reducing the use of basic types,
choosing expressive names, and fostering constness.

It also introduces a number of 'print' hooks that greatly ease manual
instrumentation and streamlines the error messages printed by core.
Those messages no longer appear when a user-level page-fault handler
is reistered for the faulted-at region map. So the monitor component
produces less noise on the attempt to dump non-existing memory.

Issue #4917
Fixes #4920
2023-06-16 11:24:26 +02:00
Norman Feske
65d3b3a32f base-linux: build fix for BOARD=pc
This is a follow-up commit to "base: remove internal use of format
strings".

Issue #2064
2023-06-16 11:24:26 +02:00
Norman Feske
47fa54992f run/libc_vfs_filesystem_test: adjust caps for sel4
Fixes libc_vfs_fs_ext2 and libc_vfs_fs_fat on x86_64/qemu/sel4.
2023-06-16 11:24:26 +02:00
Norman Feske
6af42c9fb5 test-sanitizer: simplify, increase caps for sel4 2023-06-16 11:24:26 +02:00
Christian Helmuth
54a549d808 lx_emul: move arch_atomic64_add_return to dde_linux 2023-06-16 11:24:26 +02:00
Norman Feske
6a57683e52 New debug monitor
The new monitor component at os/src/monitor is the designated successor
of the gdb_monitor. This initial version, however, implements only the
subset needed to inspect the memory of the monitored component(s).

In contrast to the gdb_monitor, the new component supports the monitoring
of multiple components, leveraging the sandbox API. It can therefore be
used as a drop-in replacement for the init component. Like the gdb_monitor,
the new monitor speaks the GDB protocol over Genode's terminal session.
But the protocol implementation does not re-use any gdbserver code,
sidestepping the complexities of POSIX.

There exist two run scripts illustrating the new component. The
os/run/monitor.run script exercises memory inspection via the 'm' command
by letting a test program monitor itself. The os/run/monitor_gdb.run
script allows for the interactive use of GDB to interact with monitored
components.

Issue #4917
2023-06-16 11:24:26 +02:00
Norman Feske
65f65073e6 sandbox: allow supplemental config nodes
Let the sandbox library disregard all unknown config sub nodes so that
supplemental information - like the monitor policy configuration - is
not interpreted as a misconfiguration ("unknown config element type ...").

Issue #4917
2023-06-16 11:24:26 +02:00
Norman Feske
add6dbac4e sandbox: add Pd_intrinsics::start_initial_thread
This hook allows for intercepting the creation of initial threads
whenever a new child is started.

Issue #4917
2023-06-16 11:24:26 +02:00
Norman Feske
0d5571a820 base: close PD session last when destructing child
This patch moves the destruction of the child's PD session after the
closing of all other sessions because the PD session's role as resource
container might still be needed for orderly reverting the session quotas
when closing the other remaining sessions.

Issue #4917
2023-06-16 11:24:26 +02:00
Norman Feske
734fc252e8 base: add Child_policy::start_initial_thread
The added interface allows for the local interception of
'Cpu_thread::start' RPC calls.

Issue #4917
2023-06-16 11:24:26 +02:00
Norman Feske
f2153f9b2f sandbox: allow for customized PD access
By default, the sandbox uses the Env::pd() as reference PD session of
the sandbox children.

However, to accomodate use cases where the interplay of the reference
PD session and the child's address space needs to be intercepted, this
patch adds a constructor that takes an interface for the controlled
access of PD intrinsics as argument.

Issue #4917
2023-06-16 11:24:26 +02:00
Norman Feske
30b70da6c1 base/child.h: Child_policy::with_address_space
This patch replaces the former 'address_space' accessor by a new
'with_address_space' interface that grants access to the region map of
the child's address space, but limits the interface lifetime to the
scope of the caller.

Issue #4917
2023-06-16 11:24:26 +02:00
Norman Feske
f47c64e246 core: allow offset-attached managed dataspaces
This patch adds the missing application of the region offset to the
resolution of page faults inside managed dataspaces, which resulted in
an unexpected "invalid mapping" message after attaching a managed
dataspace with an offset.

This limitation could be observed during the implementation of the debug
monitor that locally maps a portion of the debugging target's address
space, e.g., a view port of 16 MiB. All traditional uses of managed
dataspaces (e.g., stack area, linker area) happened to attach the
managed dataspaces from their beginning.

Issue #4917
2023-06-16 11:24:26 +02:00
Sebastian Sumpf
3e0e86f720 mesa: remove 'printf' from 'iris_bufmgr_tmp.patch'
also rename it to 'iris_bufmgr_fd.patch'

issue #4916
2023-06-16 11:24:26 +02:00
Sebastian Sumpf
e3c2fdf414 gpu/intel: enable GPU reset for GEN(8)/9/12
* add semaphore command to ring in order to be able to stop ring
  execution before reset (Wa KabyLake)
* implement reset sequence as done by the Linux driver
* reset ring and cancel job of vgpu causing hang
* lower watchdog timeout 1000ms -> 200ms
* improve scheduling of vgpus so progress after reset is made
* improve the generation chaos a little
* tested on Skylake, Kaby Lake, Tiger Lake

issue #4916
2023-06-16 11:24:26 +02:00
Alexander Boettcher
b599f4e106 sel4: stop thread on alignment fault
by not replying to the IPC. Otherwise, endless alignment faults are triggered,
seen on imx6q Sabrelite and usb_hid_raw.
2023-06-16 11:24:26 +02:00
Alexander Boettcher
530ec3115f sel4/x86: remove Nehalem kernel config adjustment
since the used Genode Qemu model now supports it.
2023-06-16 11:24:26 +02:00
Martin Stein
dea53f635f Refine tresor tests
* Use jitterentropy only if supported.
  On certain targets like pbxa9 or zynq_qemu, the performance counter always
  yields 0, which renders jitterentropy unusable. On these platforms, the
  Tresor tests now use a static value as entropy source instead.

* Adds a new package test-file_vault_config_report_no_entropy that is used by
  the Depot Autopilot on targets without jitterentropy support instead of
  test-file_vault_config_report. The only difference between the two packages
  is the value of the above described new config attribute of the File Vault.

* Circumvent alignment fault.
  The Tresor lib for now has the deficiency of using on-disc data structures
  directly in code instead of decoding them first to unpacked, naturally
  aligned structures. This causes problems with memory-access alignment on
  several platforms (rpi, imx6q_sabrelite, imx53_qsb, imx7d_sabre). As fixing
  this properly is a bit of work, the commit disables the tresor_tester and
  file_vault_config_report test on the affected platforms in autopilot mode for
  now.

* Further adjustments
  * Make benchmarks optional
  * Use a smaller tresor for rekeying
  * Clean up image parameters
  * No use implicit routes/resources
  * Reduce ram consumption
  * Reduce test timeout
  * Raise cap quota, required for sel4 x86_64.

Ref #4819
2023-06-16 11:24:26 +02:00
Martin Stein
5800ab4961 vfs/tresor_trust_anchor: remove debug mode
The debug mode turned out to be unnecessry because the plugin can be simply
replaced with an <inline> file VFS plugin that has a content size of 32 bytes.

Ref #4819
2023-06-16 11:24:26 +02:00
Martin Stein
03d7258d33 tresor: better handling of hash mismatches
Instead of throwing an uncaught exception, the corresponding request is marked
failed.

Ref #4819
2023-06-16 11:24:26 +02:00
Martin Stein
7c5c92351e file_vault: compatibility with 21.05 containers
* Fix minimum passphrase size to be the same as with File Vault 21.05.
* Adapt to different image name of File Vault 21.05.

Ref #4819
2023-06-16 11:24:25 +02:00
Martin Stein
80b729703b file_vault_config_report tests: fix for pistachio
* relaxes the timing and reduces the test steps because pistachio is quite
  slow and would otherwise trigger problems with our easy approach of using a
  dynamic rom instead of a proper manager

* provide IO_PORT and IRQ session to timer driver

Ref #4819
2023-06-16 11:24:25 +02:00
Josef Söntgen
194af03fe9 autopilot.list: replace cbe with tresor tester
Issue #4819.
2023-06-16 11:24:25 +02:00
Martin Stein
c40205e93f pkg/test-file_vault_config_report: minor style fix
Ref #4819
2023-06-16 11:24:25 +02:00
Martin Stein
d9dd518a20 pkg/file_vault: fix missing fs route
The File System route for the Tresor Init sub-component was somehow missing.

Ref #4819
2023-06-16 11:24:25 +02:00
Alexander Boettcher
ceaa02230e qemu: set default cpu model for x86_64 explicitly
With the update to sel4 and the gcc 12, assembly instructions are generated
and used, like POPCNT. The instruction is available on our native hardware,
but not emulated by the default cpu model necessarily, which leads to
undefined opcode exceptions (Qemu 4.2.1 && seL4). Additionally, the features
of the default Qemu cpu model may vary between Qemu releases and makes it
harder to correlate effects.
2023-06-16 11:24:25 +02:00
Martin Stein
e0dc544aa5 tool: add qemu run opts for zynq_qemu
Ref #4819
2023-06-16 11:24:25 +02:00
Christian Helmuth
6cb697e6d8 base: remove ancient artifact of config library
The config library was removed in issue #2431 in 2017.
2023-06-16 11:24:25 +02:00
Norman Feske
250c16ddcf os/path.h: fix misleading comments
Issue #4708
2023-06-16 11:24:25 +02:00