patches and low-level development discussion
 help / color / mirror / code / Atom feed
b311e77c0e9100badde58482c6f279ca545387cd blob 3093 bytes (raw)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
 
= Architecture
:page-parent: About Spectrum

// SPDX-FileCopyrightText: 2022 Unikie
// SPDX-FileCopyrightText: 2022 Alyssa Ross <hi@alyssa.is>
// SPDX-License-Identifier: GFDL-1.3-no-invariants-or-later OR CC-BY-SA-4.0

Spectrum is based on the principle of security by compartmentalization.

The high level stack is illustrated in the following diagram:

image::../diagrams/stack.svg[]

The default set of virtual machines includes two application VMs,
_appvm-catgirl_ (an IRC client) and _appvm-lynx_ (a text-based web
browser); and a system VM, _netvm_ (which handles hardware network
devices and provides network services to application VMs).
Refer to xref:../getting-started/creating-vms.adoc[Creating VMs] and
xref:../getting-started/running-vms.adoc[Running
VMs] for more information about using VMs in Spectrum.

== Architecture Decision Records (ADRs)

https://en.wikipedia.org/wiki/Architectural_decision[Architecturally significant
decisions] are xref:../decisions/index.adoc[recorded] as lightweight
https://cognitect.com/blog/2011/11/15/documenting-architecture-decisions[ADRs].

== Spectrum Host System

Compartmentalization is implemented using
https://cloud-hypervisor.org/[cloud-hypervisor] virtual machines.
cloud-hypervisor uses Linux's
https://en.wikipedia.org/wiki/Kernel-based_Virtual_Machine[Kernel-based Virtual
Machine] (KVM) to provide lightweight, hardware-accelerated VMs.

While Linux (including KVM) is portable between many hardware architectures,
cloud-hypervisor supports only x86_64 and aarch64.
Spectrum currently only works on x86_64, but aarch64 support is in development.

https://skarnet.org/software/s6-rc/overview.html[s6-rc] is used for service
management.  Utilities like kmod, util-linux and busybox are installed for boot
and service scripts.

https://wayland.freedesktop.org/[Wayland] is used for window management and
display.  The Wayland architecture is well documented
https://wayland.freedesktop.org/architecture.html[here].
The host provides onlya Wayland terminal client,
https://codeberg.org/dnkl/foot/[foot], which is used for interacting with VM
consoles.
In future it will be possible for application VMs to display windows on the
single Wayland compositor on the host system, using Wayland virtio-gpu
contexts.  X11 applications are not currently supported, but could be in future.

All host user space components are built with the https://musl.libc.org/[musl C
library].
In comparison to other libc implementations, musl has
https://www.etalabs.net/compare_libcs.html[added safety on resource exhaustion
and security hardening on memory allocation].
Kernel hardening will be investigated in future.

== Spectrum Dependency Tree

For a detailed, interactive view of dependencies, use
https://github.com/utdemir/nix-tree[nix-tree] in the Spectrum repository:

[source,shell]
[listing]
nix-build img/live -I nixpkgs=https://spectrum-os.org/git/nixpkgs/snapshot/nixpkgs-rootfs.tar.gz --no-out-link | xargs -o nix-tree

See the https://diode.zone/w/8DBDQ6HQUe5UUdLkpDuL35[video] of Spectrum live
image interactive analysis with nix-tree.
debug log:

solving b311e77 ...
found b311e77 in https://spectrum-os.org/git/spectrum

Code repositories for project(s) associated with this public inbox

	https://spectrum-os.org/git/crosvm
	https://spectrum-os.org/git/doc
	https://spectrum-os.org/git/mktuntap
	https://spectrum-os.org/git/nixpkgs
	https://spectrum-os.org/git/spectrum
	https://spectrum-os.org/git/ucspi-vsock
	https://spectrum-os.org/git/www

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).