Commit Graph
9903 Commits
Author SHA1 Message Date
Mike Yuan 73b82070e1 docs,man: more SysV compat removal notes 2026-01-18 15:50:54 +09:00
Yu Watanabe 4ac445c152 udev/net: support more ethtool features
Closes #39318.
2026-01-17 02:52:20 +09:00
Yu Watanabe d5a7f58d1a Also drop SysV rc.local script support (#40295)
Continuation of #39770.
2026-01-17 02:50:08 +09:00
Luca Boccassi 3e2a5dc2e1 dissect: support mount options when going through mountfsd, requiring privileges via polkit (#39394)
RootImageOptions=/ExtensionImages=/MountImages= all support custom
mount options, but mountfsd does not support it. Add varlink
parameters to allow callers to specify mount options so that
those directives can work as expected. Require additional privs via
polkit.
2026-01-16 14:55:02 +00:00
Yu Watanabe d207be293c Drop support for SysV rc-local script support
As already announced for several years.
2026-01-16 22:56:28 +09:00
Yu Watanabe 0a2cdd5891 Drop remaining references about sysv script support
Follow-up for 986fee6217.
2026-01-16 22:56:08 +09:00
Michael Vogt 3f958812fd sd-boot: allow setting the timeout via SMBIOS 11
Allow configuring the menu timeout used by sd-boot by setting
`io.systemd.boot.timeout=<value>` as SMBIOS type 11 string.

This takes precedence over the setting from the config file
and the EFI var.

Useful for e.g. integration tests that want to control that
a generic image boots faster.
2026-01-16 10:26:48 +01:00
Zbigniew Jędrzejewski-Szmek 311fddcd8d man/systemd.service: Expand docs on RestartSteps (#40309) 2026-01-15 11:41:17 +01:00
Michael Vogt b6eabd21ea man: fix copy/paste issue in systemd-vmspawn.xml
The systemd-vmspawn man page has a note that the `--notify-ready`
defaults to "true" and then says that this is unlike "systemd-vmspawn"
where it defaults to "false". This appears to be a copy/paste issue
and here we want "unlike systemd-nspawn".
2026-01-14 17:15:20 +09:00
Christian Hesse d1bd940deb man: drop duplicate "the" 2026-01-14 10:14:31 +09:00
Yu Watanabe 716246f235 man: fix indentation 2026-01-12 18:33:58 +09:00
Matthijs Kooijman af88aa17c7 man/systemd.service: Note RestartSteps only works with RestartSec= set
Setting Restart=0 seems reasonable to have no delay on the first
restart, if you do not realize this is impossible with an exponential
restart. So explicitly mention that RestartSec must be set.
2026-01-08 23:46:05 +01:00
Matthijs Kooijman 2102511f4a man/systemd.service: Note RestartSteps are exponential 2026-01-08 23:34:03 +01:00
Yu Watanabe 5366dbdbd4 core: fix typo
Follow-up for 32614b9aab.
2026-01-08 12:20:22 +09:00
Luca Boccassi 3a8759e5d4 dissect: support mount options when going through mountfsd
RootImageOptions=/ExtensionImages=/MountImages= all support
custom mount options, use the new mountfsd parameters to
configure them if they are specified.

This requires additioanl privileges via polkit due to security
implications of mount options, so document an example policy
that allows to use the nosuid mount option.
2026-01-07 00:47:53 +01:00
Yu Watanabe 3ff23e8c4b man: do not manually update man/rules/meson.build
Follow-up for 25393c7c90.
2026-01-06 22:50:47 +01:00
Yu Watanabe 17ea504efb core: change mount options settings so that last defined wins (#39449) 2026-01-07 04:11:29 +09:00
Yu Watanabe a6d553c4f4 Drop support for sysvinit scripts (#39770)
As announced by a few releases now, finally drop support for sysvinit scripts.
2026-01-07 02:51:53 +09:00
Luca Boccassi 9de41f677c core: change mount options settings so that last defined wins
Currently mount options are handled in such a way that the first
definition for a given partition wins, and documented as such.
Change them so that they behave like other options, and the
last specified wins.
Applies to RootImageOptions=, MountImages= and ExtensionImages=.
Switch from a linked list to an array indexed by the partition
specifier to store them.
2026-01-06 17:59:10 +01:00
Usama Arif 32614b9aab core: introduce MemoryTHP= unit file setting
Transparent Hugepages (THP) is a Linux kernel feature that manages
memory using larger pages (2MB on x86, compared to the default 4KB).
The main goal is to improve memory management efficiency and system
performance, especially for memory-intensive applications.
However, it can cause drawbacks in some scenarios, such as memory
regression and latency spikes. THP policy is governed for the entire
system via /sys/kernel/mm/transparent_hugepage/enabled.
However, it can be overridden for individual workloads via prctl(2)
call.
MemoryTHP= is used to disable THPs at exec-invoke to stop
providing THPs for workloads where the drawbacks outweigh the advantages.
When set to "disable", MemoryTHP= disables THPs completely for the
process, irrespecitive of global THP controls.
When set to "madvise", MemoryTHP= disables THPs for the process except
when specifically madvised by the process with MADV_HUGEPAGE or MADV_COLLAPSE.
2026-01-06 03:26:14 -08:00
Luca Boccassi 986fee6217 Drop support for sysvinit scripts
As announced by a few releases now, finally drop support for
sysvinit scripts.
Keep rc-local generator for now, as it's really a distinct
feature even though from the same era.
2026-01-06 10:34:02 +01:00
Luca Boccassi 5b3a86f6c3 rc-local and sysvinit are independent, adjust meson/units/docs
They are separate and independent settings, so adjust meson rules
and unit files accordingly. It is possible to enable support for
rc-local script without support for sysvinit scripts, and viceversa.
This will become useful later when sysvinit scripts support is
removed.
2026-01-06 10:34:00 +01:00
Alexis-Emmanuel Haeringer adfa4b6b74 man/kernel-install: /proc/cmdline is not used as a fallback in container 2026-01-06 08:49:32 +09:00
Yu Watanabe 9bad7610f8 man: fix typo 2026-01-06 08:48:05 +09:00
Tobias Stoeckmann a6ef858850 sysusers: document u! version support
Document at which version the exclamation mark suffix is supported.
Version 215 at the end of the list item is a bit misleading.
2026-01-06 07:21:37 +09:00
Nick Rosbrook 75890d949f ukify: omit .osrel section when --os-release= is empty
The primary motivation for this is to allow users of ukify to build
UKI-like objects, without having them later be detected as a UKI by
tools like kernel-install and bootctl.

The common code used by these tools to determine if a PE binary is a UKI
checks that both .osrel and .linux sections are present. Hence, adding
a mechansim to skip .osrel provides a way to avoid being labeled a UKI.
2026-01-06 04:44:43 +09:00
Lucas Werkmeister f8e1a7a66e man/systemd.socket: Document JoinsNamespaceOf= support
This has been supported since systemd v242 (specifically commit
7619cb32f0 if I’m not mistaken; added to NEWS in commit 4107452e51), but
the man page still claimed otherwise.
2026-01-05 03:20:26 +09:00
Ulrich Ölmann dc3078e3a9 man/systemctl: fix typo 2026-01-03 04:45:30 +09:00
Yu Watanabe 33340fbe44 man: drop redundant 'and'
Also swap the order of entries, to make it consistent for other unit
types.

Follow-up for 79dd24cf14.
2026-01-02 09:52:31 +09:00
Yu Watanabe cb9d854207 network: Support interface-bound ECMP routes in MultiPathRoute= (#39742)
MultiPathRoute= can now specify device-only nexthops without a gateway
address, e.g. MultiPathRoute=@wg0. This enables ECMP configurations over
interfaces that don't use gateway addresses, such as WireGuard tunnels.

The syntax is extended from "address[@device] [weight]" to
"[address]@device [weight]". The address is now optional, but at least
one of gateway or device must be specified. The @ symbol must still be
present for device-only routes, making the syntax unambiguous: @wg0
specifies a device, while a bare IP address specifies a gateway.

Device-only nexthops are only available for IPv4 routes. Device-only
multipath routes for IPv6 are not supported by the kernel's netlink
interface and will be rejected with a warning.

This change is fully backwards compatible. All existing configurations
continue to work unchanged, as they always included a gateway address.

Closes #39699.
2026-01-02 09:25:43 +09:00
Daan De Meyer 4e805ec152 vmspawn: Add --user/--system and support user session machined registration
The UX of registering with the user session machined
instance is much better as there won't be an authorization
prompt. To make that available for users, let's add --user
and --system switches for vmspawn. For backwards compat, we'll
still try to register with the system machined instance if the
user machined instance is not available.
2026-01-02 08:49:36 +09:00
Luca Boccassi 9463b3b51c man: document version for BindNetworkInterface instead of using ignore list
The ignore list is for older stuff, all new interfaces must be documented
with a version.

Follow-up for c1c787651b
2025-12-24 19:25:21 +01:00
Luiz Amaral c1c787651b Add support for binding a unit to a network iface 2025-12-24 07:37:58 +01:00
Daan De Meyer 64991b2148 repart: Fix --defer-partitions-empty= docs
Fixes #40176
2025-12-21 19:30:06 +00:00
Matt Fleming 4dcbfbb1ad process-util: Add support SCHED_EXT scheduling policy
Allow CPUSchedulingPolicy to be set to "ext". SCHED_EXT is a new
scheduling policy in Linux v6.12 that allows processes to be scheduled
using custom BPF schedulers instead of the default in-kernel ones.

Selectively setting the SCHED_EXT policy is useful for systems running
in "partial mode" where not all processes are run using a custom
scheduler.

Fallback to SCHED_OTHER and print an error message for systems where
SCHED_EXT isn't available.
2025-12-20 18:31:55 +01:00
Daan De Meyer a1e5d7f865 sd-event: Clean up SIGCHLD conditions for sd_event_add_child()
First, don't require blocking SIGCHLD for WEXITED. We watch for WEXITED
via pidfd instead of signalfd, so no need to insist on blocking SIGCHLD
anymore if we're only watching for WEXITED.

Second, do a proper check to see if the kernel autoreaping logic is
enabled. That has nothing to do with SIGCHLD being blocked for the current
thread or not. Instead, the kernel autoreaping logic is enabled either if
the disposition is set to SIG_IGN or if the SA_NOCLDWAIT flag is enabled.
2025-12-20 15:27:22 +01:00
Luca Boccassi 059b3b466d core: reuse existing dm-verity device for single filesystem images pinned by policy (#40007)
Loading images is, generally speaking, the slowest part of sd-executor
when spawning a service. This is due to multiple factors. dm-verity is
obviously a big part of the cost, but dissecting in general via libblkid
also can take a lot of time, due to probing the images and their
filesystems.

A performance test doing service restarts in a row shows these
results, ran on a production system (low power and slow ARM64 SOC) with
a real production service, show the following service interruption
intervals:

```
Count | P50 (ms)  | P90 (ms) | P95 (ms) | P99 (ms) | P99.9 (ms)
507   | 1,532     | 1,726    | 2,548    | 4,112    | 4,592
```

One iteration is 507 restarts in this case, but this has ran hundreds
of times and the results are always in line within margin of error.
This also holds true for metrics from live systems, same numbers.
Between 1.0s and 1.2s can be attributed by profiling to the time needed
for the service code itself to start up and sd_notify, the rest is spent
inside systemd's code.

This means there is currently a tradeoff for services - either use
secure
images, or make restarting fast. Downtime of services is a very
important
metric, as for many cases this directly translates to outages, total or
partial (blackouot or greyout).

In order to facilitate using secure images without downsides, skip the
slow dissect steps (probing, loop devices, etc) when the configured
image is a single filesystem dm-verity image with a policy that pins it
to a single filesystem, and an already existing and open dm-verity
device
can be found and reused.

This allows orchestrators to pre-open images on download, before
restarting
services, to minimize downtimes.
2025-12-19 13:19:16 +00:00
seidlerv bd6d8eec5e man/org.freedesktop.systemd1.xml: Fix wording 2025-12-19 11:28:46 +01:00
Luca Boccassi d0cb79b8a9 image-policy: add support for restricting to specific filesystems 2025-12-19 09:17:41 +00:00
Lennart Poettering 2062b817d4 keyutil: Add extract-certificate (#39962)
Useful to extract a certificate from a hardware token to a file, for
example in mkosi to ship the certificate from a hardware token in
/usr/lib/verity.d in an image
2025-12-18 21:25:57 +01:00
Lennart Poettering b15cf11327 repart: add basic support for LUKS2 integrity verification (#39295)
Authenticated disk encryption is experimentally supported by cryptsetup
since v2.0.0 and allows for automatic dm-integrity setup for LUKS
devices. Add support for the mode to systemd-repart. The PR adds support
for `cryptsetup luksFormat --integrity` to systemd-repart and
"encryptedwithintegrity" dissection policy.

Limitations:
- No discard, online-only mode for repart.

Closes #39250
2025-12-18 21:19:39 +01:00
Franck Bui 25393c7c90 man: generate systemd-tpm2-generator man page only when ENABLE_BOOTLOADER is enabled 2025-12-18 17:39:25 +01:00
Daan De Meyer 42b6f87a42 keyutil: Add extract-certificate
Useful to extract a certificate from a hardware token to a file, for
example in mkosi to ship the certificate from a hardware token in
/usr/lib/verity.d in an image
2025-12-18 13:57:32 +01:00
Daan De Meyer 9fc537437b keyutil: Rename public to extract-public 2025-12-18 13:56:38 +01:00
Luca Boccassi 9e418cd075 inhibit: allow filtering and add --json support for --list (#39973) 2025-12-18 10:47:23 +00:00
Jeremy Kerr cc1ed77280 udev-builtin-net_id: Extend persistent naming support to MCTP interfaces
Now that we have Management Component Transport Protocol (MCTP) transports
available over USB, it would be helpful to apply udev's persistent
naming rules to MCTP interfaces, to follow the USB hub/port topology.

Enable persistent naming for ARPHRD_MCTP-type devices, using a "mc" name
prefix, and add appropriate definitions for the v260 naming sheme.
2025-12-18 10:54:51 +01:00
Popax21 f603bc37f4 nss-resolve: add env var to specify resolved ifindex
Adds a new `SYSTEMD_NSS_RESOLVE_INTERFACE` environment variable to the nss-resolve module, whose value is subsequently passed down to the `ifindex` resolved lookup option.
This allows name lookups to be constrained to a just single interface for e.g. captive portal browsers.
2025-12-18 10:53:27 +01:00
Vitaly Kuznetsov 1a4a34287f repart: add basic support for LUKS2 integrity verification
Authenticated disk encryption is experimentally supported by cryptsetup since
v2.0.0 and allows for automatic dm-integrity setup for LUKS devices. Add
support for the mode to systemd-repart. Currently, the option can only be used
in 'online' mode as libcryptsetup does not support creating integrity data
without the use of in-kernel dm-integrity infrastructure.

Integrity=/IntegrityAlgorithm= are added in the anticipation of other integrity
protection options, e.g. enabling dm-integrity for a plain unencrypted
partition.
2025-12-18 09:12:49 +01:00
Antonio Alvarez Feijoo 2824182a12 inhibit: allow filtering --list also by what, who and why
Currently the list can only be filtered by mode, so make use of the remaining
options available to filter the output.
2025-12-17 23:23:44 +00:00
Antonio Alvarez Feijoo c40ab2337f inhibit: add --json support for --list 2025-12-17 23:23:44 +00:00