]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
8 hours agotest-pidref: Migrate to new assertion macros
Daan De Meyer [Wed, 19 Nov 2025 13:18:27 +0000 (14:18 +0100)] 
test-pidref: Migrate to new assertion macros

8 hours agoprocess-util: Use pidref_wait_for_terminate_and_check in pidref_safe_fork()
Daan De Meyer [Thu, 18 Dec 2025 09:28:30 +0000 (10:28 +0100)] 
process-util: Use pidref_wait_for_terminate_and_check in pidref_safe_fork()

Note that we still have to block SIGCHLD so that
we can be certain the process is not reaped before
we get the pidfd to it. safe_fork() and friends are
used in libsystemd where we don't control how the
SIGCHLD signal is configured. Specifically, kernel
autoreaping could be enabled which is why we have
to block SIGCHLD until we get the pidfd so that the
kernel cannot autoreap the process before we get
the pidfd.

8 hours agosd-event: Clean up SIGCHLD conditions for sd_event_add_child()
Daan De Meyer [Thu, 18 Dec 2025 09:30:36 +0000 (10:30 +0100)] 
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.

8 hours agoprocess-util: beef up namespace_fork() drastically (#40157)
Daan De Meyer [Sat, 20 Dec 2025 14:27:08 +0000 (15:27 +0100)] 
process-util: beef up namespace_fork() drastically (#40157)

Split out from #40093 and #39806

9 hours agoprocess-util: synchronously wait for namespace_enter() before returning 40157/head
Mike Yuan [Mon, 15 Dec 2025 15:07:17 +0000 (16:07 +0100)] 
process-util: synchronously wait for namespace_enter() before returning

Additionally, report actual errors using errno pipe too.

10 hours agoprocess-util: revamp flags handling in namespace_fork()
Mike Yuan [Sun, 14 Dec 2025 15:02:17 +0000 (16:02 +0100)] 
process-util: revamp flags handling in namespace_fork()

* Specifying all 3 of FORK_DEATHSIG_SIG{KILL,TERM,INT} for
  the middle man makes zero sense. Use SIGKILL only.
* Make sure operations on except_fds work sensibly - close/pack/
  de-ocloexecify fds only in the second level, so that the namespace
  fds remain usable across first safe_fork().
* Fire FORK_NEW_*NS after attaching to the desired namespaces,
  not already in the outer process.
* Insist on PDEATHSIG being enabled to ensure propagation of killing.
* Suppress more redundant flags.

10 hours agoprocess-util: Migrate namespace_fork() to PidRef
Daan De Meyer [Wed, 19 Nov 2025 15:24:15 +0000 (16:24 +0100)] 
process-util: Migrate namespace_fork() to PidRef

Co-authored-by: Mike Yuan <me@yhndnzj.com>
10 hours agoprocess-util: trivial cleanup for read_errno()
Mike Yuan [Fri, 28 Nov 2025 18:50:35 +0000 (19:50 +0100)] 
process-util: trivial cleanup for read_errno()

10 hours agoprocess-util: dedup restore_sigsetp() with block_signals_reset()
Mike Yuan [Fri, 19 Dec 2025 22:26:49 +0000 (23:26 +0100)] 
process-util: dedup restore_sigsetp() with block_signals_reset()

15 hours agouserdbctl: add missing --uuid= to --help text
Lennart Poettering [Sat, 20 Dec 2025 05:33:55 +0000 (06:33 +0100)] 
userdbctl: add missing --uuid= to --help text

Follow-up for: 466562c69b75cec197176f556b940a43bb8350f2

33 hours agoMake .standalone programs same as normal and avoid double compilation (#40148)
Daan De Meyer [Fri, 19 Dec 2025 13:58:34 +0000 (14:58 +0100)] 
Make .standalone programs same as normal and avoid double compilation (#40148)

33 hours agocore: reuse existing dm-verity device for single filesystem images pinned by policy...
Luca Boccassi [Fri, 19 Dec 2025 13:19:16 +0000 (13:19 +0000)] 
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.

34 hours agomkosi: update fedora commit (#40146)
Luca Boccassi [Fri, 19 Dec 2025 12:49:27 +0000 (12:49 +0000)] 
mkosi: update fedora commit (#40146)

34 hours agomeson: avoid double compilation for standalone progs 40148/head
Zbigniew Jędrzejewski-Szmek [Tue, 16 Dec 2025 16:38:44 +0000 (17:38 +0100)] 
meson: avoid double compilation for standalone progs

So far we compiled the normal and standalone versions completely
independently. Let's use the 'extract' template pattern to avoid any
additional compilation and only require an single link to produce the
.standalone variants.

Unfortunately, as designed, the 'extract' framework only allows one set of
object files to be extracted. Since we need all the files for the
.standalone version, we cannot use 'extract' for other purposes. Thus, in
the two cases where 'extract' was used for the test binaries, this is now
changed to compile the files a second time. But the number of files in that
list is small, so this seems like a better option.

(If we weren't using the template system, we could easily extract just the
objects we need. But with the current system, at the point of the
definition, the binaries are not defined yet. We'd need to handle all of
this through sets of dictionaries, and that just seems like too much
trouble to avoid double compilation of a few small files.)

34 hours agomeson: drop now-unused -DSTANDALONE
Zbigniew Jędrzejewski-Szmek [Tue, 16 Dec 2025 16:21:34 +0000 (17:21 +0100)] 
meson: drop now-unused -DSTANDALONE

If we ever want to add it back, it should be with -DSTANDALONE=0|1, so
that #if instead of #ifdef can be used. We generally converted our internal
defines to that form.

34 hours agosysusers,tmpfiles: make standalone versions full-featured
Zbigniew Jędrzejewski-Szmek [Tue, 16 Dec 2025 16:18:40 +0000 (17:18 +0100)] 
sysusers,tmpfiles: make standalone versions full-featured

This effectively reverts 3537577c37d2c23a518540d36884a127aab944f8. Originally,
the #ifdefs were added because we didn't want to pull in the whole tree of
libmount and other dependencies in standalone versions. But dependencies are
now loaded through dlopen(), so this is not needed anymore. (And doesn't even
make much of a difference.)

35 hours agomeson: allow .standalone version to be always built
Zbigniew Jędrzejewski-Szmek [Tue, 16 Dec 2025 15:55:55 +0000 (16:55 +0100)] 
meson: allow .standalone version to be always built

Allow .standalone version to be built on-demand, even if -Dstandalone=false
is configured. In other words, this changes the meson option from a hard
disablement to a soft "build is on/off by default".

The meson config was originally written in this way but we lost this feature
after the transition to templates. It is nice to build additional targets on
demand during development, so add this back.

35 hours agomeson: put src/import source lists directly in templates
Zbigniew Jędrzejewski-Szmek [Sat, 6 Dec 2025 11:44:26 +0000 (12:44 +0100)] 
meson: put src/import source lists directly in templates

The indirection through variables doesn't seem that useful here:
OTOH, the lists are short, and OTOH, there is a bunch of different
programs with similar names. Overall, it's all easier to follow if
the lists are inline.

35 hours agomkosi: update fedora commit reference to cac8dde28a1298bbc2bee40e9ab3b9308392f691 40146/head
Luca Boccassi [Fri, 19 Dec 2025 11:35:09 +0000 (11:35 +0000)] 
mkosi: update fedora commit reference to cac8dde28a1298bbc2bee40e9ab3b9308392f691

cac8dde28a test: Allow passing in extra tests to skip via TEST_SKIP
56377438ba Disable sysinit-path for upstream builds
0c8ea706f9 Fix links to patches
4f5b5a9615 Version 259
bf8019c840 Version 259~rc3
ef777d6572 Check if --max-lines is supported by meson
b562e38e22 Fix use of removed $LOCAL_CONF variable
0289127dae Patch machined to continue after selinux denial
7e409130ee Version 259~rc2
33b38cdbc7 Suppress errors from tar
ddb6474e94 Drop provides for removed sysvinit tools
9ac8c36307 Set meson auto features to auto when building for upstream

35 hours agotools: use -f in mkosi summary in fetch-distro.py
Luca Boccassi [Fri, 19 Dec 2025 11:33:13 +0000 (11:33 +0000)] 
tools: use -f in mkosi summary in fetch-distro.py

$ ./tools/fetch-distro.py -u fedora
+ mkosi --json -d fedora summary
‣ Ignoring --distribution from the CLI. Run with -f to rebuild the image with this setting

Follow-up for 35f6e5c3278bda935b67249a9ee61e9f6252bb6f

35 hours agocore: reuse existing dm-verity device for single filesystem images pinned by policy 40007/head
Luca Boccassi [Thu, 27 Feb 2025 16:58:55 +0000 (16:58 +0000)] 
core: reuse existing dm-verity device for single filesystem images pinned by policy

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.

36 hours agoman/org.freedesktop.systemd1.xml: Fix wording
seidlerv [Fri, 19 Dec 2025 09:46:44 +0000 (10:46 +0100)] 
man/org.freedesktop.systemd1.xml: Fix wording

37 hours agotest-user-util: Migrate to new assertion macros
Daan De Meyer [Fri, 19 Dec 2025 08:26:15 +0000 (09:26 +0100)] 
test-user-util: Migrate to new assertion macros

37 hours agoimage-policy: add helper to determine fstype
Luca Boccassi [Thu, 18 Dec 2025 12:47:51 +0000 (12:47 +0000)] 
image-policy: add helper to determine fstype

37 hours agoimage-policy: add support for restricting to specific filesystems
Luca Boccassi [Wed, 3 Dec 2025 16:48:01 +0000 (16:48 +0000)] 
image-policy: add support for restricting to specific filesystems

39 hours agologs-show: match init.scope rather than _PID=1 for UNIT= (#40142)
Daan De Meyer [Fri, 19 Dec 2025 07:50:33 +0000 (08:50 +0100)] 
logs-show: match init.scope rather than _PID=1 for UNIT= (#40142)

45 hours agologs-show: match init.scope rather than _PID=1 for UNIT= 40142/head
Mike Yuan [Fri, 19 Dec 2025 00:56:26 +0000 (01:56 +0100)] 
logs-show: match init.scope rather than _PID=1 for UNIT=

We should consider the whole init.scope trusted, and any
process trying to log on behalf of a unit there should be
attributed as so.

Follow-up for 4f25248b6e69855b4da6d01690821b9359928edc
Only with this commit is the change in effect.

45 hours agocore/manager: use UNIT_IS_ACTIVE_OR_RELOADING rather than hardcoding service states
Mike Yuan [Fri, 19 Dec 2025 01:06:11 +0000 (02:06 +0100)] 
core/manager: use UNIT_IS_ACTIVE_OR_RELOADING rather than hardcoding service states

except for SERVICE_EXITED which has to be checked manually.

2 days agomkosi: update debian commit reference to d9f2aa1704bc98d1aec6519a863a07eaf12b76ad
Luca Boccassi [Thu, 18 Dec 2025 18:21:42 +0000 (18:21 +0000)] 
mkosi: update debian commit reference to d9f2aa1704bc98d1aec6519a863a07eaf12b76ad

d9f2aa1704 Install systemd-tpm2-generator.8 only for UEFI builds
ac1c7d8048 Drop dependencies on libcap-dev, no longer used since v259
c36e5871ca Do not install systemd-sysv-generator.8 in upstream build
bac0cca0e8 Install new files for upstream build
2855fb1302 Update changelog for 259-1 release

2 days agoRevert qemu debugs (#40138)
Daan De Meyer [Thu, 18 Dec 2025 21:14:21 +0000 (22:14 +0100)] 
Revert qemu debugs (#40138)

Captured some in https://github.com/systemd/systemd/issues/38240 and
they do not look too useful, and add noise, so remove them again

2 days agokeyutil: Add extract-certificate (#39962)
Lennart Poettering [Thu, 18 Dec 2025 20:25:57 +0000 (21:25 +0100)] 
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

2 days agorepart: add basic support for LUKS2 integrity verification (#39295)
Lennart Poettering [Thu, 18 Dec 2025 20:19:39 +0000 (21:19 +0100)] 
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

2 days agossh-proxy: expect OK PORT response from vsock-mux
Miao Wang [Thu, 13 Nov 2025 19:49:15 +0000 (03:49 +0800)] 
ssh-proxy: expect OK PORT response from vsock-mux

The unix-domain socket to AF_VSOCK multiplexers in Firecracker and
vhost-device-vsock sends OK PORT response to the client, resulting
ssh clients to abort the connection with the additional response. This
patch addresses this issue by waiting and expecting the possible OK PORT
response from the multiplexer, if any, and then handover the socket fd
to the ssh client. It only checks if the response begins with OK and
consume the response till the first \n, for simplicity.

Signed-off-by: Miao Wang <shankerwangmiao@gmail.com>
2 days agoAssorted minor cleanups (#40136)
Mike Yuan [Thu, 18 Dec 2025 19:53:58 +0000 (20:53 +0100)] 
Assorted minor cleanups (#40136)

2 days agoUse ANSI CSI 18 to query console size (#39833)
Lennart Poettering [Thu, 18 Dec 2025 19:49:26 +0000 (20:49 +0100)] 
Use ANSI CSI 18 to query console size (#39833)

2 days agoRevert "tests: run qemu with cpu_reset,guest_errors debug messages" 40138/head
Luca Boccassi [Thu, 18 Dec 2025 17:51:07 +0000 (17:51 +0000)] 
Revert "tests: run qemu with cpu_reset,guest_errors debug messages"

This reverts commit b169c7512c9cf3ac8eb2b15141e0b9fab9e8961e.

2 days agoRevert "tests: also add qemu shutdown trace debug logs to integration script"
Luca Boccassi [Thu, 18 Dec 2025 17:51:07 +0000 (17:51 +0000)] 
Revert "tests: also add qemu shutdown trace debug logs to integration script"

This reverts commit 9b42cc3b12c17a4b02d713b2ad499a74acecea1f.

2 days agoRevert "integration-test: check tools distribution rather than image distribution"
Luca Boccassi [Thu, 18 Dec 2025 17:51:06 +0000 (17:51 +0000)] 
Revert "integration-test: check tools distribution rather than image distribution"

This reverts commit fd2cdadc1467c7f57866d45fb579e7cf3830bf54.

2 days agotest: introduce test-sleep and use it in several integration tests (#40086)
Daan De Meyer [Thu, 18 Dec 2025 16:47:57 +0000 (17:47 +0100)] 
test: introduce test-sleep and use it in several integration tests (#40086)

2 days agoman: generate systemd-tpm2-generator man page only when ENABLE_BOOTLOADER is enabled
Franck Bui [Thu, 18 Dec 2025 15:21:00 +0000 (16:21 +0100)] 
man: generate systemd-tpm2-generator man page only when ENABLE_BOOTLOADER is enabled

2 days agojournalctl-show: drop redundant condition 40136/head
Mike Yuan [Sat, 6 Dec 2025 00:29:03 +0000 (01:29 +0100)] 
journalctl-show: drop redundant condition

The combination of --follow and --reverse would have been
rejected in parse_argv() already.

2 days agocore/dbus-manager: drop dangling verify_run_space_and_log() prototype
Mike Yuan [Sat, 15 Nov 2025 18:00:32 +0000 (19:00 +0100)] 
core/dbus-manager: drop dangling verify_run_space_and_log() prototype

Follow-up for 65d9ef40f222588fcaf55e2932f45b0d4bdaf194

2 days agocore/manager: constify DEFAULT_TASKS_MAX
Mike Yuan [Mon, 1 Dec 2025 04:16:13 +0000 (05:16 +0100)] 
core/manager: constify DEFAULT_TASKS_MAX

2 days agosocket-label: mark socket_address_bind_ipv6_only_or_bool_from_string as _pure_
Mike Yuan [Thu, 20 Nov 2025 08:23:11 +0000 (09:23 +0100)] 
socket-label: mark socket_address_bind_ipv6_only_or_bool_from_string as _pure_

2 days agocore: various cleanups for setup_input/output (#39860)
Mike Yuan [Thu, 18 Dec 2025 14:56:42 +0000 (15:56 +0100)] 
core: various cleanups for setup_input/output (#39860)

2 days agodocs/RELEASE: correct numbering without 7
Mike Yuan [Thu, 18 Dec 2025 14:40:33 +0000 (15:40 +0100)] 
docs/RELEASE: correct numbering without 7

Follow-up for b1192a01cd83b28ac0c69cd1eab454beee460a72

2 days agokeyutil: Add extract-certificate 39962/head
Daan De Meyer [Mon, 1 Dec 2025 21:21:45 +0000 (22:21 +0100)] 
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

2 days agokeyutil: Rename public to extract-public
Daan De Meyer [Fri, 12 Dec 2025 13:26:19 +0000 (14:26 +0100)] 
keyutil: Rename public to extract-public

2 days agoopenssl-util: Cast to const type
Daan De Meyer [Fri, 12 Dec 2025 13:16:53 +0000 (14:16 +0100)] 
openssl-util: Cast to const type

2 days agoopenssl-util: Fix logging
Daan De Meyer [Fri, 12 Dec 2025 13:14:20 +0000 (14:14 +0100)] 
openssl-util: Fix logging

2 days agoinhibit: allow filtering and add --json support for --list (#39973)
Luca Boccassi [Thu, 18 Dec 2025 10:47:23 +0000 (10:47 +0000)] 
inhibit: allow filtering and add --json support for --list (#39973)

2 days agofido2: fix enrolling when UV is required ('alwaysUv')
Luca Boccassi [Mon, 24 Nov 2025 20:07:00 +0000 (20:07 +0000)] 
fido2: fix enrolling when UV is required ('alwaysUv')

When a Yubikey or other fido2 device has FIPS mode enabled, UV will
always be required and cannot be disabled. Unhelpfully, when it is not
sent down, the hardware token (not the library) returns a generic
FIDO_ERR_MISSING_PARAMETER:

$ systemd-cryptenroll --fido2-device=auto --fido2-with-client-pin=no foo
<...>
libfido2: rx: payload_len=1
libfido2: fido_rx: buf=0x55c9ce170940, len=1
libfido2: 0000: 14
libfido2: cbor_parse_reply: blob[0]=0x14
libfido2: fido_dev_get_assert_rx: adjust_assert_count
Failed to ask token for assertion: FIDO_ERR_MISSING_PARAMETER

This can be set even when the token doesn't support UV (as in, fingerprint
reader), in which case using the PIN is required.

Check if 'alwaysUv' is set, and if not already configured, force
either UV (if available) or PIN when enrolling.

2 days agoudev-builtin-net_id: Extend persistent naming support to MCTP interfaces
Jeremy Kerr [Fri, 11 Jul 2025 01:34:05 +0000 (09:34 +0800)] 
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.

2 days agonss-resolve: add env var to specify resolved ifindex
Popax21 [Tue, 9 Dec 2025 01:56:01 +0000 (02:56 +0100)] 
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.

2 days agobash: clarfiy what 80-systemd-osc-context.sh is about in the spec
Lennart Poettering [Thu, 18 Dec 2025 09:12:34 +0000 (10:12 +0100)] 
bash: clarfiy what 80-systemd-osc-context.sh is about in the spec

2 days agodocs: add redirection of the osc context to uapi website
Lennart Poettering [Thu, 18 Dec 2025 09:12:19 +0000 (10:12 +0100)] 
docs: add redirection of the osc context to uapi website

2 days agocore: use terminal_get_size_by_csi18 to query terminal size 39833/head
Zbigniew Jędrzejewski-Szmek [Thu, 20 Nov 2025 16:11:23 +0000 (17:11 +0100)] 
core: use terminal_get_size_by_csi18 to query terminal size

This allows us to query the window size without moving the cursor. We have
various reports about the cursor being in an unexpected position and/or state.

Closes https://github.com/systemd/systemd/issues/37526.

2 days agoAdd polkit support to varlinkctl and sd-sysext (#39796)
Luca Boccassi [Thu, 18 Dec 2025 09:10:53 +0000 (09:10 +0000)] 
Add polkit support to varlinkctl and sd-sysext (#39796)

2 days agoTODO: add unimplemented Integrity= systemd-repart options 39295/head
Vitaly Kuznetsov [Thu, 23 Oct 2025 15:35:47 +0000 (17:35 +0200)] 
TODO: add unimplemented Integrity= systemd-repart options

2 days agoTEST-50-DISSECT: test 'encrypted' and 'encryptedwithintegrity' policies
Vitaly Kuznetsov [Tue, 21 Oct 2025 13:23:32 +0000 (15:23 +0200)] 
TEST-50-DISSECT: test 'encrypted' and 'encryptedwithintegrity' policies

Test the newly introduced 'encryptedwithintegrity' image policy and verify
that it's different from 'encrypted' one.

2 days agodissect-image: introduce 'encryptedwithintegrity' policy
Vitaly Kuznetsov [Thu, 16 Oct 2025 12:47:22 +0000 (14:47 +0200)] 
dissect-image: introduce 'encryptedwithintegrity' policy

LUKS2 supports built-in integrity checking which may come very handy to
mitigate partial rollback attacks on the storage when only some specific
parts are restored to some old encrypted state. Specific use-cases like
Confidential VMs may want to mandate the usage of feature e.g. on the root
volume. Introduce "encryptedwithintegrity" image policy to support that.

Note, due to the current libcryptsetup limitations, checking whether the
feature is enabled or not for the 'file' case (e.g. DDI image as a raw file)
requires setting up a loop device. To avoid that and keep dissect fully
functional when working unpriviliged, implement a minimal custom LUKS header
parser.

2 days agoTEST-58-REPART: add testcase for LUKS2 integrity
Vitaly Kuznetsov [Mon, 13 Oct 2025 13:59:29 +0000 (15:59 +0200)] 
TEST-58-REPART: add testcase for LUKS2 integrity

Create an encrypted partition with LUKS2 integrity checking enabled, verify
that dm-integrity mapping appears.

2 days agorepart: add basic support for LUKS2 integrity verification
Vitaly Kuznetsov [Wed, 8 Oct 2025 16:32:56 +0000 (18:32 +0200)] 
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.

2 days agocore: two trivial cleanups (#40126)
Daan De Meyer [Thu, 18 Dec 2025 07:55:29 +0000 (08:55 +0100)] 
core: two trivial cleanups (#40126)

Split out from #40093

2 days agodocs: some updates to release process (#40128)
Daan De Meyer [Thu, 18 Dec 2025 07:53:43 +0000 (08:53 +0100)] 
docs: some updates to release process (#40128)

2 days agomkosi: update debian commit reference to 6f15bdaae7014c233b662ac4a33d464893b81b36
Luca Boccassi [Thu, 18 Dec 2025 01:06:03 +0000 (01:06 +0000)] 
mkosi: update debian commit reference to 6f15bdaae7014c233b662ac4a33d464893b81b36

6f15bdaae7 Update architecture match for 50-pid-max.conf (v3)
333cc1fcc5 Downgrade depends to recommends for IPC endpoint of respective libnss modules
ab99a1b51a Revert "Update architecture match for 50-pid-max.conf"
b93d7f855a Update changelog for 259~rc3-1 release
95c7f8a3d6 Install new udev rule
89509d9692 d/t/tests-in-lxd: re-construct --pin-packages arguments for autopkgtest
6b77249c71 d/extra/dbus-1: rename systemd-localed-read-only.conf
819831c19a Update architecture match for 50-pid-max.conf
0ddff89e9d Mirror dmi_arches from meson.build into debian/udev.install
398e8791db d/t/control: pull in optional libs for boot-and-services too
c727922ad5 Update changelog for 259~rc2-1 release
8faf105531 Install new varlinkctl bash completion script
f4b4cea2be d/t/control: ensure unit-tests autopkgtest pulls in dlopened libraries for test
7e8aba9883 Update changelog for 259~rc1-1 release
5953c42402 Update symbols file for v259~rc1
353125ccfa Install new files for v259~rc1
ca22d1ca4f Drop patches, all merged upstream
32c75efca2 d/t/unit-config: fix python decorator copypasta
e32179d633 d/rules: disable sysv compat in upstream builds
cf77bd44be Install new files for upstream build
aa564e5d3b kernel-install: skip 55-initrd.install when an initrd is already staged

2 days agodocs: update mkosi config file path in release process 40128/head
Luca Boccassi [Thu, 18 Dec 2025 00:47:02 +0000 (00:47 +0000)] 
docs: update mkosi config file path in release process

Follow-up for fb514c2f8f195c869b2f0e9ea5ae4ecdd639ebbd

2 days agodocs: add OBS step to release process
Luca Boccassi [Thu, 18 Dec 2025 00:46:41 +0000 (00:46 +0000)] 
docs: add OBS step to release process

Version rewriting in obs-service-tar-scm is not happy with rc tags

2 days agocore/dbus-execute: respect write flags for empty assignments too 40126/head
Mike Yuan [Mon, 15 Dec 2025 20:02:15 +0000 (21:02 +0100)] 
core/dbus-execute: respect write flags for empty assignments too

2 days agocore/service: const and pure'ify service_restart_usec_next()
Mike Yuan [Mon, 15 Dec 2025 21:03:53 +0000 (22:03 +0100)] 
core/service: const and pure'ify service_restart_usec_next()

2 days agoinhibit: allow filtering --list also by what, who and why 39973/head
Antonio Alvarez Feijoo [Wed, 3 Dec 2025 06:36:38 +0000 (07:36 +0100)] 
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.

2 days agoinhibit: add --json support for --list
Antonio Alvarez Feijoo [Tue, 2 Dec 2025 15:20:48 +0000 (16:20 +0100)] 
inhibit: add --json support for --list

2 days agocore/exec-invoke: remove redundant accmode validation on stderr 39860/head
Mike Yuan [Fri, 21 Nov 2025 22:23:46 +0000 (23:23 +0100)] 
core/exec-invoke: remove redundant accmode validation on stderr

Follow-up for 171ceb4a00294c700c0ba6906a3a3abad846699e

In setup_output() we assume stdout has been set up properly
before stderr, hence the stdout we're inheriting from must
be writable (or more precisely, would have been adjusted to be).
Hence no need to duplicate it.

2 days agocore/exec-invoke: split out maybe_inherit_stdout_from_stdin(), use exec_input_is_inhe...
Mike Yuan [Sat, 22 Nov 2025 18:23:53 +0000 (19:23 +0100)] 
core/exec-invoke: split out maybe_inherit_stdout_from_stdin(), use exec_input_is_inheritable()

Note that exec_input_is_inheritable() rightfully refuses EXEC_INPUT_FILE,
in which case std_output would have been reset in service_fix_stdio()
already.

While at it, use the generic fallback logic of first trying user manager
stdout when stdin is not writable.

2 days agocore/execute: introduce exec_input_is_inheritable() helper
Mike Yuan [Sat, 22 Nov 2025 06:33:22 +0000 (07:33 +0100)] 
core/execute: introduce exec_input_is_inheritable() helper

2 days agocore/exec-invoke: socket_fd must be set if any of stdio requests it
Mike Yuan [Sat, 22 Nov 2025 17:56:41 +0000 (18:56 +0100)] 
core/exec-invoke: socket_fd must be set if any of stdio requests it

This is checked as one of the very first things in exec_invoke(),
hence remove the condition in fixup_input() and the whole
fixup_output().

2 days agocore/exec-invoke: use path_equal() on for stdio files
Mike Yuan [Sat, 22 Nov 2025 03:00:12 +0000 (04:00 +0100)] 
core/exec-invoke: use path_equal() on for stdio files

2 days agocore/execute-serialize: clean up stdio serialization
Mike Yuan [Sat, 22 Nov 2025 06:10:09 +0000 (07:10 +0100)] 
core/execute-serialize: clean up stdio serialization

* Do not interleave root_directory_as_fd with stdio fields
* Do not use different serialization key for different modes
  pointing to same path
* Escape stdio file paths (as per
  9be46b1da8b01c3f47e6c050185f2b45484d6300)

2 days agocore/dbus-execute: path is required if stdio is specified as file
Mike Yuan [Sat, 22 Nov 2025 02:55:41 +0000 (03:55 +0100)] 
core/dbus-execute: path is required if stdio is specified as file

This partially reverts d6ff82d37cae5910a0c62bf830e3cfa70df1e23f.

2 days agocore/exec-invoke: fix stdout and stderr sharing the same named fd
Mike Yuan [Sat, 22 Nov 2025 03:27:37 +0000 (04:27 +0100)] 
core/exec-invoke: fix stdout and stderr sharing the same named fd

Previously such usage would be refused by exec_context_named_iofds()
with -ENOENT, however setup_output() carried relevant logic.

2 days agosysext: add polkit support to varlink service 39796/head
Luca Boccassi [Wed, 12 Nov 2025 22:19:12 +0000 (22:19 +0000)] 
sysext: add polkit support to varlink service

2 days agovarlinkctl: add support for polkit interactive auth
Luca Boccassi [Wed, 19 Nov 2025 01:43:33 +0000 (01:43 +0000)] 
varlinkctl: add support for polkit interactive auth

2 days agocore: set Result=start-limit-hit when a unit is rate limited
Luca Boccassi [Wed, 3 Dec 2025 18:59:34 +0000 (18:59 +0000)] 
core: set Result=start-limit-hit when a unit is rate limited

There is currently no way to figure out a rate limit was hit on a unit,
as the last result is stripped in order to keep reporting the first
result, which is useful in case of a watchdog failure, which is the
reason why it was changed as such.

But rate limiting is also an important information to provide to
users, so allow the Result property to reflect it when it
happens.

3 days agoBump version in meson.version
Luca Boccassi [Wed, 17 Dec 2025 23:14:11 +0000 (23:14 +0000)] 
Bump version in meson.version

3 days agoFinalize meson.version for v259 v259
Luca Boccassi [Wed, 17 Dec 2025 23:02:36 +0000 (23:02 +0000)] 
Finalize meson.version for v259

3 days agoBoot loader menu docs and tweaks (#39842)
Luca Boccassi [Wed, 17 Dec 2025 23:00:59 +0000 (23:00 +0000)] 
Boot loader menu docs and tweaks (#39842)

3 days agosd-boot: correct typos 39842/head
Zbigniew Jędrzejewski-Szmek [Fri, 21 Nov 2025 11:07:04 +0000 (12:07 +0100)] 
sd-boot: correct typos

3 days agoTODO: remove resolved entry
Zbigniew Jędrzejewski-Szmek [Fri, 21 Nov 2025 11:06:31 +0000 (12:06 +0100)] 
TODO: remove resolved entry

Done in https://github.com/uapi-group/specifications/commit/677b722bb8b84625b68162ba201c8461497f9585.

3 days agodocs/BLI: add missing descriptions of feature bits
Zbigniew Jędrzejewski-Szmek [Fri, 21 Nov 2025 10:59:45 +0000 (11:59 +0100)] 
docs/BLI: add missing descriptions of feature bits

Follow up for 2553a5482c77980429565d14662f309e385bd472,
92bb46c464ffc6f04b633f7d82686a766663ad69,
e15d18b4c64e13c37a4c676bf61a5ecf8bba04a3,
a67f22c4a73a22312a61dd9352504cd2a960b8a8,
e1f1b5fc62f721a3a4c14d97ad01447b2ac07d6d.

3 days agoman/systemd-boot: say that /EFI/systemd/drivers is for hardware
Zbigniew Jędrzejewski-Szmek [Fri, 21 Nov 2025 10:31:12 +0000 (11:31 +0100)] 
man/systemd-boot: say that /EFI/systemd/drivers is for hardware

In aad0d11e7c6f1f7dcc7b00173140c74b8abf88cc we stopped supporting XBOOTLDR
with a different fs driver. This was the primary example that comes to mind
when we talk about loading filesystem drivers in the firmware. Since we don't
want people to do load such drivers, use a different example.

3 days agodocs/BOOT_LOADER_INTERFACE: use full variable names once
Zbigniew Jędrzejewski-Szmek [Fri, 21 Nov 2025 10:17:49 +0000 (11:17 +0100)] 
docs/BOOT_LOADER_INTERFACE: use full variable names once

We said in the header that "all EFI variables use the vendor UUID
4a67b082-0a4c-41cf-b6c7-440b29bb8c4f", but people not familiar with
UEFI might not know that this is concatenated with the variable name.
Let's use the full form once — when introducing the variable — to
make it easier to grep and search for.

While at it, use sembreaks in the document. This makes subsequent
changes much easier to review. (It also shows that some sentences
are rather long and thus hard to understand.)

3 days agoChores for v259 (#40120)
Luca Boccassi [Wed, 17 Dec 2025 18:39:40 +0000 (18:39 +0000)] 
Chores for v259 (#40120)

3 days agoNEWS: finalize 40120/head
Luca Boccassi [Wed, 17 Dec 2025 13:35:38 +0000 (13:35 +0000)] 
NEWS: finalize

3 days agoNEWS: update contributors list
Luca Boccassi [Wed, 17 Dec 2025 13:34:57 +0000 (13:34 +0000)] 
NEWS: update contributors list

3 days agoUpdate syscalls table
Luca Boccassi [Wed, 17 Dec 2025 13:33:26 +0000 (13:33 +0000)] 
Update syscalls table

ninja -C build update-syscall-tables update-syscall-header

3 days agoUpdate hwdb
Luca Boccassi [Wed, 17 Dec 2025 13:32:00 +0000 (13:32 +0000)] 
Update hwdb

ninja -C build update-hwdb

3 days agohwdb: fix unstable button triggering on Mipad 2 under GNOME (#40071)
QuickSwift315490 [Wed, 17 Dec 2025 13:26:47 +0000 (21:26 +0800)] 
hwdb: fix unstable button triggering on Mipad 2 under GNOME (#40071)

Change unknown key mappings to reserved.

A KEY_RESERVED button is marked as reserved and passed to the kernel. This will stop the kernel from passing this keystroke event to user space.

If unknown, the key is set to KEY_UNKNOWN and the event is passed to user space, which we want to avoid.

3 days agomeson: fix BPF build warnings due to MS extensions
Haiyue Wang [Wed, 17 Dec 2025 08:02:31 +0000 (16:02 +0800)] 
meson: fix BPF build warnings due to MS extensions

Fix BPF program build warnings on Linux-6.19.0-rc1, more detail is [1]:

A). clang-bpf

[781/2458] Generating src/network/bpf/sysctl-monitor/sysctl-monitor.bpf.unstripped.o with a custom command
In file included from ../src/network/bpf/sysctl-monitor/sysctl-monitor.bpf.c:3:
./vmlinux.h:60263:3: warning: declaration does not declare anything [-Wmissing-declarations]
 60263 |                 struct ns_tree;
       |                 ^~~~~~~~~~~~~~
./vmlinux.h:80251:2: warning: declaration does not declare anything [-Wmissing-declarations]
 80251 |         struct __fs_path;
       |         ^~~~~~~~~~~~~~~~
./vmlinux.h:96184:2: warning: declaration does not declare anything [-Wmissing-declarations]
 96184 |         struct freelist_tid;
       |         ^~~~~~~~~~~~~~~~~~~
./vmlinux.h:114441:2: warning: declaration does not declare anything [-Wmissing-declarations]
 114441 |         struct renamedata;
        |         ^~~~~~~~~~~~~~~~~
./vmlinux.h:118480:2: warning: declaration does not declare anything [-Wmissing-declarations]
 118480 |         union pipe_index;
        |         ^~~~~~~~~~~~~~~~
./vmlinux.h:130452:4: warning: declaration does not declare anything [-Wmissing-declarations]
 130452 |                         struct freelist_counters;
        |                         ^~~~~~~~~~~~~~~~~~~~~~~~
6 warnings generated.

B). gcc-bpf

meson setup -Dbpf-compiler=gcc build

[1040/2458] Generating src/network/bpf/sysctl-monitor/sysctl-monitor.bpf.unstripped.o with a custom command
In file included from ../src/network/bpf/sysctl-monitor/sysctl-monitor.bpf.c:3:
./vmlinux.h:60263:31: warning: declaration does not declare anything
60263 |                 struct ns_tree;
      |                               ^
./vmlinux.h:80251:25: warning: declaration does not declare anything
80251 |         struct __fs_path;
      |                         ^
./vmlinux.h:96184:28: warning: declaration does not declare anything
96184 |         struct freelist_tid;
      |                            ^
./vmlinux.h:114441:26: warning: declaration does not declare anything
114441 |         struct renamedata;
       |                          ^
./vmlinux.h:118480:25: warning: declaration does not declare anything
118480 |         union pipe_index;
       |                         ^
./vmlinux.h:130452:49: warning: declaration does not declare anything
130452 |                         struct freelist_counters;
       |                                                 ^

[1] https://git.kernel.org/torvalds/c/639f58a0f480
    "bpftool: Fix build warnings due to MS extensions"

Signed-off-by: Haiyue Wang <haiyuewa@163.com>
3 days agoman/systemd.exec: Make EnvironmentFile error conditions more explicit
Andrew Halaney [Mon, 15 Dec 2025 21:47:17 +0000 (15:47 -0600)] 
man/systemd.exec: Make EnvironmentFile error conditions more explicit

It is not entirely clear what happens when EnvironmentFile fails in the
prior wording. With the new wording it should now be clear that if it
fails to process the file the service will fail, and if it is prefixed
with "-" all errors are silently ignored.

Signed-off-by: Andrew Halaney <ahalaney@netflix.com>
3 days agotest: fix race condition in TEST-80-NOTIFYACCESS
Luca Boccassi [Tue, 16 Dec 2025 21:44:57 +0000 (21:44 +0000)] 
test: fix race condition in TEST-80-NOTIFYACCESS

In some cases systemd is faster to send the SIGHUP
than the script is to start the 'sleep' and background
it, so it never gets interrupted later and the test
is left hanging waiting for it.

[ 5028.410588] systemd[1]: Starting reload-timeout.service...
[ 5028.429544] reload-timeout.sh[165]: + set -o pipefail
[ 5028.429544] reload-timeout.sh[165]: + COUNTER=0
[ 5028.429841] reload-timeout.sh[165]: + trap sighup_handler SIGHUP
[ 5028.429841] reload-timeout.sh[165]: + export SYSTEMD_LOG_LEVEL=debug
[ 5028.429841] reload-timeout.sh[165]: + SYSTEMD_LOG_LEVEL=debug
[ 5028.429841] reload-timeout.sh[165]: + systemd-notify --ready
[ 5028.432891] systemd[1]: reload-timeout.service: Got notification message from PID 165: READY=1
[ 5028.432908] systemd[1]: reload-timeout.service: Changed start -> running
[ 5028.432983] systemd[1]: reload-timeout.service: Job 409 reload-timeout.service/start finished, result=done
[ 5028.432997] systemd[1]: Started reload-timeout.service.
[ 5028.433941] TEST-80-NOTIFYACCESS.sh[164]: Job for reload-timeout.service finished.
[ 5028.433941] TEST-80-NOTIFYACCESS.sh[164]: Got result done/Success for job reload-timeout.service.
[ 5028.433941] TEST-80-NOTIFYACCESS.sh[164]: Bus n/a: changing state RUNNING → CLOSED
[ 5028.436949] TEST-80-NOTIFYACCESS.sh[99]: + systemctl reload --no-block reload-timeout.service
[ 5028.444523] TEST-80-NOTIFYACCESS.sh[167]: Bus n/a: changing state UNSET → OPENING
[ 5028.444523] TEST-80-NOTIFYACCESS.sh[167]: sd-bus: starting bus by connecting to /run/systemd/private...
[ 5028.444523] TEST-80-NOTIFYACCESS.sh[167]: Bus n/a: changing state OPENING → AUTHENTICATING
[ 5028.444523] TEST-80-NOTIFYACCESS.sh[167]: Executing dbus call org.freedesktop.systemd1.Manager ReloadUnit(reload-timeout.service, replace)
[ 5028.444523] TEST-80-NOTIFYACCESS.sh[167]: Bus n/a: changing state AUTHENTICATING → RUNNING
[ 5028.445202] reload-timeout.sh[165]: + wait_for_signal
[ 5028.445586] reload-timeout.sh[169]: + sleep infinity
[ 5028.447285] reload-timeout.sh[165]: ++ sighup_handler
[ 5028.447285] reload-timeout.sh[165]: ++ echo hup1
[ 5028.444886] systemd[1]: reload-timeout.service: Trying to enqueue job reload-timeout.service/reload/replace
[ 5028.445228] systemd[1]: reload-timeout.service: Installed new job reload-timeout.service/reload as 491
[ 5028.445240] systemd[1]: reload-timeout.service: Enqueued job reload-timeout.service/reload as 491
[ 5028.446601] systemd[1]: reload-timeout.service: Service has no extensions to reload.
[ 5028.446799] systemd[1]: reload-timeout.service: Changed running -> reload-signal
[ 5028.446881] systemd[1]: Reloading reload-timeout.service...
[ 5028.451343] TEST-80-NOTIFYACCESS.sh[167]: Bus n/a: changing state RUNNING → CLOSED
[ 5028.452421] TEST-80-NOTIFYACCESS.sh[99]: + timeout 10 bash -c 'until [[ $(systemctl show reload-timeout.service -P SubState) == "reload-signal" ]]; do sleep .5; done'
[ 5028.460676] TEST-80-NOTIFYACCESS.sh[172]: Bus n/a: changing state UNSET → OPENING
[ 5028.460676] TEST-80-NOTIFYACCESS.sh[172]: sd-bus: starting bus by connecting to /run/systemd/private...
[ 5028.462029] TEST-80-NOTIFYACCESS.sh[172]: Bus n/a: changing state OPENING → AUTHENTICATING
[ 5028.462029] TEST-80-NOTIFYACCESS.sh[172]: Showing one /org/freedesktop/systemd1/unit/reload_2dtimeout_2eservice
[ 5028.463759] TEST-80-NOTIFYACCESS.sh[172]: Bus n/a: changing state AUTHENTICATING → RUNNING
[ 5028.470322] TEST-80-NOTIFYACCESS.sh[172]: Bus n/a: changing state RUNNING → CLOSED
[ 5028.472991] TEST-80-NOTIFYACCESS.sh[99]: + sync_in hup1
[ 5028.472991] TEST-80-NOTIFYACCESS.sh[99]: + read -r x
[ 5028.473839] reload-timeout.sh[165]: + wait 169
[ 5028.473996] TEST-80-NOTIFYACCESS.sh[99]: + test hup1 = hup1
[ 5028.473996] TEST-80-NOTIFYACCESS.sh[99]: + timeout 10 bash -c 'until [[ $(systemctl show reload-timeout.service -P SubState) == "reload-notify" ]]; do sleep .5; done'
[ 5038.477383] systemd[1]: TEST-80-NOTIFYACCESS.service: Failed with result 'exit-code'.

(note how the 'wait' is long after SIGHUP has been processed already)

Fixes https://github.com/systemd/systemd/issues/39581

Follow-up for ca8658120e1c9993bc05aa08dac2c74e618c2118