]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
2 weeks agoimportd: downgrade log message about bound capability set dropping + netns 39322/head
Lennart Poettering [Mon, 18 Aug 2025 21:18:34 +0000 (23:18 +0200)] 
importd: downgrade log message about bound capability set dropping + netns

An unprivileged process cannot reduce its own capability bounding set,
hence, while it is nice to reduce the set, let's not log about it
loudly, in case we are invoked unpriv (which we explicity support these
days after all).

An unpriv process also cannot detach from its netns, hence also
downgrade the warning to a debug message.

2 weeks agoimportd: support unpacking tarballs to foreign UID range
Lennart Poettering [Mon, 18 Aug 2025 21:18:18 +0000 (23:18 +0200)] 
importd: support unpacking tarballs to foreign UID range

When invoked unprivileged, let's use a transiently allocated userns, so
that we can properly untar UIDs/GIDs so that the trees appear owned by
the foreign UID/GID range.

2 weeks agoimportd: clean up how we determine image root in importd backends
Lennart Poettering [Mon, 18 Aug 2025 14:45:16 +0000 (16:45 +0200)] 
importd: clean up how we determine image root in importd backends

Let's introduce a single helper that determines where to download images
to, taking all three primary parameters into account: the image class,
the runtime scope and whether to do runtime or persistency.

Then port everything over to this.

This not only cleans things up, but makes sure the importd backends
actually properly can deal with per-user downloads, as before we never
took the runtime scope into account for determining download location.

2 weeks agoimportctl: add --user/--system switches
Lennart Poettering [Fri, 25 Jul 2025 06:29:32 +0000 (08:29 +0200)] 
importctl: add --user/--system switches

2 weeks agoimportd: properly support operation in per-user mode
Lennart Poettering [Fri, 25 Jul 2025 06:25:29 +0000 (08:25 +0200)] 
importd: properly support operation in per-user mode

2 weeks agoimportd: teach all backends --system/--user mode
Lennart Poettering [Mon, 18 Aug 2025 07:12:27 +0000 (09:12 +0200)] 
importd: teach all backends --system/--user mode

The runtime scope logic is internally already in place, let's expose
this via getopt() command line too. This way importd later can propagate
the invocation scope down to the backends.

2 weeks agoinstall-file: add flags to handle RO and syncing failures graceful
Lennart Poettering [Tue, 19 Aug 2025 19:07:08 +0000 (21:07 +0200)] 
install-file: add flags to handle RO and syncing failures graceful

When operating in unprivileged mode we might not be able to execute the
necessary operations to make a disk image read-only (because
FS_IMMUTABEL_FL needs privs for example), and syncing (because for that
we might need to open the root inode, but that might not be possible
from the outside).

Let's deal with that by making these operation optional: if they work
great, if not they don't.

2 weeks agocopy: make copy_tree_at_full()'s 'to' parameter optional
Lennart Poettering [Tue, 19 Aug 2025 19:14:19 +0000 (21:14 +0200)] 
copy: make copy_tree_at_full()'s 'to' parameter optional

Sometimes it's quite useful to pin a source dir via an fd, as well as a
target dir the same way, and then ask copy_tree_at_full() to copy the
contents from one to the other. Make this possible, by allowing 'to' be
NULL. (Previously, it had to be non-NULL, i.e. the function would always
create a new dir, no matter what.)

Note that we only support that for dir inodes.

2 weeks agocopy: optionally apply source inode's stat() when doing a merge copy
Lennart Poettering [Tue, 19 Aug 2025 19:17:32 +0000 (21:17 +0200)] 
copy: optionally apply source inode's stat() when doing a merge copy

2 weeks agonsresource: add constants for the only supported UID range size allocations
Lennart Poettering [Tue, 21 Oct 2025 21:00:46 +0000 (23:00 +0200)] 
nsresource: add constants for the only supported UID range size allocations

As requested: https://github.com/systemd/systemd/pull/39322#discussion_r2447366728

2 weeks agodissect-image: explain one more error
Lennart Poettering [Tue, 21 Oct 2025 11:32:39 +0000 (13:32 +0200)] 
dissect-image: explain one more error

2 weeks agoci/oss-fuzz: switch to Ubuntu 24.04
Yu Watanabe [Sun, 19 Oct 2025 04:16:19 +0000 (13:16 +0900)] 
ci/oss-fuzz: switch to Ubuntu 24.04

With
https://github.com/google/oss-fuzz/pull/14112 and
https://github.com/google/oss-fuzz/pull/14128,
we can now use Ubuntu 24.04. Let's bump the image version.

Note, the i386 build failure mentioned in the removed comment is related to
https://bugs.launchpad.net/ubuntu/+source/linux-signed-azure/+bug/2071445
https://github.com/actions/runner-images/issues/9977
and has been already fixed.

2 weeks agoTEST-75-RESOLVED: stop socket units before stopping the main service
Yu Watanabe [Sun, 19 Oct 2025 03:38:35 +0000 (12:38 +0900)] 
TEST-75-RESOLVED: stop socket units before stopping the main service

Fixes the following warning:
TEST-75-RESOLVED.sh[2251]: ++ restart_resolved
TEST-75-RESOLVED.sh[2251]: ++ systemctl stop systemd-resolved.service
TEST-75-RESOLVED.sh[2271]: Stopping 'systemd-resolved.service', but its triggering units are still active:
TEST-75-RESOLVED.sh[2271]: systemd-resolved-monitor.socket, systemd-resolved-varlink.socket

2 weeks agohwdb: Add V64x_V65xAU to list of Clevo models where scancode f7+f8 get mapped to...
Hans de Goede [Mon, 20 Oct 2025 18:52:00 +0000 (20:52 +0200)] 
hwdb: Add V64x_V65xAU to list of Clevo models where scancode f7+f8 get mapped to touchpad-toggle

Fn + F1 which is the shortcut for toggling the touchpad on/off sends
atkbd scancodes f7 (first press) + f8 (second press) just like on various
other Clevo models. Add the V64x_V65xAU model to the list of models where
these scancodes are mapped to touchpad-toggle.

2 weeks agonetworkd: minor units to unit file Description= strings (#39386)
Lennart Poettering [Mon, 20 Oct 2025 20:14:17 +0000 (22:14 +0200)] 
networkd: minor units to unit file Description= strings (#39386)

2 weeks agounits: use Title Case for network generator description string 39386/head
Lennart Poettering [Mon, 20 Oct 2025 11:01:28 +0000 (13:01 +0200)] 
units: use Title Case for network generator description string

We use Title Case for all other units, do so here too.

2 weeks agonetworkd: call networkd a "network management" rather "network configuration" tool
Lennart Poettering [Mon, 20 Oct 2025 10:59:32 +0000 (12:59 +0200)] 
networkd: call networkd a "network management" rather "network configuration" tool

This has irked me for a while. For me network configuration is the stuff
we store on disk in configuration file. And networkd then *applies* the
configuration. But the units so far claimed that networkd was the
"configuration" itself. Which I guess might make sense to some, but to
me sounds a bit unprecise. Let's clean this up, and call what networkd
is doing "Network Management".

2 weeks agocore: adding cgroup/invocationid lookups to io.systemd.Unit.List (#38032)
Daan De Meyer [Mon, 20 Oct 2025 15:15:34 +0000 (17:15 +0200)] 
core: adding cgroup/invocationid lookups to io.systemd.Unit.List (#38032)

2 weeks agoSeveral preparations for supporting new coredump interface (#39350)
Yu Watanabe [Mon, 20 Oct 2025 11:44:22 +0000 (20:44 +0900)] 
Several preparations for supporting new coredump interface (#39350)

2 weeks agocoredumpctl: fix condition for checking coredump journal entry
Yu Watanabe [Fri, 17 Oct 2025 13:48:07 +0000 (22:48 +0900)] 
coredumpctl: fix condition for checking coredump journal entry

If one of PID, UID, GID, or SIGNAL is missing, then parse_uid() and
friends in the below will trigger assertion. This fixes that.

Also, only PID, UID, GID, SIGNAL, and COMM are mandatory fields, but
others are not, hence this drops others from the condition.

Moreover, this mekes 'coredumpctl --list' not fail even if there exists a
broken coredump entry in journal.

2 weeks agoloop-util: explain why we propagate discard_max_bytes from backing block device to...
Lennart Poettering [Mon, 20 Oct 2025 10:59:02 +0000 (12:59 +0200)] 
loop-util: explain why we propagate discard_max_bytes from backing block device to loopback block device

Follow-up for: 29ee9c6fb7c75c421f887c8579c65eb04d4f634d

2 weeks agonetwork/dhcp-server: several follow-ups for domain option (#39380)
Yu Watanabe [Mon, 20 Oct 2025 11:17:59 +0000 (20:17 +0900)] 
network/dhcp-server: several follow-ups for domain option (#39380)

Follow-ups for 3eb7b881bd7e5ebe54910fe343d0ee0963879aab (#39260).

2 weeks agocore: enable SELinux checks in io.systemd.Unit.List 38032/head
Ivan Kruglov [Wed, 16 Jul 2025 14:06:55 +0000 (07:06 -0700)] 
core: enable SELinux checks in io.systemd.Unit.List

2 weeks agotest: lookup a unit by cgroup and invocationID in TEST-74-AUX-UTILS.varlinkctl
Ivan Kruglov [Wed, 16 Jul 2025 13:03:50 +0000 (06:03 -0700)] 
test: lookup a unit by cgroup and invocationID in TEST-74-AUX-UTILS.varlinkctl

2 weeks agocore: io.systemd.Unit.List can lookup by InvocationID
Ivan Kruglov [Wed, 16 Jul 2025 14:03:49 +0000 (07:03 -0700)] 
core: io.systemd.Unit.List can lookup by InvocationID

2 weeks agocore: io.systemd.Unit.List can lookup unit by CGroup
Ivan Kruglov [Wed, 16 Jul 2025 13:56:59 +0000 (06:56 -0700)] 
core: io.systemd.Unit.List can lookup unit by CGroup

2 weeks agoloop-util: mirror discard limits from backing device
nkraetzschmar [Wed, 15 Oct 2025 22:12:50 +0000 (00:12 +0200)] 
loop-util: mirror discard limits from backing device

2 weeks agosd-dhcp-server: fix conditions for checking if static address is assigned to another...
Yu Watanabe [Sun, 19 Oct 2025 07:44:44 +0000 (16:44 +0900)] 
sd-dhcp-server: fix conditions for checking if static address is assigned to another host

Even if a static lease may be configured for a host, another address may
be previously assigned to the host. Let's not refuse to assign the
static lease to the host even in that case.

Fixes an issue reported at
https://github.com/systemd/systemd/issues/35781#issuecomment-3369545753.

2 weeks agogitignore: add aider
jouyouyun [Mon, 20 Oct 2025 08:56:02 +0000 (16:56 +0800)] 
gitignore: add aider

Aider is an open-source AI coding assistant. When used, it generates history,
cache, and other files in the project. To prevent these files from being committed, you need to add .aider* to your .gitignore file

2 weeks agoptyfwd: Always prioritize $SYSTEMD_TINT_BACKGROUND
Daan De Meyer [Mon, 20 Oct 2025 07:29:08 +0000 (09:29 +0200)] 
ptyfwd: Always prioritize $SYSTEMD_TINT_BACKGROUND

By giving priority to --background= we prevent users from opting
out of coloring if an explicit color is chosen by a tool wrapping
one of our own tools. Instead, let's give priority to the environment
variable, so that even if our tools are wrapped by another tool with
a different background, users can still opt out of coloring just by
setting the environment variable, which has a high chance of being
forwarded to the invocation of our own tools which makes it easy to
use to disable color tinting globally if requested by the user.

2 weeks agoresolved: move DNS RR/key/naswer/question/packet code to shared/ + other tweaks ...
Daan De Meyer [Mon, 20 Oct 2025 10:20:10 +0000 (12:20 +0200)] 
resolved: move DNS RR/key/naswer/question/packet code to shared/ + other tweaks (#39324)

2 weeks agocore: make name/pid lookup params use AND logic in io.systemd.Unit.List
Ivan Kruglov [Wed, 16 Jul 2025 13:47:22 +0000 (06:47 -0700)] 
core: make name/pid lookup params use AND logic in io.systemd.Unit.List

2 weeks agobasic: pidref_is_set_or_automatic()
Ivan Kruglov [Wed, 16 Jul 2025 12:57:56 +0000 (05:57 -0700)] 
basic: pidref_is_set_or_automatic()

2 weeks agodns-domain: make dns_name_change_suffix() work with an empty/null suffix 39324/head
Lennart Poettering [Mon, 13 Oct 2025 09:34:24 +0000 (11:34 +0200)] 
dns-domain: make dns_name_change_suffix() work with an empty/null suffix

2 weeks agodns-rr: when decoding an RR from json, make class optional
Lennart Poettering [Fri, 10 Oct 2025 13:34:42 +0000 (15:34 +0200)] 
dns-rr: when decoding an RR from json, make class optional

The DNS RR class is a weird thing, and IRL always set to IN (i.e. 0x1).
Let's hence make it something that can be specified optionally, and
imply IN if not specified.

This makes it a bit nicer to put together suitable json resource record
keys from the command line.

2 weeks agoresolved: move DNS RR/key/answer/question/packet tools to shared/
Lennart Poettering [Thu, 9 Oct 2025 20:59:58 +0000 (22:59 +0200)] 
resolved: move DNS RR/key/answer/question/packet tools to shared/

We want to reuse these generic DNS concepts in resolved hook
implementations, hence move them to shared code.

(This also enables us to immediately remove som SVCB record handling
duplicate definitions.)

No real code changes, just some moving around of things.

2 weeks agostub: check load options a little more carefully
Thomas Mühlbacher [Thu, 16 Oct 2025 12:56:52 +0000 (14:56 +0200)] 
stub: check load options a little more carefully

This can lead to booting with a completely garbled command line with characters
being interpreted as miscellaneous CJK or symbols.

According to the UEFI spec, the optional data of the load option is just a
binary data buffer.

2 weeks agosysext: Configure overlayfs mount options via envvar
Nick Labich [Fri, 17 Oct 2025 02:42:58 +0000 (22:42 -0400)] 
sysext: Configure overlayfs mount options via envvar

Implements #39314

2 weeks agoDon't tag i2c mice as pointing sticks (#39264)
Yu Watanabe [Mon, 20 Oct 2025 06:04:27 +0000 (15:04 +0900)] 
Don't tag i2c mice as pointing sticks (#39264)

There are no real i2c mice but there are i2c `FooBar Mouse` devices that
are an artifact of how the HID kernel drivers split up event nodes.
These nodes will be seen for some i2c keyboards and touchpads, depending
on the HID report descriptor.

Let's not tag those as pointing sticks.

Closes #36677

2 weeks agoman: fix position of </para> tag
Yu Watanabe [Mon, 20 Oct 2025 05:26:28 +0000 (14:26 +0900)] 
man: fix position of </para> tag

Follow-up for 65664bba4090816f7e1fe40ed743480c19d702ee.

2 weeks agohwdb: don't tag a named Mouse device as pointingstick 39264/head
Peter Hutterer [Thu, 9 Oct 2025 00:56:54 +0000 (10:56 +1000)] 
hwdb: don't tag a named Mouse device as pointingstick

The generic kernel hid drivers split up devices based on the application
collection, appending a suffix for each collection (e.g. Touchpad,
Mouse, ...). Many i2c touchpads get a "... Mouse" event node which is
mislabelled as pointingstick by the input_id builtin, see commit
3d7ac1c655ec40f3829543072494dcdfb92dbc6b.

Closes: https://github.com/systemd/systemd/issues/36677
2 weeks agorules: extend 60-input-id.rules to allow for bus/vid/pid/name matches
Peter Hutterer [Thu, 9 Oct 2025 00:55:16 +0000 (10:55 +1000)] 
rules: extend 60-input-id.rules to allow for bus/vid/pid/name matches

Same approach as used in 70-mouse.rules, allow for a name-based match
optionally combined with bus/vid/pid (which the existing modalias rule
would already allow us anyway). Note that ID_BUS isn't assigned until
after this rule has run so we need to use the id/bustype attribute
directly.

Related to https://github.com/systemd/systemd/issues/36677

2 weeks agonetwork/dhcp-server: several cleanups for setting domain to DHCP server 39380/head
Yu Watanabe [Mon, 20 Oct 2025 03:16:31 +0000 (12:16 +0900)] 
network/dhcp-server: several cleanups for setting domain to DHCP server

- use dns_name_parent(),
- only ignore errors when the current hostname does not have domain
  part, but make other errors like ENOMEM critical.

Follow-ups for 3eb7b881bd7e5ebe54910fe343d0ee0963879aab.

2 weeks agotest: add unit test for dns_name_parent()
Yu Watanabe [Mon, 20 Oct 2025 03:01:22 +0000 (12:01 +0900)] 
test: add unit test for dns_name_parent()

2 weeks agoman: fix typo
Yu Watanabe [Mon, 20 Oct 2025 02:25:41 +0000 (11:25 +0900)] 
man: fix typo

Follow-up for 938f7fea7c953e5f5e9e199a5fcd22ac84fd1240.

2 weeks agodocs: fix conversion / calculation errors
Marien Zwart [Sun, 19 Oct 2025 13:41:08 +0000 (00:41 +1100)] 
docs: fix conversion / calculation errors

0x1770 is 6000, not 60000. It looks like 60000 is intended (the next
range starts at 60000 in both decimal and hex), so use that.

1000 to 60000 is 59001 users, as the range is inclusive on both sides.
Similar off-by-one for one of the "unused" ranges. After these changes,
the sizes of the ranges up to and including the "-1" ID sum up to 65536,
as expected.

I'm not sure where the size of the unused range after the container UID
range came from, but it is not correct (the "Container UID" and this
reserved range combined would be larger than the "HIC SVNT LEONES" 2^31
to 2^32-2 range...). Fix it.

It is unfortunate that the first half of this table makes more sense in
decimal while the second half makes more sense in hex (which would also
make the size in 65536 chunks easy to obtain): I'm tempted to add a
"sizes in hex" column...

2 weeks agohostname-setup: introduce pidref_gethostname_full() 39350/head
Yu Watanabe [Sat, 11 Oct 2025 03:30:05 +0000 (12:30 +0900)] 
hostname-setup: introduce pidref_gethostname_full()

2 weeks agoiovec-wrapper: introduce iovw_put_string_fieldf()
Yu Watanabe [Wed, 8 Oct 2025 19:10:20 +0000 (04:10 +0900)] 
iovec-wrapper: introduce iovw_put_string_fieldf()

2 weeks agoiovec-wrapper: introduce iovw_replace_string_field()
Yu Watanabe [Wed, 15 Oct 2025 00:29:18 +0000 (09:29 +0900)] 
iovec-wrapper: introduce iovw_replace_string_field()

2 weeks agopidfd-util: expose pidfd_get_info()
Yu Watanabe [Tue, 7 Oct 2025 09:03:32 +0000 (18:03 +0900)] 
pidfd-util: expose pidfd_get_info()

2 weeks agoinclude: update struct pidfd_info and relevant constants
Yu Watanabe [Tue, 7 Oct 2025 09:02:44 +0000 (18:02 +0900)] 
include: update struct pidfd_info and relevant constants

2 weeks agoinclude: import linux/coredump.h from kernel v6.17.1
Yu Watanabe [Tue, 7 Oct 2025 09:00:31 +0000 (18:00 +0900)] 
include: import linux/coredump.h from kernel v6.17.1

2 weeks agoci: add bpftool workaround to coverity too
Luca Boccassi [Sat, 18 Oct 2025 13:23:59 +0000 (14:23 +0100)] 
ci: add bpftool workaround to coverity too

2 weeks agoci: fix workaround about bpftool for codeql
Yu Watanabe [Sat, 18 Oct 2025 01:39:13 +0000 (10:39 +0900)] 
ci: fix workaround about bpftool for codeql

Follow-up for e9fd2bbfffc5c2c7cd1ea0a288d5435fc15e387f.

2 weeks agoAssorted coverity fixes (#39355)
Luca Boccassi [Fri, 17 Oct 2025 19:30:09 +0000 (20:30 +0100)] 
Assorted coverity fixes (#39355)

2 weeks agomkosi: install new knot-keymgr in Fedora rawhide
Luca Boccassi [Fri, 17 Oct 2025 12:30:37 +0000 (13:30 +0100)] 
mkosi: install new knot-keymgr in Fedora rawhide

https://src.fedoraproject.org/rpms/knot/c/52aa1c6b27ca981abe9960c0a4161be7204be75e

TEST-75-RESOLVED.sh[116]: + keymgr . generate algorithm=ECDSAP256SHA256 ksk=yes zsk=yes
TEST-75-RESOLVED.sh[454]: /usr/lib/systemd/tests/testdata/units/TEST-75-RESOLVED.sh: line 153: keymgr: command not found

2 weeks agolog: add underflow assert guard
Luca Boccassi [Fri, 17 Oct 2025 10:27:55 +0000 (11:27 +0100)] 
log: add underflow assert guard

We often use ssize_t in log_error macros, but typically return int
which confuses coverity, as technically there is no guarantee that
int and ssize_t have the same range. Add an assert to enforce it.

2 weeks agoci: add bpftool workaround to codeql job too
Luca Boccassi [Fri, 17 Oct 2025 14:39:09 +0000 (15:39 +0100)] 
ci: add bpftool workaround to codeql job too

2 weeks agotest: avoid divide-by-zero coverity warning 39355/head
Luca Boccassi [Fri, 17 Oct 2025 10:42:20 +0000 (11:42 +0100)] 
test: avoid divide-by-zero coverity warning

CID#1587762

2 weeks agobpf: do not leak dlopen object
Luca Boccassi [Fri, 17 Oct 2025 10:13:00 +0000 (11:13 +0100)] 
bpf: do not leak dlopen object

CID#1609833

2 weeks agoefivars: fix potential memory leak
Luca Boccassi [Fri, 17 Oct 2025 09:23:28 +0000 (10:23 +0100)] 
efivars: fix potential memory leak

If 'ret' is not passed, 'x' is leaked

Follow-up for c8d60ae79d1763c6ef16fdb306b65d909a769de8

CID#1621673

2 weeks agoblockdev-list: add overflow check assert
Luca Boccassi [Fri, 17 Oct 2025 09:19:49 +0000 (10:19 +0100)] 
blockdev-list: add overflow check assert

Fixes coverity warning

CID#1630794

2 weeks agodissect: drop leftover assert
Luca Boccassi [Fri, 17 Oct 2025 09:15:24 +0000 (10:15 +0100)] 
dissect: drop leftover assert

This was refactored, and the assert is now wrongly placed. Drop
it to fix coverity warning.

Follow-up for dfdeb0b1cbb05a213f0965eedfe0e7ef06cd39d3

CID#1639975

2 weeks agoci: re-enable bpf-framework option for build and unit test jobs
Luca Boccassi [Fri, 17 Oct 2025 13:00:23 +0000 (14:00 +0100)] 
ci: re-enable bpf-framework option for build and unit test jobs

Use the same trickery we do in the package build and search for
the actual bpftool binary. For the CI job any one we find is
good enough.
When we switch all jobs to 26.04 we can drop all of this.

This reverts commit cc814110af7a453db898ea2990a0281616d5ceff.

3 weeks agotest: let kernel OOM-kill a child process instead of the main one
Frantisek Sumsal [Thu, 16 Oct 2025 11:06:51 +0000 (13:06 +0200)] 
test: let kernel OOM-kill a child process instead of the main one

This test occasionally fails due to a race where systemd processes
kernel's SIGKILL before the OOM notification, so the test service dies
with Result=signal instead of the expected Result=oom-kill:

[   51.008765] TEST-55-OOMD.sh[906]: + systemd-run --wait --unit oom-kill -p OOMPolicy=kill -p Delegate=yes -p DelegateSubgroup=init.scope /tmp/script.sh
[   51.048747] TEST-55-OOMD.sh[907]: Running as unit: oom-kill.service; invocation ID: 456645347d554ea2878463404b181bd8
[   51.066296] sysrq: Manual OOM execution
[   51.066596] kworker/1:0 invoked oom-killer: gfp_mask=0xcc0(GFP_KERNEL), order=-1, oom_score_adj=0
[   51.066915] CPU: 1 UID: 0 PID: 27 Comm: kworker/1:0 Not tainted 6.17.1-arch1-1 #1 PREEMPT(full)  d2b229857b2eb4001337041f41d3c4f131433540
[   51.066919] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS Arch Linux 1.17.0-2-2 04/01/2014
[   51.066921] Workqueue: events moom_callback
[   51.066928] Call Trace:
[   51.066931]  <TASK>
[   51.066936]  dump_stack_lvl+0x5d/0x80
[   51.066942]  dump_header+0x43/0x1aa
<...snip...>
[   51.087814] 47583 pages reserved
[   51.087969] 0 pages cma reserved
[   51.088208] 0 pages hwpoisoned
[   51.088519] Out of memory: Killed process 908 (sleep) total-vm:3264kB, anon-rss:256kB, file-rss:1916kB, shmem-rss:0kB, UID:0 pgtables:44kB oom_score_adj:1000
[   51.090263] TEST-55-OOMD.sh[907]:           Finished with result: signal
[   51.094416] TEST-55-OOMD.sh[907]: Main processes terminated with: code=killed, status=9/KILL
[   51.094898] TEST-55-OOMD.sh[907]:                Service runtime: 58ms
[   51.095436] TEST-55-OOMD.sh[907]:              CPU time consumed: 22ms
[   51.095854] TEST-55-OOMD.sh[907]:                    Memory peak: 1.6M (swap: 0B)
[   51.096722] TEST-55-OOMD.sh[912]: ++ systemctl show oom-kill -P Result
[   51.106549] TEST-55-OOMD.sh[879]: + assert_eq signal oom-kill
[   51.107394] TEST-55-OOMD.sh[913]: + set +ex
[   51.108256] TEST-55-OOMD.sh[913]: FAIL: expected: 'oom-kill' actual: 'signal'
[FAILED] Failed to start TEST-55-OOMD.service.

To mitigate this, let's spawn a child process and move it to the
subcgroup to get killed instead of the main process, so systemd has more
time to react to the OOM notification and terminate the service with the
expected oom-kill result.

3 weeks agotree-wide: Various forward header cleanups
Daan De Meyer [Fri, 17 Oct 2025 08:49:53 +0000 (10:49 +0200)] 
tree-wide: Various forward header cleanups

- Make sure forward headers have the iwyu pragma to always keep them
- Make sure we always include the daemon specific forward header
  instead of shared-forward.h
- Remove shared-forward.h include where the daemon specific forward
  header is already included

3 weeks agoci: Disable bpf-framework option for build and unit test jobs
Daan De Meyer [Fri, 17 Oct 2025 09:53:48 +0000 (11:53 +0200)] 
ci: Disable bpf-framework option for build and unit test jobs

/usr/sbin/bpftool is completely broken inside containers on
Ubuntu which makes meson blow up so disable the bpf-framework
stuff to avoid the issue.

TODO: Drop when we move off Ubuntu Noble as this will be fixed
in the next Ubuntu LTS release.

3 weeks agocore/mount: properly handle REMOUNTING_* states in mount_stop() (#39269)
Mike Yuan [Thu, 16 Oct 2025 18:50:03 +0000 (20:50 +0200)] 
core/mount: properly handle REMOUNTING_* states in mount_stop() (#39269)

3 weeks agocore: fix build error due to merge conflict in varlink-execute.h
Matteo Croce [Thu, 16 Oct 2025 18:47:40 +0000 (20:47 +0200)] 
core: fix build error due to merge conflict in varlink-execute.h

During last refactor, an include wasn't changed and led to a build
error.

Follow-up for fdb2c0dd6f02f63f6d398ab6729aa59c023e57b6

3 weeks agodissect: add support for verity-protected bare filesystems via mountfsd (#39325)
Luca Boccassi [Thu, 16 Oct 2025 18:43:45 +0000 (19:43 +0100)] 
dissect: add support for verity-protected bare filesystems via mountfsd (#39325)

Needed to implement support for RootHashSignature=/RootVerity=/RootHash=
and friends when going through mountfsd, for example with user units,
so that system and user units provide the same features at the same
level

3 weeks agotest/parse_hwdb: wrap Or inside an And in a Group
Zbigniew Jędrzejewski-Szmek [Thu, 16 Oct 2025 12:45:20 +0000 (14:45 +0200)] 
test/parse_hwdb: wrap Or inside an And in a Group

I now get a warning like this with python3-pyparsing-3.1.2-8.fc42:

hwdb.d/parse_hwdb.py:208: UserWarning: warn_multiple_tokens_in_named_alternation:
  setting results name 'VALUE' on Or expression will return a list of all parsed
  tokens in an And alternative, in prior versions only the first token was returned;
  enclose contained argument in Group
('!' ^ (Optional('!') - Word(alphanums + '_')))('VALUE')

3 weeks agoimplement ExecContext for io.systemd.Unit.List (#38212)
Daan De Meyer [Thu, 16 Oct 2025 17:06:46 +0000 (19:06 +0200)] 
implement ExecContext for io.systemd.Unit.List (#38212)

3 weeks agotwo small varlink additions (#39323)
Lennart Poettering [Thu, 16 Oct 2025 15:42:57 +0000 (17:42 +0200)] 
two small varlink additions (#39323)

Split out of #39293, but make a ton of sense on their own.

3 weeks agokmod-setup: don't load unix.ko as a module anymore
Lennart Poettering [Thu, 16 Oct 2025 14:07:36 +0000 (16:07 +0200)] 
kmod-setup: don't load unix.ko as a module anymore

Building unix.ko as a module always has been a really bad idea, from day
1. Debian used to do this, but has long been fixed. Kernel developers
saw the light too, and removed support for it in 6.5
(97154bcf4d1b7cabefec8a72cff5fbb91d5afb7b). Let's hence drop support for
this here too, and delete some old cruft. AF_UNIX is simply our most
basic IPC system and supporting systems without it being around is just
not realistic.

3 weeks agotest: add coverage for image policy and bare filesystems with verity 39325/head
Luca Boccassi [Thu, 16 Oct 2025 14:07:54 +0000 (15:07 +0100)] 
test: add coverage for image policy and bare filesystems with verity

3 weeks agodissect: add support for verity-protected bare filesystems via mountfsd
Luca Boccassi [Tue, 14 Oct 2025 22:32:54 +0000 (23:32 +0100)] 
dissect: add support for verity-protected bare filesystems via mountfsd

Needed to implement support for RootHashSignature=/RootVerity=/RootHash=
and friends when going through mountfsd, for example with user units,
so that system and user units provide the same features at the same
level

3 weeks agomountfsd: add support for verity-protected bare filesystems
Luca Boccassi [Tue, 14 Oct 2025 22:30:51 +0000 (23:30 +0100)] 
mountfsd: add support for verity-protected bare filesystems

Add optional varlink parameters to pass in verity data/roothash/sig

3 weeks agojson: add json_dispatch_unhex_iovec helper
Luca Boccassi [Thu, 16 Oct 2025 15:21:57 +0000 (16:21 +0100)] 
json: add json_dispatch_unhex_iovec helper

3 weeks agovarlink: omit empty parameters field in JSON messages (#38922)
Govind Venugopal [Thu, 16 Oct 2025 15:06:17 +0000 (08:06 -0700)] 
varlink: omit empty parameters field in JSON messages (#38922)

When varlink parameters are empty, omit the "parameters" field entirely
rather than sending "parameters":{}. This reduces message size and
follows varlink specification which allows parameters to be omitted.

The implementation supports three equivalent representations for empty
parameters: field omission, JSON null, and empty object {}. All three
are accepted on input for backward compatibility.

Fixes: #38474
3 weeks agotree-wide: Introduce sd-forward.h and shared-forward.h headers
Daan De Meyer [Thu, 16 Oct 2025 13:20:36 +0000 (15:20 +0200)] 
tree-wide: Introduce sd-forward.h and shared-forward.h headers

Let's not leak details from src/shared and src/libsystemd into
src/basic, even though you can't actually do anything useful with
just forward declarations from src/shared.

The sd-forward.h header is put in src/libsystemd/sd-common as we
don't have a directory for shared internal headers for libsystemd
yet.

Let's also rename forward.h to basic-forward.h to keep things
self-explanatory.

3 weeks agodissect: fix image policy check for bare dm-verity filesystem
Luca Boccassi [Thu, 16 Oct 2025 13:59:50 +0000 (14:59 +0100)] 
dissect: fix image policy check for bare dm-verity filesystem

The root_hash_sig pointer might be set, but to an empty iovec. Check
that the length is > 0 instead.

Follow-up for cd22d8562dd085f5c234cf26b4dd773029418833

3 weeks agomkosi: provide detached verity signatures too for minimal images
Luca Boccassi [Thu, 16 Oct 2025 13:59:04 +0000 (14:59 +0100)] 
mkosi: provide detached verity signatures too for minimal images

Useful for manual testing in the VM

3 weeks agoSupport ExtensionImages=/MountImages= in user services via mountfsd and PrivateUsers...
Luca Boccassi [Thu, 16 Oct 2025 14:49:46 +0000 (15:49 +0100)] 
Support ExtensionImages=/MountImages= in user services via mountfsd and PrivateUsers=yes (#39341)

3 weeks agovarlink: move definition of varlink_hash_ops into common code 39323/head
Lennart Poettering [Thu, 9 Oct 2025 19:59:48 +0000 (21:59 +0200)] 
varlink: move definition of varlink_hash_ops into common code

This is truly useful whenever we have to deal with multiple varlink
connections.

3 weeks agosd-varlink: add sd_varlink_is_connected()
Lennart Poettering [Thu, 9 Oct 2025 08:57:25 +0000 (10:57 +0200)] 
sd-varlink: add sd_varlink_is_connected()

3 weeks agocore: also enable PrivateUsers= for user services when using images via mountfsd 39341/head
Luca Boccassi [Wed, 15 Oct 2025 19:05:03 +0000 (20:05 +0100)] 
core: also enable PrivateUsers= for user services when using images via mountfsd

RootDirectory= and other options already implicitly enable PrivateUsers=
since 6ef721cbc7dadee4ae878ecf0076d87e57233908 if they are set in user
units, so that they can work out of the box.
Now with mountfsd support we can do the same for the images settings,
so enable them and document them.

3 weeks agoSupport ExtensionImages=/MountImages= in user services via mountfsd
Luca Boccassi [Wed, 15 Oct 2025 17:49:16 +0000 (18:49 +0100)] 
Support ExtensionImages=/MountImages= in user services via mountfsd

Support for RootImage= was added by 046a1487db00ca1a98b8cc3f5bcecb8b1f1a214b
but it was not wired in for ExtensionImages=/MountImages=

3 weeks agotest: add coverage for RootImage= in user units
Luca Boccassi [Thu, 16 Oct 2025 11:58:06 +0000 (12:58 +0100)] 
test: add coverage for RootImage= in user units

Follow-up for 046a1487db00ca1a98b8cc3f5bcecb8b1f1a214b

3 weeks agocore: Don't use TTYPath= for PAM unless StandardInput=tty
Daan De Meyer [Thu, 16 Oct 2025 06:42:03 +0000 (08:42 +0200)] 
core: Don't use TTYPath= for PAM unless StandardInput=tty

Fixes #39334

3 weeks agocore/cgroup: two follow-ups for recent OOMKills PR (#39215)
Zbigniew Jędrzejewski-Szmek [Thu, 16 Oct 2025 11:38:01 +0000 (13:38 +0200)] 
core/cgroup: two follow-ups for recent OOMKills PR (#39215)

Follow-ups for #38906.

3 weeks agocore: add comments in varlink-io.systemd.Unit.c 38212/head
Ivan Kruglov [Mon, 14 Jul 2025 13:51:54 +0000 (06:51 -0700)] 
core: add comments in varlink-io.systemd.Unit.c

3 weeks agocore: ExecContext for io.systemd.Unit.List method
Ivan Kruglov [Thu, 3 Jul 2025 15:08:25 +0000 (08:08 -0700)] 
core: ExecContext for io.systemd.Unit.List method

3 weeks agocore: exec_log_level_max_with_exec_params()
Ivan Kruglov [Mon, 14 Jul 2025 09:46:28 +0000 (02:46 -0700)] 
core: exec_log_level_max_with_exec_params()

3 weeks agocore: move cpuset_build_json() to varlink-common
Ivan Kruglov [Mon, 7 Jul 2025 08:41:55 +0000 (01:41 -0700)] 
core: move cpuset_build_json() to varlink-common

3 weeks agotest: wait for signed.test's zone DS records to get pushed to the parent zone
Frantisek Sumsal [Wed, 15 Oct 2025 11:26:44 +0000 (13:26 +0200)] 
test: wait for signed.test's zone DS records to get pushed to the parent zone

It looks like the 4 second sleep might not be enough on some slower
machines (like the ARM GH Actions nodes) which can lead to the DS RRs
propagation to clash with the manual test zone edit, and the
signed.test zone then might end up not properly signed:

TEST-75-RESOLVED.sh[749]: + : '--- ZONE: signed.test (static DNSSEC) ---'
TEST-75-RESOLVED.sh[749]: + run_delv @ns1.unsigned.test signed.test
TEST-75-RESOLVED.sh[749]: + run delv -a /etc/bind.keys @ns1.unsigned.test signed.test
TEST-75-RESOLVED.sh[778]: + delv -a /etc/bind.keys @ns1.unsigned.test signed.test
TEST-75-RESOLVED.sh[779]: + tee /tmp/tmp.2KOIiyrgth
TEST-75-RESOLVED.sh[779]: ;; /etc/bind.keys:1: option 'managed-keys' is deprecated
TEST-75-RESOLVED.sh[779]: ;; validating signed.test/DS: no valid signature found
TEST-75-RESOLVED.sh[779]: ;; validating signed.test/A: no valid signature found
TEST-75-RESOLVED.sh[779]: ; unsigned answer
TEST-75-RESOLVED.sh[779]: signed.test. 86400 IN A 10.0.0.10
TEST-75-RESOLVED.sh[779]: signed.test. 86400 IN RRSIG A 13 2 86400 20251028114356 20251014101356 39330 signed.test. oo3ca8WPusbBPRhzsEKw3bsBBqFtI8i4bckoMVNzt7lY+udGW6PlaSYj OjpQGgY9oglowVM9bteNtwJKHUbvtw==
TEST-75-RESOLVED.sh[749]: + grep -qF '; fully validated' /tmp/tmp.2KOIiyrgth
[FAILED] Failed to start TEST-75-RESOLVED.service - TEST-75-RESOLVED.

Let's explicitly wait for the DS records propagation to finish before we
start editing the test zone to avoid this.

I'm still not completely sure if this is the root cause, but it's the
best shot I currently have, so I'll let the CIs decide.

3 weeks agomeson: fix HAVE_LIBARCHIVE_* conditions
Antonio Alvarez Feijoo [Thu, 16 Oct 2025 09:10:04 +0000 (11:10 +0200)] 
meson: fix HAVE_LIBARCHIVE_* conditions

Follow-up for a7c8f92d1f937113a279adbe62399f6f0773473f

3 weeks agobasic: secure_bits_to_strv()
Ivan Kruglov [Thu, 9 Oct 2025 13:42:35 +0000 (06:42 -0700)] 
basic: secure_bits_to_strv()

3 weeks agonsflags: namespace_flags_to_strv()
Ivan Kruglov [Mon, 7 Jul 2025 15:06:58 +0000 (08:06 -0700)] 
nsflags: namespace_flags_to_strv()

3 weeks agotest: minor fixlets for TEST-50-DISSECT (#39328)
Zbigniew Jędrzejewski-Szmek [Thu, 16 Oct 2025 10:25:41 +0000 (12:25 +0200)] 
test: minor fixlets for TEST-50-DISSECT (#39328)

3 weeks agocore: Make sure we don't clobber return argument on failure
Daan De Meyer [Thu, 16 Oct 2025 07:32:44 +0000 (09:32 +0200)] 
core: Make sure we don't clobber return argument on failure

As documented in the coding style, let's make sure we follow it.