Commit Graph

15 Commits

Author SHA1 Message Date
Christian Helmuth
83f5dd8a8b pc/wifi: shared library depends on symbol.map
CUSTOM_TARGET_DEPS does not trigger relinking the lib but recreates the
.tag file only.
2022-06-02 09:33:27 +02:00
Martin Stein
ab0bce77ec lx_emul & wireguard & wifi: centralized random.cc
Both the Wifi driver and the WireGuard port used local implementations for
their source of randomness. Wifi used a Xoroshiro128+ PRNG for rapid generation
of random values but initialized this PRNG always with the same static seed
value. WireGuard, in contrast, requested each random byte directly from the
jitterentropy lib, which is considered to be very time intensive.

This commit removes the local variants of random.cc and introduces a new
centralized lx_emul/random.cc . The new variant combines the former approaches,
so, that jitterentropy is accessed only in order to generate a random seed for
a Xoroshiro128+ PRNG. Front-end requests for random values are then fulfilled
efficiently via the PRNG.

:Warning:

The output of the Xoroshiro128+ PRNG that is used in the new implementation of
the lx_emul randomness functions has known statistical problems (see
https://en.wikipedia.org/wiki/Xoroshiro128%2B#Statistical_Quality).
Furthermore, the integration of Xoroshir128+ with the lx_emul code was not
reviewed/audited for its security-related properties, so far, and has the
known deficiency of seeding the PRNG only once during initialization. Thus,
we strongly advise against the use of the lx_emul randomness functions for
security-critical purposes.

Ref #4397
2022-05-25 12:23:03 +02:00
Josef Söntgen
d92b84fbc3 pc_wifi_drv: add RFKILL support
This commits hooks up a RFKILL management to the driver. The
'README' contains instructions on how to use it.

Fixes #4506.
2022-05-25 12:22:10 +02:00
Josef Söntgen
913aec1667 pc_wifi_drv: dissolve user tasks interdependence
The 'uplink' task was created by the 'socketcall' task although both
may operate independently.

Issue #4506.
2022-05-25 12:22:10 +02:00
Josef Söntgen
6954547b4c pc: consoldiate LX emul of current drivers
This commit de-duplicates the redundant dummy implementations and
to some degree also the 'lx_emul.c' implementations while also
decluttering the various 'dep.list' files.

The code is moved into 'src/lib/pc/lx_emul' where it becomes part
of the 'pc_lx_emul' library.

Fixes #4500.
2022-05-25 12:19:33 +02:00
Josef Söntgen
d324331325 pc: centralize initcall header
Instead of each driver providing its own header file use a central
header as the initcall order header should cover _all_ provided
initcalls resulting from the used 'pc_linux' kernel config.

Note that the 'pc_linux' configuration was extended with the
'USB_USBNET' option because the module's initcall is needed for the
Genode C API for USB glue-code and the 'PACKET' option needed by
the wireless lan driver.

The lack of theses options was not noticed as each driver used its
own initcall header so far that stemmed from the initial porting
effort.

Issue #4500.
2022-05-25 12:19:33 +02:00
Josef Söntgen
e7e7893f22 pc: update wifi driver
The driver falls in line with the previous 'legacy_wifi_drv' component
where the ported wireless LAN stack and device driver is encapsulated
in a library. This library in return is used by the 'Libc::Component'
providing the necessary environment for the 'wpa_supplicant'.

In constrast to the old driver a 'wifi' VFS plugin is in charge of
initalizing the 'Lx_kit::Env' prior to executing any static
constructors.

Fixes #4455.
2022-04-13 09:29:04 +02:00
Josef Söntgen
7cd8285251 pc_lx_emul: use page alloc shadow implementation
Issue #4455.
2022-04-13 09:29:04 +02:00
Christian Helmuth
d182b20705 build: ensure rules with pipes might fail
.SHELLFLAGS is extended by option pipefail to make pipes fail if any pipe
element fails. As .SHELLFLAGS is exported into sub-make instances it
must be unexported before calling third-party build systems recursively.
2022-03-21 13:43:13 +01:00
Stefan Kalkowski
0fa695dbd7 lx_kit/lx_emul: make memory backend configureable
* Drivers have to use lx_kit/memory_dma.cc
* Protocol-stacks use lx_kit/memory_non_dma.cc
* Moreover the device-dependent lx_emul parts get removed
  from the common lx_emul import rules

Fix #4443
2022-03-09 10:55:16 +01:00
Stefan Kalkowski
5c71a8d74d lx_emul: extract common lx_emul import makefile
Fix #4442
2022-03-09 10:55:16 +01:00
Christian Helmuth
29e6537939 pc: fix dependency to generated crc32table.h 2022-03-07 16:43:12 +01:00
Josef Söntgen
67f797abf2 pc: enable UHCI driver in usb_host
Fix genodelabs/genode#4438
2022-03-07 16:43:12 +01:00
Stefan Kalkowski
e1a2b5c8d4 pc: build lx_emul and linux driver code with -O2
Ref genodelabs/genode#4416
2022-02-21 15:47:51 +01:00
Stefan Kalkowski
e72f39b484 Provide pc specific lx_emul API
This commit contains:

* Minimal Linux kernel target: pc_linux
* Library to generate a Linux build directory, config, generated headers
* API depot package

The actual work was provided by Josef Soentgen.

Ref genodelabs/genode#4416
2022-02-15 10:23:58 +01:00