HALF ECHO LEARN / REFERENCE COLLECTION
v262.2TODO.md
Git blob: 10c59d0b424af14ef5cbfde9e99aa680c9466f25
Lines 1–1000 of 3,058
---
title: TODO
category: Contributing
layout: default
SPDX-License-Identifier: LGPL-2.1-or-later
---
# TODO
## Bugfixes
- Many manager configuration settings that are only applicable to user
manager or system manager can be always set. It would be better to reject
them when parsing config.
- Jun 01 09:43:02 krowka systemd[1]: Unit user@1000.service has alias user@.service.
Jun 01 09:43:02 krowka systemd[1]: Unit user@6.service has alias user@.service.
Jun 01 09:43:02 krowka systemd[1]: Unit user-runtime-dir@6.service has alias user-runtime-dir@.service.
## External
- Fedora: add an rpmlint check that verifies that all unit files in the RPM are listed in %systemd_post macros.
- **dbus:**
- natively watch for dbus-*.service symlinks (PENDING)
- teach dbus to activate all services it finds in /etc/systemd/services/org-*.service
- fedora: suggest auto-restart on failure, but not on success and not on coredump. also, ask people to think about changing the start limit logic. Also point people to RestartPreventExitStatus=, SuccessExitStatus=
- neither pkexec nor sudo initialize environ[] from the PAM environment?
- fedora: update policy to declare access mode and ownership of unit files to root:root 0644, and add an rpmlint check for it
- **missing shell completions:**
- **zsh:**
- `<command> <verb> -<TAB>` should complete options, but currently does not
- systemctl add-wants,add-requires
- systemctl status should know about 'systemd-analyze calendar ... --iterations='
- If timer has just OnInactiveSec=..., it should fire after a specified time
after being started.
- **write blog stories about:**
- hwdb: what belongs into it, lsusb
- enabling dbus services
- how to make changes to sysctl and sysfs attributes
- remote access
- how to pass throw-away units to systemd, or dynamically change properties of existing units
- auto-restart
- how to develop against journal browsing APIs
- the journal HTTP iface
- non-cgroup resource management
- dynamic resource management with cgroups
- refreshed, longer missions statement
- calendar time events
- init=/bin/sh vs. "emergency" mode, vs. "rescue" mode, vs. "multi-user" mode, vs. "graphical" mode, and the debug shell
- how to create your own target
- instantiated apache, dovecot and so on
- hooking a script into various stages of shutdown/early boot
## Regularly
- look for close() vs. close_nointr() vs. close_nointr_nofail()
- check for strerror(r) instead of strerror(-r)
- pahole
- set_put(), hashmap_put() return values check. i.e. == 0 does not free()!
- link up selected blog stories from man pages and unit files Documentation= fields
## Janitorial Cleanups
- machined: make remaining machine bus calls compatible with unpriv machined +
unpriv npsawn: GetAddresses(), GetSSHInfo(), GetOSRelease(), OpenPTY(),
OpenLogin(), OpenShell(), BindMount(), CopyFrom(), CopyTo(),
OpenRootDirectory(). Similar for images: GetHostname(), GetMachineID(),
GetMachineInfo(), GetOSRelease().
- rework mount.c and swap.c to follow proper state enumeration/deserialization
semantics, like we do for device.c now
- Replace our fstype_is_network() with a call to libmount's mnt_fstype_is_netfs()?
Having two lists is not nice, but maybe it's now worth making a dependency on
libmount for something so trivial.
- drop set_free_free() and switch things over from string_hash_ops to
string_hash_ops_free everywhere, so that destruction is implicit rather than
explicit. Similar, for other special hashmap/set/ordered_hashmap destructors.
- generators sometimes apply C escaping and sometimes specifier escaping to
paths and similar strings they write out. Sometimes both. We should clean
this up, and should probably always apply both, i.e. introduce
unit_file_escape() or so, which applies both.
- xopenat() should pin the parent dir of the inode it creates before doing its
thing, so that it can create, open, label somewhat atomically.
- use CHASE_MUST_BE_DIRECTORY and CHASE_MUST_BE_REGULAR at more places (the
majority of places that currently employ chase() probably should use this)
## Deprecations and Removals
- Remove any support for booting without /usr pre-mounted in the initrd entirely.
Update INITRD_INTERFACE.md accordingly.
- remove cgroups v1 support (overdue since EOY 2023). As per
https://lists.freedesktop.org/archives/systemd-devel/2022-July/048120.html
and then rework cgroupsv2 support around fds, i.e. keep one fd per active
unit around, and always operate on that, instead of cgroup fs paths.
- drop support for LOOP_CONFIGURE-less loopback block devices, once kernel
baseline is 5.8.
- Remove /dev/mem ACPI FPDT parsing when /sys/firmware/acpi/fpdt is ubiquitous.
That requires distros to enable CONFIG_ACPI_FPDT, and have kernels v5.12 for
x86 and v6.2 for arm.
- Consider removing root=gpt-auto, and push people to use root=dissect instead.
- remove any trace of "cpuacct" cgroup controller, it's a cgroupv1 thing.
similar "devices"
- drop socket_xattr_supported() once our baseline is kernel 7.0
## Features
- sysext: condition confext/sysext on machine tags, too
- sysupdate: add health check logic, revert updates if fail
- sysupdate: run things in a loop always, to deal with stepping stones, and
adding new transfer files. finish, when stable.
- sysupdate: add flag field for features and components, to require a restart
of the update loop once they have been updated.
- confext/sysext: add policy file concept: json files that encode for relevant
confext/sysext ddis rules when to enable them, i.e. version checks. also use
it for the garbage collector
- confext/sysext: mark system as refusing refreshes until reboot if
confext/sysext says it require a reboot
- cryptsetup: add a new switch which makes it wait for the keyfile to
appear. use inotify/mount watching for that. usecase: system waits at boot
for some key to be supplied, possibly delivered via confext or so. This could
be useful in particular in CoCo scenarios where a disk encryption key is only
handed out once an attestation run completed, and might be delivered to the
node asynchronously.
- acquire a TSA from time stamping server, include it in report
- **report:**
- implement signer for TPM2 that adds a quote + event log excerpt as signing
object. should include a TPM timestamp, and some "generation ID" provided
by an orchestrator to guarantee freshness.
- implement metrics provider in logind: report number of active
sessions, and number of sessions since boot.
- implement metrics provider in journald that reports number of log messages
received since boot, by log priority
- allow to compile statically (together with the basic and cgroup
backends)
- make sure backends can also be invoked via forking off
- allow metrics providers to indicate which reported values mean
"nothing"/"invalid"/"zero"/"please-suppress". Then use that to reduce noise
in systemd-report output.
- teach cgroup metrics provider to expose PSI information
- implement metrics provider that reports local IP addresses, and bound open
IP ports
- metrics from pid1: suppress metrics form units that are inactive and have nothing to report
- pass filtering hints to services, so that they can also be applied server-side, not just client side
- add "hint-suppress-zero" flag (which suppresses all metrics which are zero)
- add "hint-object" parameter (which only queries info about certain object)
- make systemd-report a varlink service
- bootctl set-tries for setting retry counters on boot entries
- implement enough of PCP in a new sd-pcp-client library that networkd can use
to punch holes for wireguard into common NAT routers. use that in networkd. alternatively: just use libjuice
- measure an uapi16 manifest of /etc/ during early boot (so that
pre-initialized /etc/ can be detected when systems are enrolled into some
subsystem)
- optionally turn off import of imds on non-firstboot creds (so that IMDS can
be considered an attack vector, except for TOFU)
- store workload identity OIDC server contact info in cloud imds hwdb.
- systemd-analyze unit-shell-me-harder that has both host and unit trees around
but mostly lives in unit namespaces
- os-release consumption at boot: version validation, and maybe in os-release
- ed25519 authentication for sd-boot upgrades for the dm-verity key logic
- in sysupdate resolve %C or so as specifier in transfer fields to the value of
a specific machine tag channel= or so.
- make vmspawn parse UKIs for direct kernel boot
- portabled driving by system credential
- sysinstall: add fully automatic mode that automatically picks target disk,
non-interactively. Should wait to ensure system is up for a certain amount of
minimal time (alternatively: certain amount of time since the last disk
showed up), to ensure disks have shown up before making the decision. Usecase
for this: redfish style server provisioning.
- nspawn: optionally provide a /dev/tpm0 + /dev/tpmrm0 that is backed by swtpm,
much like we do in vmspawn. let's us minimize differences between
environments systemd runs in.
- nspawn/vmspawn: add a concept how we can hand into the payload some proof
that it is running on a certain host, which it can then include in the report,
and which allows us to put together a map about which node runs as payload of
which other node. in particular useful for transient nodes, as it gives them
a better location
- add a small varlink service that wraps the raw sftp logic (without ssh) after a
varlink protocol upgrade, which enables varlink clients to do file transfers,
which is in particular useful when accessing a system via http varlink proxy
- add a small varlink service that allocates a pty and then does ptyfwd stuff
after a protocol upgrade on the incoming connection. Then spawn a shell/getty
on it. This enables varlink clients to acquire a fully featured ssh-like
interactive tty/shell via varlink, which is again useful via http varlink
proxy.
- add something like podman's conmon as a native systemd subsystem:
i.e. allocate ptys, that can be bound to stdio/console of containers and VMs,
that maintain a bit of a scrollback buffer, and one can reconnect to
later. fun idea: might even make /dev/tty1 and friends accessible via
/dev/vcsa1 under the same protocol. this subsystem should potentially be the
same as the varlink ssh-like thing listed above.
- maybe introduce a new ansi sequence that allows propagate SIGWINCH
inline. Idea would be: to enable inline notification of window sizes client
sends a new, to be defined ANSI sequence with its current assumption of
terminal size. Server compares it with current state. If the same it sends
nothing immediately, but does send exactly one update if it changes, and
disables the logic. If not the same sends correction immediately, and
disables the logic. Client has to reissue sequence immediately after getting
notification to get live updates. Benefit of all of this: better terminal
experience if we just forward terminal bytes through a serial link/stream
connection, as terminal sizes will be properly propagated. Write a UAPI spec
for all this. ptyfwd could translate turn upstream SIGWINCH into upstream
sequences of this type, so that every step of the way we get the right
behaviour.
- implement "varlinkctl trace" or so, that watches socket traffic on a group of
processes (select by pid, select by cgroup, select by all machine), and shows
traffic of all sockets marked via the new varlink socket xattrs. Use BPF for
all of that of course.
- add tooling for generating dictionary-based hostnames
- do not pull dbus daemon/broker anymore, instead lazy activate it. Given how
the Varlinkifcation has progressed various non-desktop usescase might not
need D-Bus running at all anymore.
- format-table: introduce the concept of a "title" for a table, which remains
closely associated with the table. in most cases where want to output
multiple tables from the same tool we want to separate things with a title,
hence we might as well associate the title with the table itself, and
streamline a few things.
- sysupdate: offer reading transfer files/components/features optionally from
some JSON fragment rather than transfer files, so that we can update it
independently from any DDI, and it needs no activation cycle. Why? so that
making additional transfers/components/features available can be done without
reloading confext/sysext, and out-band with other configuration changes.
- sysupdate: go through all components, and update them all, one by one.
- pcrextend: we probably should measure /etc/machine-info during boot somehow
- pcrextend: we should measure something when we enter developer mode, by some
definition of developer mode.
- firstboot: optionally accept credentials at firstboot without authentication
- firstboot/sysinstall: add simple interface for prompting users to enable
"features" exposed by sysupdate.
- a tool that can prep credentials, put them in the ESP, for provisioning
systems for SBC or UEFI/HTTP boot. Should be doing what sysinstall does with
the credentials, and maybe even *be* sysinstall.
- make sure we always pass O_NOFOLLOW on O_CREAT
- xopenat(): maybe imply O_NOFOLLOW on O_CREAT
- StorageProvider interface + storagectl
- hook-up in systemd-nspawn
- hook-up in service manager (BindVolume=)
- introduce a locking concept: right now all access to volumes is fully
shared. Let's add a basic locking concept: supporting backends can take an
additional locking flag (which has to be combined with Varlink's "more"),
in which case access would only be handed out to one client at a time, with
the lock's lifetime synced up with the Varlink connection lifetime.
- introduce a volume lifecycle concept: optionally support volumes whose
whole lifecycle is associated with the varlink connections they are tied
to: when the last varlink connection that acquired them goes away, the
volume is auto-destroyed. Would be exposed via a new flag on the Acquire
call, similar to the locking logic above.
- clean up credential naming a bit: let's say encrypted creds always should
carry .cred suffix, and unencrypted should not.
- clean up naming of sidecar files in sd-stub: let's put global ones strictly
into /loader/extras/
- a small tool that can do basic btrfs raid policy mgmt. i.e. gets started as
part of the initial transaction for some btrfs raid fs, waits for some time,
then puts message on screen (plymouth, console) that some devices apparently
are not showing up, then counts down, eventually set a flag somewhere, and
retriggers the fs is was invoked for, which causes the udev rules to rerun
that assemble the btrfs raid, but this time force degraded assembly.
- a way for container managers to turn off getty starting via $container_headless= or so...
- add "conditions" for bls type 1 and type 2 profiles that allow suppressing
them under various conditions: 1. if tpm2 is available or not available;
2. if sb is on or off; 3. if we are netbooted or not; …
- add "homectl export" and "homectl import" that gets you an "atomic" snapshot
of your homedir, i.e. either a tarball or a snapshot of the underlying disk
(use FREEZE/THAW to make it consistent, btrfs snapshots)
- Add "purpose" flag to partition flags in discoverable partition spec that
indicate if partition is intended for sysext, for portable service, for
booting and so on. Then, when dissecting DDI allow specifying a purpose to
use as additional search condition. Use case: images that combined a sysext
partition with a portable service partition in one.
- **systemd-sysinstall:**
- make systemd-sysinstall itself a varlink service
- read installation definition from json file
- polkit support in sysinstall
- sysinstall: permit driving installer via credentials
- add --offline=no mode where we talk to socket based services rather than forking off
- if a user doesn't pick a locale during boot into installer, don't ask again after install, because we suppressed credential propagation
- repart: add MatchLabel= which matches against partition label, so that we
truly can install different images in parallel
- add "systemctl wait" or so, which does what "systemd-run --wait" does, but
for all units. It should be both a way to pin units into memory as well as a
wait to retrieve their exit data.
- add "systemd-analyze debug" + AttachDebugger= in unit files: The former
specifies a command to execute; the latter specifies that an already running
"systemd-analyze debug" instance shall be contacted and execution paused
until it gives an OK. That way, tools like gdb or strace can be safely be
invoked on processes forked off PID 1.
- add "systemd-sysext identify" verb, that you can point on any file in /usr/
and that determines from which overlayfs layer it originates, which image, and with
what it was signed.
- add --vacuum-xyz options to coredumpctl, matching those journalctl already has.
- sysupdate: in .transfer files have a 2nd url that is used if we
auto-rollbacked the OS before.
- sysupdate: optionally enrich URL with countme=1 once a week
- sysupdate: have an explicit concept of update policies: i.e. a choice of at least
- download list + report updates in motd – but do not auto update
- download list + download new version – but do not apply it
- download list + download new version + apply it – but do not reboot
- download list + download new version + apply it + reboot
Other things the policy should contain is when to place the reboot.
This would all decouple the updating of the package list from the application
of it. Which is great for "countme" style stuff.
- Add a "systemctl list-units --by-slice" mode or so, which rearranges the
output of "systemctl list-units" slightly by showing the tree structure of
the slices, and the units attached to them.
- Add a concept of ListenStream=anonymous to socket units: listen on a socket
that is deleted in the fs. Use case would be with ConnectSocket= above.
- add a ConnectSocket= setting to service unit files, that may reference a
socket unit, and which will connect to the socket defined therein, and pass
the resulting fd to the service program via socket activation proto.
- add a dbus call to generate target from current state
- add a dependency on standard-conf.xml and other included files to man pages
- add a job mode that will fail if a transaction would mean stopping
running units. Use this in timedated to manage the NTP service
state.
https://lists.freedesktop.org/archives/systemd-devel/2015-April/030229.html
- add a kernel cmdline switch (and cred?) for marking a system to be
"headless", in which case we never open /dev/console for reading, only for
writing. This would then mean: systemd-firstboot would process creds but not
ask interactively, getty would not be started and so on.
- add a Load= setting which takes literal data in text or base64 format, and
puts it into a memfd, and passes that. This enables some fun stuff, such as
embedding bash scripts in unit files, by combining Load= with
ExecStart=/bin/bash /proc/self/fd/3
- add a mechanism we can drop capabilities from pid1 *before* transitioning
from initrd to host. i.e. before we transition into the slightly lower trust
domain that is the host systems we might want to get rid of some caps.
Example: CAP_SYS_BPF in the signed bpf loading logic above. (We already have
CapabilityBoundingSet= in system.conf, but that is enforced when pid 1
initializes, rather then when it transitions to the next.)
- add a new "debug" job mode, that is propagated to unit_start() and for
services results in two things: we raise SIGSTOP right before invoking
execve() and turn off watchdog support. Then, use that to implement
"systemd-gdb" for attaching to the start-up of any system service in its
natural habitat.
- add a new flag to chase() that stops chasing once the first missing
component is found and then allows the caller to create the rest.
- add a new PE binary section ".mokkeys" or so which sd-stub will insert into
Mok keyring, by overriding/extending whatever shim sets in the EFI
var. Benefit: we can extend the kernel module keyring at ukify time,
i.e. without recompiling the kernel, taking an upstream OS' kernel and adding
a local key to it.
- add a new specifier to unit files that figures out the DDI the unit file is
from, tracing through overlayfs, DM, loopback block device.
- add a new switch --auto-definitions=yes/no or so to systemd-repart. If
specified, synthesize a definition automatically if we can: enlarge last
partition on disk, but only if it is marked for growing and not read-only.
- add a new syscall group "@esoteric" for more esoteric stuff such as bpf() and
usefaultd() and make systemd-analyze check for it.
- Add a new verb "systemctl top"
- add a pam module that on password changes updates any LUKS slot where the password matches
- add a percentage syntax for TimeoutStopSec=, e.g. TimeoutStopSec=150%, and
then use that for the setting used in user@.service. It should be understood
relative to the configured default value.
- add a plugin for factory reset logic that erases certain parts of the ESP,
but leaves others in place.
- add a proper concept of a "developer" mode, i.e. where cryptographic
protections of the root OS are weakened after interactive confirmation, to
allow hackers to allow their own stuff. idea: allow entering developer mode
only via explicit choice in boot menu: i.e. add explicit boot menu item for
it. When developer mode is entered, generate a key pair in the TPM2, and add
the public part of it automatically to keychain of valid code signature keys
on subsequent boots. Then provide a tool to sign code with the key in the
TPM2. Ensure that boot menu item is the only way to enter developer mode, by
binding it to locality/PCRs so that keys cannot be generated otherwise.
- add a system-wide seccomp filter list for syscalls, kill "acct()" "@obsolete"
and a few other legacy syscalls that way.
- add a test if all entries in the catalog are properly formatted.
(Adding dashes in a catalog entry currently results in the catalog entry
being silently skipped. journalctl --update-catalog must warn about this,
and we should also have a unit test to check that all our message are OK.)
- add a utility that can be used with the kernel's
CONFIG_STATIC_USERMODEHELPER_PATH and then handles them within pid1 so that
security, resource management and cgroup settings can be enforced properly
for all umh processes.
- add a way to lock down cgroup migration: a boolean, which when set for a unit
makes sure the processes in it can never migrate out of it
- add ability to path_is_valid() to classify paths that refer to a dir from
those which may refer to anything, and use that in various places to filter
early. i.e. stuff ending in "/", "/." and "/.." definitely refers to a
directory, and paths ending that way can be refused early in many contexts.
- Add ACL-based access management to .socket units. i.e. add AllowPeerUser= +
AllowPeerGroup= that installs additional user/group ACL entries on AF_UNIX
sockets.
- Add AddUser= setting to unit files, similar to DynamicUser=1 which however
creates a static, persistent user rather than a dynamic, transient user. We
can leverage code from sysusers.d for this.
- add an explicit parser for LimitRTPRIO= that verifies
the specified range and generates sane error messages for incorrect
specifications.
- Add and pickup tpm2 metadata for creds structure.
- add another PE section ".fname" or so that encodes the intended filename for
PE file, and validate that when loading add-ons and similar before using
it. This is particularly relevant when we load multiple add-ons and want to
sort them to apply them in a define order. The order should not be under
control of the attacker.
- add bus API for creating unit files in /etc, reusing the code for transient units
- add bus api to query unit file's X fields.
- add bus API to remove unit files from /etc
- add bus API to retrieve current unit file contents (i.e. implement "systemctl cat" on the bus only)
- Add ConditionDirectoryNotEmpty= handle non-absolute paths as a search path or add
ConditionConfigSearchPathNotEmpty= or different syntax? See the discussion starting at
https://github.com/systemd/systemd/pull/15109#issuecomment-607740136.
- add CopyFile= or so as unit file setting that may be used to copy files or
directory trees from the host to the services RootImage= and RootDirectory=
environment. Which we can use for /etc/machine-id and in particular
/etc/resolv.conf. Should be smart and do something useful on read-only
images, for example fall back to read-only bind mounting the file instead.
- Add ELF section to make systemd main binary recognizable cleanly, the same
way as we make sd-boot recognizable via PE section.
- Add ExecMonitor= setting. May be used multiple times. Forks off a process in
the service cgroup, which is supposed to monitor the service, and when it
exits the service is considered failed by its monitor.
- add field to bls type 1 and type 2 profiles that ensures an item is never
considered for automatic selection
- add generator that pulls in systemd-network from containers when
CAP_NET_ADMIN is set, more than the loopback device is defined, even
when it is otherwise off
- add growvol and makevol options for /etc/crypttab, similar to
x-systemd.growfs and x-systemd.makefs.
- Add knob to cryptsetup, to trigger automatic reboot on failure to unlock
disk. Enable this by default for rootfs, also in gpt-auto-generator
- add linker script that implicitly adds symbol for build ID and new coredump
json package metadata, and use that when logging
- add new gpt type for btrfs volumes
- add new tool that can be used in debug mode runs in very early boot,
generates a random password, passes it as credential to sysusers for the root
user, then displays it on screen. people can use this to remotely log in.
- add option to sockets to avoid activation. Instead just drop packets/connections, see http://cyberelk.net/tim/2012/02/15/portreserve-systemd-solution/
- add PR_SET_DUMPABLE service setting
- add proper .osrel matching for PE addons. i.e. refuse applying an addon
intended for a different OS. Take inspiration from how confext/sysext are
matched against OS.
- add proper dbus APIs for the various sd_notify() commands, such as MAINPID=1
and so on, which would mean we could report errors and such.
- add service file setting to force the fwmark (a la SO_MARK) to some value, so
that we can allowlist certain services for imds this way.
- Add service unit setting ConnectStream= which takes IP addresses and connects to them.
- add some optional flag to ReadWritePaths= and friends, that has the effect
that we create the dir in question when the service is started. Example:
ReadWritePaths=:/var/lib/foobar
- add some service that makes an atomic snapshot of PCR state and event log up
to that point available, possibly even with quote by the TPM.
- add some special mode to LogsDirectory=/StateDirectory=… that allows
declaring these directories without necessarily pulling in deps for them, or
creating them when starting up. That way, we could declare that
systemd-journald writes to /var/log/journal, which could be useful when we
doing disk usage calculations and so on.
- add support for "portablectl attach http://foobar.com/waaa.raw (i.e. importd integration)
- add support for activating nvme-oF devices at boot automatically via kernel
cmdline, and maybe even support a syntax such as
root=nvme:\<trtype>:\<traddr>:\<trsvcid>:\<nqn>:\<partition> to boot directly from
nvme-oF
- add support for asymmetric LUKS2 TPM based encryption. i.e. allow preparing
an encrypted image on some host given a public key belonging to a specific
other host, so that only hosts possessing the private key in the TPM2 chip
can decrypt the volume key and activate the volume. Use case: systemd-confext
for a central orchestrator to generate confext images securely that can only
be activated on one specific host (which can be used for installing a bunch
of creds in /etc/credstore/ for example). Extending on this: allow binding
LUKS2 TPM based encryption also to the TPM2 internal clock. Net result:
prepare a confext image that can only be activated on a specific host that
runs a specific software in a specific time window. confext would be
automatically invalidated outside of it.
- Add support for extra verity configuration options to systemd-repart (FEC,
hash type, etc)
- Add SUPPORT_END_URL= field to os-release with more *actionable* information
what to do if support ended
- Add systemd-analyze security checks for RestrictFileSystems= and
RestrictNetworkInterfaces=
- Add systemd-mount@.service which is instantiated for a block device and
invokes systemd-mount and exits. This is then useful to use in
ENV{SYSTEMD_WANTS} in udev rules, and a bit prettier than using RUN+=
- Add systemd-sysupdate-initrd.service or so that runs systemd-sysupdate in the
initrd to bootstrap the initrd to populate the initial partitions. Some things
to figure out:
- Should it run on firstboot or on every boot?
- If run on every boot, should it use the sysupdate config from the host on
subsequent boots?
- add systemd.abort_on_kill or some other such flag to send SIGABRT instead of SIGKILL
(throughout the codebase, not only PID1)
- Add UKI profile conditioning so that profiles are only available if secure
boot is turned off, or only on. similar, add conditions on TPM availability,
network boot, and other conditions.
- Allocate UIDs/GIDs automatically in userdbctl load-credentials if none are
included in the user/group record credentials
- allow dynamic modifications of ConcurrencyHardMax= and ConcurrencySoftMax=
via DBus (and with that also by daemon-reload). Similar for portabled.
- also include packaging metadata (á la
https://systemd.io/PACKAGE_METADATA_FOR_EXECUTABLE_FILES/) in our UEFI PE
binaries, using the same JSON format.
- also parse out primary GPT disk label uuid from gpt partition device path at
boot and pass it as efi var to OS.
- as soon as we have sender timestamps, revisit coalescing multiple parallel daemon reloads:
https://lists.freedesktop.org/archives/systemd-devel/2014-December/025862.html
- augment CODE_FILE=, CODE_LINE= with something like CODE_BASE= or so which
contains some identifier for the project, which allows us to include
clickable links to source files generating these log messages. The identifier
could be some abbreviated URL prefix or so (taking inspiration from Go
imports). For example, for systemd we could use
CODE_BASE=github.com/systemd/systemd/blob/98b0b1123cc or so which is
sufficient to build a link by prefixing "http://" and suffixing the
CODE_FILE.
- Augment MESSAGE_ID with MESSAGE_BASE, in a similar fashion so that we can
make clickable links from log messages carrying a MESSAGE_ID, that lead to
some explanatory text online.
- automatic boot assessment: add one more default success check that just waits
for a bit after boot, and blesses the boot if the system stayed up that long.
- automatically ignore threaded cgroups in cg_xyz().
- automatically mount one virtiofs during early boot phase to /run/host/,
similar to how we do that for nspawn, based on some clear tag.
- automatically propagate LUKS password credential into cryptsetup from host
(i.e. SMBIOS type #11, …), so that one can unlock LUKS via VM hypervisor
supplied password.
- automatically reset specific EFI vars on factory reset (make this generic
enough so that infra can be used to erase shim's mok vars?)
- be able to specify a forced restart of service A where service B depends on, in case B
needs to be auto-respawned?
- be more careful what we export on the bus as (usec_t) 0 and (usec_t) -1
- beef up log.c with support for stripping ANSI sequences from strings, so that
it is OK to include them in log strings. This would be particularly useful so
that our log messages could contain clickable links for example for unit
files and suchlike we operate on.
- beef up pam_systemd to take unit file settings such as cgroups properties as
parameters
- blog about fd store and restartable services
- **bootctl:**
- recognize the case when not booted on EFI
- add tool for registering BootXXX entry that boots from some http
server of your choice (i.e. like kernel-bootcfg --add-uri=)
- add reboot-to-disk which takes a block device name, and
automatically sets things up so that system reboots into that device next.
- show whether UEFI audit mode is available
- teach it to prepare an ESP wholesale, i.e. with mkfs.vfat invocation
- teach it to copy in unified kernel images and maybe type #1 boot loader spec entries from host
- BootLoaderSpec: define a way how an installer can figure out whether a BLS
compliant boot loader is installed.
- BootLoaderSpec: document @saved pseudo-entry, update mention in BLI
- bootspec: permit graceful "update" from type #2 to type #1. If both a type #1
and a type #2 entry exist under otherwise the exact same name, then use the
type #1 entry, and ignore the type #2 entry. This way, people can "upgrade"
from the UKI with all parameters baked in to a Type #1 .conf file with manual
parametrization, if needed. This matches our usual rule that admin config
should win over vendor defaults.
- bpf: see if we can address opportunistic inode sharing of immutable fs images
with BPF. i.e. if bpf gives us power to hook into openat() and return a
different inode than is requested for which we however it has same contents
then we can use that to implement opportunistic inode sharing among DDIs:
make all DDIs ship xattr on all reg files with a SHA256 hash. Then, also
dictate that DDIs should come with a top-level subdir where all reg files are
linked into by their SHA256 sum. Then, whenever an inode is opened with the
xattr set, check bpf table to find dirs with hashes for other prior DDIs and
try to use inode from there.
- bpf: see if we can use BPF to solve the syslog message cgroup source problem:
one idea would be to patch source sockaddr of all AF_UNIX/SOCK_DGRAM to
implicitly contain the source cgroup id. Another idea would be to patch
sendto()/connect()/sendmsg() sockaddr on-the-fly to use a different target
sockaddr.
- bsod: add target "bsod.target" or so, which invokes systemd-bsod.target and
waits and then reboots. Then use OnFailure=bsod.target from various jobs that
should result in system reboots, such as TPM tamper detection cases.
- bsod: maybe use graphical mode. Use DRM APIs directly, see
https://github.com/dvdhrm/docs/blob/master/drm-howto/modeset.c for an example
for doing that.
- build short web pages out of each catalog entry, build them along with man
pages, and include hyperlinks to them in the journal output
- busctl: maybe expose a verb "ping" for pinging a dbus service to see if it
exists and responds.
- bypass SIGTERM state in unit files if KillSignal is SIGKILL
- cache sd_event_now() result from before the first iteration...
- calenderspec: add support for week numbers and day numbers within a
year. This would allow us to define "bi-weekly" triggers safely.
- cgroups: use inotify to get notified when somebody else modifies cgroups
owned by us, then log a friendly warning.
- **cgroups:**
- implement per-slice CPUFairScheduling=1 switch
- introduce high-level settings for RT budget, swappiness
- how to reset dynamically changed unit cgroup attributes sanely?
- when reloading configuration, apply new cgroup configuration
- when recursively showing the cgroup hierarchy, optionally also show
the hierarchies of child processes
- add settings for cgroup.max.descendants and cgroup.max.depth,
maybe use them for user@.service
- chase(): take inspiration from path_extract_filename() and return
O_DIRECTORY if input path contains trailing slash.
- Check that users of inotify's IN_DELETE_SELF flag are using it properly, as
usually IN_ATTRIB is the right way to watch deleted files, as the former only
fires when a file is actually removed from disk, i.e. the link count drops to
zero and is not open anymore, while the latter happens when a file is
unlinked from any dir.
- Clean up "reboot argument" handling, i.e. set it through some IPC service
instead of directly via /run/, so that it can be sensible set remotely.
- clean up date formatting and parsing so that all absolute/relative timestamps we format can also be parsed
- **complete varlink introspection comments:**
- io.systemd.ManagedOOM
- io.systemd.Network
- io.systemd.PCRLock
- io.systemd.Resolve.Monitor
- io.systemd.Resolve
- io.systemd.oom
- io.systemd.sysext
- confext/sysext: instead of mounting the overlayfs directly on /etc/ + /usr/,
insert an intermediary bind mount on itself there. This has the benefit that
services where mount propagation from the root fs is off, an still have
confext/sysext propagated in.
- consider adding a new partition type, just for /opt/ for usage in system
extensions
- coredump: maybe when coredumping read a new xattr from /proc/$PID/exe that
may be used to mark a whole binary as non-coredumpable. Would fix:
https://bugs.freedesktop.org/show_bug.cgi?id=69447
- **coredump:**
- save coredump in Windows/Mozilla minidump format
- when truncating coredumps, also log the full size that the process had, and make a metadata field so we can report truncated coredumps
- add examples for other distros in PACKAGE_METADATA_FOR_EXECUTABLE_FILES
- **credentials system:**
- acquire from EFI variable?
- acquire via ask-password?
- acquire creds via keyring?
- pass creds via keyring?
- pass creds via memfd?
- acquire + decrypt creds from pkcs11?
- make macsec code in networkd read key via creds logic (copy logic from
wireguard)
- make gatewayd/remote read key via creds logic
- add sd_notify() command for flushing out creds not needed anymore
- if we ever acquire a secure way to derive cgroup id of socket
peers (i.e. SO_PEERCGROUPID), then extend the "scoped" credential logic to
allow cgroup-scoped (i.e. app or service scoped) credentials. Then, as next
step use this to implement per-app/per-service encrypted directories, where
we set up fscrypt on the StateDirectory= with a randomized key which is
stored as xattr on the directory, encrypted as a credential.
- optionally include a per-user secret in scoped user-credential
encryption keys. should come from homed in some way, derived from the luks
volume key or fscrypt directory key.
- add a flag to the scoped credentials that if set require PK
reauthentication when unlocking a secret.
- rework docs. The list in
https://systemd.io/CREDENTIALS/#well-known-credentials is very stale.
Document credentials in individual man pages, generate list as in
systemd.directives.
- creds: add a new cred format that reused the JSON structures we use in the
LUKS header, so that we get the various newer policies for free.
- cryptenroll/cryptsetup/homed: add unlock mechanism that combines tpm2 and
fido2, as well as tpm2 + ssh-agent, inspired by ChromeOS' logic: encrypt the
volume key with the TPM, with a policy that insists that a nonce is signed by
the fido2 device's key or ssh-agent key. Thus, add unlock/login time the TPM
generates a nonce, which is sent as a challenge to the fido2/ssh-agent, which
returns a signature which is handed to the tpm, which then reveals the volume
key to the PC.
- cryptenroll/cryptsetup/homed: similar to this, implement TOTP backed by TPM.
- cryptsetup/homed: implement TOTP authentication backed by TPM2 and its
internal clock.
- **cryptsetup:**
- cryptsetup-generator: allow specification of passwords in crypttab itself
- support rd.luks.allow-discards= kernel cmdline params in cryptsetup generator
- add boolean for disabling use of any password/recovery key slots.
(i.e. that we can operate in a tpm-only mode, and thus protect us from rogue
root disks)
- new crypttab option to auto-grow a luks device to its backing
partition size. new crypttab option to reencrypt a luks device with a new
volume key.
- a mechanism that allows signing a volume key with some key that
has to be present in the kernel keyring, or similar, to ensure that confext
DDIs can be encrypted against the local SRK but signed with the admin's key
and thus can authenticated locally before they are decrypted.
- add option for automatically removing empty password slot on boot
- optionally, when run during boot-up and password is never
entered, and we are on battery power (or so), power off machine again
- when waiting for FIDO2/PKCS#11 token, tell plymouth that, and
allow plymouth to abort the waiting and enter pw instead
- allow encoding key directly in /etc/crypttab, maybe with a
"base64:" prefix. Useful in particular for pkcs11 mode.
- reimplement the mkswap/mke2fs in cryptsetup-generator to use
systemd-makefs.service instead.
- sysext: make systemd-{sys,conf}ext-sysroot.service work in the split `/var`
configuration.
- sd-varlink: add fully async modes of the protocol upgrade stuff
- repart: maybe remove iso9660/eltorito superblock from disk when booting via
gpt, if there is one.
- crypttab/gpt-auto-generator: allow explicit control over which unlock mechs
to permit, and maybe have a global headless kernel cmdline option
- currently x-systemd.timeout is lost in the initrd, since crypttab is copied into dracut, but fstab is not
- dbus: when a unit failed to load (i.e. is in UNIT_ERROR state), we
should be able to safely try another attempt when the bus call LoadUnit() is invoked.
- ddi must be listed as block device fstype
- define a JSON format for units, separating out unit definitions from unit
runtime state. Then, expose it:
1. Add Describe() method to Unit D-Bus object that returns a JSON object
about the unit.
2. Expose this natively via Varlink, in similar style
3. Use it when invoking binaries (i.e. make PID 1 fork off systemd-executor
binary which reads the JSON definition and runs it), to address the cow
trap issue and the fact that NSS is actually forbidden in
forked-but-not-exec'ed children
4. Add varlink API to run transient units based on provided JSON definitions
- define gpt header bits to select volatility mode
- delay activation of logind until somebody logs in, or when /dev/tty0 pulls it
in or lingering is on (so that containers don't bother with it until PAM is used). also exit-on-idle
- deprecate RootDirectoryStartOnly= in favour of a new ExecStart= prefix char
- **dhcp6:**
- add functions to set previously stored IPv6 addresses on startup and get
them at shutdown; store them in client->ia_na
- write more test cases
- implement reconfigure support, see 5.3., 15.11. and 22.20.
- implement support for temporary addresses (IA_TA)
- implement dhcpv6 authentication
- investigate the usefulness of Confirm messages; i.e. are there any
situations where the link changes without any loss in carrier detection
or interface down
- some servers don't do rapid commit without a filled in IA_NA, verify
this behavior
- RouteTable= ?
- **dhcp:**
- figure out how much we can increase Maximum Message Size
- dissection policy should enforce that unlocking can only take place by
certain means, i.e. only via pw, only via tpm2, or only via fido, or a
combination thereof.
- do a console daemon that takes stdio fds for services and allows to reconnect
to them later
- doc: prep a document explaining PID 1's internal logic, i.e. transactions,
jobs, units
- doc: prep a document explaining resolved's internal objects, i.e. Query
vs. Question vs. Transaction vs. Stream and so on.
- docs: bring https://systemd.io/MY_SERVICE_CANT_GET_REALTIME up to date
- document Environment=SYSTEMD_LOG_LEVEL=debug drop-in in debugging document
- document org.freedesktop.MemoryAllocation1
- **document:**
- document that deps in [Unit] sections ignore Alias= fields in
[Install] units of other units, unless those units are disabled
- document that service reload may be implemented as service reexec
- add a man page containing packaging guidelines and recommending usage of things like Documentation=, PrivateTmp=, PrivateNetwork= and ReadOnlyDirectories=/etc /usr.
- document systemd-journal-flush.service properly
- documentation: recommend to connect the timer units of a service to the service via Also= in [Install]
- man: document the very specific env the shutdown drop-in tools live in
- man: add more examples to man pages,
- in particular an example how to do the equivalent of switching runlevels
- man: maybe sort directives in man pages, and take sections from --help and apply them to man too
- document root=gpt-auto properly
- dot output for --test showing the 'initial transaction'
- drop nss-myhostname in favour of nss-resolve?
- **EFI:**
- honor timezone efi variables for default timezone selection (if there are any?)
- enable LockMLOCK to take a percentage value relative to physical memory
- Enable RestrictFileSystems= for all our long-running services (similar:
RestrictNetworkInterfaces=)
- encode type1 entries in some UKI section to add additional entries to the
menu.
- enumerate virtiofs devices during boot-up in a generator, and synthesize
mounts for rootfs, /usr/, /home/, /srv/ and some others from it, depending on
the "tag". (waits for: https://gitlab.com/virtio-fs/virtiofsd/-/issues/128)
- /etc/veritytab: allow that the roothash column can be specified as fs path
including a path to an AF_UNIX path, similar to how we do things with the
keys of /etc/crypttab. That way people can store/provide the roothash
externally and provide to us on demand only.
- exponential backoff in timesyncd when we cannot reach a server
- expose MS_NOSYMFOLLOW in various places
- expose the handoff timestamp fully via the D-Bus properties that contain
ExecStatus information
- extend the smbios11 logic for passing credentials so that instead of passing
the credential data literally it can also just reference an AF_VSOCK CID/port
to read them from. This way the data doesn't remain in the SMBIOS blob during
runtime, but only in the credentials fs.
- extend the verity signature partition to permit multiple signatures for the
same root hash, so that people can sign a single image with multiple keys.
- figure out a nice way how we can let the admin know what child/sibling unit causes cgroup membership for a specific unit
- Figure out how to do unittests of networkd's state serialization
- Figure out naming of verbs in systemd-analyze: we have (singular) capability,
exit-status, but (plural) filesystems, architectures.
- figure out what to do about credentials sealed to PCRs in kexec + soft-reboot
scenarios. Maybe insist sealing is done additionally against some keypair in
the TPM to which access is updated on each boot, for the next, or so?
- figure out when we can use the coarse timers