Commit Graph
91861 Commits
Author SHA1 Message Date
Lennart Poettering b17f8cd9cc man: explicitly say the NSS is not OK in generators
Inspired by: #44112

(cherry picked from commit 54b24a3855de37e5e19235c44acd113eb6ce6830)
2026-10-16 17:24:51 +01:00
Daan De Meyer d5999b66a2 sbsign: name the input file when hashing it fails
verb_sign() logs argv[0], which is the verb, as the name of the file it
could not hash. Log argv[1], the input file.

(cherry picked from commit 9030bbfc90c646b7c07bbe8d70cfe7ba40b5a25a)
2026-10-16 17:24:51 +01:00
Daan De Meyer cec20dc153 kernel-image: handle errors when reading the .osrel section
uki_read_pretty_name() only handles a missing .osrel section. Any other
error, for example an .osrel section larger than PE_SECTION_READ_MAX,
passes a NULL buffer to parse_env_data(), and "bootctl kernel-inspect"
aborts:

    Assertion 'data' failed at src/basic/env-file.c:429

Return the error instead.

(cherry picked from commit 37717744394b433eb452674f060a4288a8f469bf)
2026-10-16 17:24:51 +01:00
Daan De Meyer 762840e4e0 pe-binary: only read the raw data of a section
pe_read_section_data() reads VirtualSize bytes starting at
PointerToRawData. When VirtualSize is larger than SizeOfRawData, because
the section ends with zero-initialized data, it returns the start of the
next section, or fails with EBADMSG at the end of the file. Read
MIN(VirtualSize, SizeOfRawData) bytes, like systemd-stub and uki_hash()
do.

(cherry picked from commit f219e7e790ec7b1064b71173ad697f48a5d71830)
2026-10-16 17:24:51 +01:00
Daan De Meyer 6f076ff729 pe-binary: add pe_load_headers_and_sections()
Most callers load the PE headers and the section table together, and
only keep the DOS header to pass it to pe_load_sections(). Add a helper
that does both, and use it instead of the private copy in bootspec.c.

(cherry picked from commit 5902fb429f52d75e7b25e6dea4be113e769b2ff8)
2026-10-16 17:24:51 +01:00
Daan De Meyer 899a314271 meson: define EFI_MACHINE_TYPE_NAME when the bootloader is disabled
EFI_MACHINE_TYPE_NAME is empty when systemd-boot is not built. Then
get_efi_arch() returns an empty string, and "bootctl
--print-efi-architecture" prints an empty line. The architecture does not
depend on whether systemd-boot is built, so always set the macro from
efi_arch.

(cherry picked from commit 7d3ca0a8c530ebb71a40298df6c5d4f88b37d7e9)
2026-10-16 17:24:51 +01:00
venkatchalla06 a77d9ebc58 firstboot: fix use-after-free/double-free of the Varlink reply in process_hostname()
ret_parameters (and ret_error_id) returned by sd_varlink_call()/
sd_varlink_callbo() are borrowed from the connection, as documented in
sd-varlink.h, and must not be unreffed by the caller. process_hostname()
declared its reply as _cleanup_(sd_json_variant_unrefp), freeing memory
owned by the Varlink connection and leading to a use-after-free/
double-free (the same bug class and ownership mistake just fixed for
pcrextend_pcr_now()/pcrextend_nvpcr_now() in 76a6dc6d).

(cherry picked from commit c556722826c4892939d2a6239ab00d0a343530a8)
2026-10-16 17:24:51 +01:00
abdurrafay3 088a53dea7 shutdown: copy shutdown verb so shutdown scripts receive $1
The arg_verb was copying the pointer to the shutdown verb, but that
pointer was being overwritten. When the shutdown scripts run, the forked
child calls rename_process() which overwrites argv, so the scripts got
an empty $1 instead of reboot, poweroff, etc.

Make a copy of the verb with strdup() so it is not affected.

Fixes: #44087

Follow-up for: 4927588993

(cherry picked from commit e6b62f2b3a564fcfb282dc4729eb9a5565e87ba9)
2026-10-16 17:24:51 +01:00
Lennart Poettering aaf399e797 sysinstall: fix typo in varlink iface
This is strictly speaking an API break, but given this is output only
and the component so new, I think we should just fix this anyway.

Fix: #44088
(cherry picked from commit fd309374687070ea1ef957d35dffe1e43b4a9c73)
2026-10-16 17:24:51 +01:00
Yu Watanabe 22880ff01c sd-event: coding style fix
(cherry picked from commit c33c5f91dba9bc59c40a227c2a0c728f96a17089)
2026-10-16 17:24:50 +01:00
Yu Watanabe 257d11c731 test: add test case for sd_event_add_inotify() with floating event source
(cherry picked from commit e1514ac3b9a249e08260b895fb64fd919dcc40b0)
2026-10-16 17:24:50 +01:00
Yu Watanabe a32b34813e sd-event: make inotify event source floating if ret is NULL
Otherwise, if sd_event_add_inotify() is called with NULL for ret,
the event source is disabled and never triggered.

Fixes a bug introduced by e67d738a87.

(cherry picked from commit 0582f7cba907eba6d55b686028d145061c38d0b7)
2026-10-16 17:24:50 +01:00
Lennart Poettering 275bae99e3 pretty-print: some more gcc appeasement
(cherry picked from commit b8ac543706cdf3c1c0872889098d171a5774775a)
2026-10-16 17:24:50 +01:00
Egor Ignatov 7476fff8f2 resolve: get the current DNS server before passing the server lists
manager_get_dns_server() may re-read /etc/resolv.conf and replace
m->dns_servers and m->search_domains, but it was passed as an argument
to dns_configuration_json_append() together with those lists, and the
order of evaluation of the arguments is unspecified. gcc with LTO reads
the list heads first, so after a foreign /etc/resolv.conf has changed
the freed lists are walked. Typically the serialization then fails with
EUCLEAN, which makes the SubscribeDNSConfiguration method of
io.systemd.Resolve.Monitor and in turn systemd-networkd-wait-online
--dns fail.

Call manager_get_dns_server() first and store the result in a local
variable.

(cherry picked from commit 04567a3b5e2e29a2252e89be8a3c625c692103d3)
2026-10-16 17:24:50 +01:00
Lennart Poettering c3e01464e7 test-parse-helpers: use ASSERT_STREQ()/ASSERT_EQ() in test_path_simplify_and_warn_one()
Tests exist to test stuff, hence we should not use plain assert(), but
the ASSERT_XYZ() macros, which are never compiled out and print useful
information on failure.

(cherry picked from commit 13bf80491bcf8ffee2b43cf86b16e3d1394300ef)
2026-10-16 17:24:50 +01:00
Lennart Poettering afb572f06e bus-message-util: initialize variables to make gcc happy
gcc 13 on armhf complains with -Wmaybe-uninitialized about family, port
and server_name in bus_message_read_dns_array(), even though they are
always set when bus_message_read_dns_one() returns > 0.

(cherry picked from commit da4052d0037c6bb4981387bb375355f595ab4b1c)
2026-10-16 17:24:50 +01:00
Lennart Poettering 8334118621 test-resolved-packet: use assert_se() for the string comparison
With assert() the comparison is compiled out in NDEBUG builds, leaving
twilio_reply_string unused, which breaks the build with -Werror.

(cherry picked from commit e1577aaed620793fdec39ded861b873e17627f46)
2026-10-16 17:24:50 +01:00
Lennart Poettering 7a45af6e89 test: silence SC2329 for trap-invoked cleanup() in TEST-17-UDEV.sanity-check
cleanup() is only called via 'trap cleanup EXIT', which newer shellcheck
versions report as SC2329 rather than SC2317. Disable both, like the other
test scripts do.

(cherry picked from commit e42ad4c3b60b9bedf59f03901c88062b67a8829d)
2026-10-16 17:24:50 +01:00
Lennart Poettering 686bf67609 test-sd-device: tolerate devices disappearing during enumeration test
On CI (Azure runners) the accelerated networking PCI VF behind the
Hyper-V vmbus PCI bridge may be hot-unplugged while the test runs,
causing sd_device_new_from_syspath() to fail with ENODEV for a device we
just enumerated:

  test_sd_device_one(/sys/devices/LNXSYSTM:00/.../pci7870:00/7870:00:00.0)
  Assertion failed: Expected "sd_device_new_from_syspath(&dev, syspath)"
  to succeed, but got error: -19/ENODEV

Skip devices whose syspath vanished since enumeration rather than
failing.

(cherry picked from commit b43136ffcdbd62b5d11c226df9dd33372cff7823)
2026-10-16 17:24:50 +01:00
Lennart Poettering 9b899b7938 metrics: lift restrictions on fields types
These checks stem from a rework from strv to a proper varlink object,
but the whole rework's point was to allow more expressive field types,
hence drop the unnecessary verification of the string type.

(cherry picked from commit fc38a61894bcc772b2bc8d56be9700335cdba181)
2026-10-16 17:24:50 +01:00
Yu Watanabe c20ee1bfc2 udev: raise priority of post event source above device monitor
The commit bca7d4ab23e90ec8859fbaeadaa5e0ae9e51b398 kept the priority of
the post event source at the default (NORMAL), which is lower than the
device monitor (EVENT_PRIORITY_DEVICE_MONITOR, NORMAL-1). Since a pending
device monitor is always dispatched first, on_post() only runs when the
monitor is not pending, hence the sd_event_source_get_pending() check
added in the previous commit could never be true. Moreover, during a
uevent flood on_post() is starved, and as it is the only caller of
event_queue_start(), idle workers no longer get events assigned.

Let's give the post event source a priority above the device monitor, but
below the worker event sources so that worker completions are observed
before the queue is started.

Also, similar to checking whether the device monitor event source is pending,
when synthesizing change uevents, new uevents may come soon. Do not remove
the queue file and do not kill idle workers in that case.

Follow-up for bca7d4ab23e90ec8859fbaeadaa5e0ae9e51b398.
Fixes #43865.

(cherry picked from commit a0d25767050d76cfbc1f32dcdde3a0c3da5a7423)
2026-10-16 17:24:50 +01:00
Jonghyun An 6eb23d3526 systemctl: quote command arguments in status output
The Process lines in systemctl status join argv with spaces, making
multi-word arguments ambiguous and empty arguments invisible.

Use quote_command_line() with SHELL_ESCAPE_EMPTY to retain argument
boundaries. Leave the formatted string NULL for an empty argv vector so
that strna() prints n/a. Cover whitespace, empty arguments and literal
dollar signs in TEST-26-SYSTEMCTL.

Fixes #43938.

(cherry picked from commit a83a0d2fc461091b16a699aeba07a82d71545c71)
2026-10-16 17:24:50 +01:00
Bertrand Jacquin 17f3e1fb3b dns-packet: only set mDNS cache-flush bit on mDNS packets
Since 748a548e1b ("resolved: set cache-flush bit on mDNS responses"),
every RR of an mDNS zone, except DNS-SD service enumeration PTRs,
carries DNS_ANSWER_CACHE_FLUSH, and dns_packet_append_key() turns it
into the cache-flush bit regardless of the protocol of the packet.

When a lookup via the DNS stub is answered from our own mDNS zone, e.g.
the reverse lookup of one of our link-local addresses, the RR is sent
with class 0x8001. In unicast DNS bit 15 is part of the class value, so
clients see CLASS32769 instead of IN:

  $ dig +nocmd +nocookie -x fe80::d1f:2970:a730:5ab8 @127.0.0.53
  ;; Warning: Message parser reports malformed message packet.
  ;; Got answer:
  ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 30061
  ;; flags: qr aa rd ra ad; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1

  ;; OPT PSEUDOSECTION:
  ; EDNS: version: 0, flags:; udp: 65494
  ;; QUESTION SECTION:
  ;8.b.a.5.0.3.7.a.0.7.9.2.f.1.d.0.0.0.0.0.0.0.0.0.0.0.0.0.0.8.e.f.ip6.arpa. IN PTR

  ;; ANSWER SECTION:
  8.b.a.5.0.3.7.a.0.7.9.2.f.1.d.0.0.0.0.0.0.0.0.0.0.0.0.0.0.8.e.f.ip6.arpa. 120 CLASS32769 PTR lady-voodoo.local.

  ;; Query time: 1 msec
  ;; SERVER: 127.0.0.53#53(127.0.0.53) (UDP)
  ;; WHEN: Wed Sep 02 21:40:55 IST 2026
  ;; MSG SIZE  rcvd: 132

The cache-flush bit is defined for mDNS only, hence only set it on mDNS
packets.

See: https://github.com/systemd/systemd/pull/43627
(cherry picked from commit 21159c052bbf28983115d842dbc2597869177d42)
2026-10-16 17:24:50 +01:00
Bertrand Jacquin f2de9253da dns-packet: only set mDNS cache-flush bit in responses
dns_packet_append_key() ORs MDNS_RR_CACHE_FLUSH_OR_QU into the CLASS
field of any RR whose answer item carries DNS_ANSWER_CACHE_FLUSH,
regardless of the packet the RR is appended to.

Since 748a548e1b ("resolved: set cache-flush bit on mDNS responses"),
every RR of an mDNS zone, except DNS-SD service enumeration PTRs,
carries that flag. The Authority Section of mDNS probes (RFC 6762,
section 8.2) is filled from our mDNS zone via dns_zone_lookup(), which
applies the flag to items still in probing state too, hence probes are
sent with class 0x8001 in their Authority Section.

RFC 6762, section 10.2, scopes the cache-flush bit to announcements and
responses. Peers ignore it for probe tiebreaking, so this is not an
interoperability issue, but there is no reason to set it there.

Only set the bit when the packet is a response. mDNS responses,
announcements and goodbye packets are all built by
dns_scope_make_reply_packet(), which sets QR before appending any RR, so
they keep the bit. The Known-Answer list of queries is unaffected, as it
is appended without flags already.

See: https://github.com/systemd/systemd/pull/43627
(cherry picked from commit 1c57b40fc1451b1f518e6168dbd28bf1e5fa2b4d)
2026-10-16 17:24:50 +01:00
Jörg Behrmann 03ae6cf3ce ukify: pack FWHEADERMAGIC directly instead of using bytes.fromhex
The current implementation

    FWHEADERMAGIC = 'feeddead'
    magic = bytes.fromhex(FWHEADERMAGIC)
    struct.pack('<p', magic)

returns a single null byte b'\x00', which is not equal to 0xfeeddead in any
endianness.

(cherry picked from commit fe689d2d7946593001bb3d0e32d51d694af5d50d)
2026-10-16 17:24:50 +01:00
Chris Down 3d7fd9fc37 TEST-03-JOBS: Test cancelling a job through private bus
(cherry picked from commit 32bf5695417d0bc01a42bfab2ff22ef0ddc7d533)
2026-10-16 17:24:50 +01:00
Chris Down bcd08128e4 core: Don't abort when canceling a job through the private bus
Messages on the private bus have no sender. As it is now, when a job is
canceled through it, as "systemctl cancel" does when run as root, we
pass a NULL name to sd_bus_track_contains(), which fails an
assert_return(). In developer builds, that makes PID 1 abort. Otherwise
it's only logged at debug level, and we consult polkit, as we should.

Let's only check whether the sender owns the job for messages on the API
bus. That's the only bus bus_job_track_sender() tracks senders on, so
jobs enqueued through the private bus aren't tracked anyway.

(cherry picked from commit bfeac4c30e1a818cda14c8d1b347d500a9dfe4e3)
2026-10-16 17:24:50 +01:00
Chris Down bceb7741b5 test: Cover BPF link replacement when re-realising cgroups
(cherry picked from commit 09d08b879986e9b55a4d1ed767d1e6b40ca82e39)
2026-10-16 17:24:50 +01:00
Chris Down 8ac16654bc core: Don't leak BPF links when realizing a cgroup again
cgroup_context_apply() attaches the BPF programs again whenever the
cgroup is realised again, for example, if someone does set-property or
daemon-relaod.

As it is now, their installers overwrite the links of the previous
installation without freeing them, so the previous programs stay
attached until the cgroup is removed, and keep enforcing whatever
settings they were loaded with.

For example, a unit with SocketBindDeny=any that is allowed to bind to a
port with "systemctl set-property foo.service SocketBindAllow=tcp:1234"
still cannot do so once its cgroup is realised again, as the previous
program keeps denying it. Whoops!

To fix this let's free the previous links once the new ones are
attached.

(cherry picked from commit 2f11fb19b7292339632e9b396fcab12729cde1ff)
2026-10-16 17:24:50 +01:00
Yu Watanabe 356b2edcc1 TEST-17-UDEV: drop redundant test cases
All test cases are covered by TEST-17-UDEV.device-unit-state-transition-netif.sh
added in the previous commit.

(cherry picked from commit 1ac7d20002fe6e94d24c1e652cdffa5515e1461e)
2026-10-16 17:24:50 +01:00
Yu Watanabe 8f20400e85 test: introduce several helper functions
(cherry picked from commit 04c4fe7930d83247b68427dd1cc61b19219596c2)
2026-10-16 11:36:33 +01:00
Yu Watanabe f85b6ddaae test: show name of failed test case
(cherry picked from commit 4ef7744c2e275bf6dd4199623aa7959f9f6551c8)
2026-10-16 11:36:33 +01:00
Jonghyun An 6f2b2f4df0 ukify: accept whitespace around commas in PCR bank and phase lists
Splitting on either a comma or whitespace produces empty items when
whitespace is adjacent to a comma. This rejects valid phase lists and leaves
empty entries in PCR bank lists.

Consume whitespace around commas and accept a single trailing comma in
both lists. Reject leading commas, empty entries between commas and
repeated trailing commas. Treat an empty PCR bank list as no banks.

Update the existing configuration test to cover whitespace around commas
and a trailing comma in both settings.

(cherry picked from commit 44cf775de15c1853c28fd2610f49014855ba09ec)
2026-10-16 11:36:33 +01:00
Nick Rosbrook 7457840e90 ssh-generator: do not log unusable CID
For consistency with ssh-issue output, do not log about the CID if it is
not a usable destination.

(cherry picked from commit 0d59bcb6944d1f34e8eca9208af198f5357e8535)
2026-10-16 11:36:33 +01:00
Nick Rosbrook fd34e93645 ssh-issue: never suggest connecting with VMADDR_CID_ANY
Even if the vsock driver allows using this as a wildcard to listen over
vsock, it still cannot be used as a destination CID from the host (and
is rejected by systemd-ssh-proxy). Show a more generic message in this
case instead.

Use VSOCK_CID_IS_REGULAR() to exclude other similar cases too.

Follow-up for 85afe8e82d.

Fixes: https://github.com/systemd/systemd/issues/43364
(cherry picked from commit affcccd4d07180b82d918c0c5f0601d1dec80946)
2026-10-16 11:36:33 +01:00
Dustin Kirkland f844429534 bootctl: don't fail 'status' when the ESP has no random seed
Since f90efd2d13 the result of the
access() check for loader/random-seed is stored in 'r', which is what
verb_status() returns. A missing seed file then makes 'bootctl status'
exit with 1 without logging anything, even though it's only reported as
"Exists: no". Use 'k' for the check, like the other informational
probes in this function.

(cherry picked from commit 05808e11b9399e6c2149f1f524b3282545ba7569)
2026-10-16 11:36:33 +01:00
Rodrigo Campos d6bf5fbaf2 test: cover attaching with a profile that does not exist
Both attach and reattach must fail, and the latter must not detach the
image first.

(cherry picked from commit 430f8962cf2e454cc9b474a22b92a89a26872e9b)
2026-10-16 11:36:33 +01:00
Rodrigo Campos 0b1c0782bb portablectl: quote the profile name in the validation error
With an empty profile we get:

	$ portablectl attach -p "" foo
	Unit profile name not valid:

It's not clear what is the profile. Let's quote it so it's clear also
for empty profile names.

(cherry picked from commit 6c8b21d30db4f4d5a0cdce9f2dc6a99b9b47e7c7)
2026-10-16 11:36:33 +01:00
Rodrigo Campos 92d54a0d3d portable: fail attach/reattach if the profile does not exist
Before this commit, if you attach a portable service using a profile
that doesn't exist, it just doesn't add the profile dropin and no
warning nor anything is shown:

	$ portablectl attach -p nonexistent xxx
	  (Matching unit files with prefix 'xxx'.)
	  Created directory /etc/systemd/system.attached.
	  Created directory /etc/systemd/system.attached/xxx-capsule.service.d.
	  Written /etc/systemd/system.attached/xxx-capsule.service.d/20-portable.conf.
	  Copied /etc/systemd/system.attached/xxx-capsule.service.
	  Created symlink /etc/portables/xxx.raw → /var/lib/portables/xxx.raw.

	$ ls /etc/systemd/system.attached/xxx-capsule.service.d/
	  20-portable.conf

The 10-profile.conf is not added.

If no profile is attached, the /run bind mount is not added and then lot
of things inside fail in ways that don't make sense.

This patch just makes portable_attach() and reattach check the profile
exists. If it doesn't exist, it shows this error now:

	# portablectl -p doesntexists reattach xxx
	(Matching unit files with prefix 'xxx'.)
	ReattachImage failed: Profile 'doesntexists' does not exist, refusing. (Available profiles are: default, nonetwork, strict, trusted)

In reattach we do it early, before detach, so we don't detach and then
fail to attach it and leave the service detached.

An empty profile name is rejected too by the call to
filename_is_valid(). portablectl already rejects empty profile names.

Please note that we don't change install_profile_dropin(), as that skips
non-existing profiles because that is done at the unit type level and
it's okay if it doesn't exist for some unit types. For example,
/usr/lib/systemd/portable/profile/trusted/ ships a service.conf, but not
timer.conf, socket.conf, etc.

(cherry picked from commit 5642eb3d848300f7225dff25fdd82940e55101c9)
2026-10-16 11:36:33 +01:00
Rodrigo Campos 2832b3f2c9 portable: log the right error when the profile lookup fails
find_portable_profile() returns a negative errno and does not set errno,
so the two log messages reported a stale or unrelated errno value.

(cherry picked from commit 8da05abc9a8c21af85542b0d4d1d5f48a47f738e)
2026-10-16 11:36:33 +01:00
Jörg Behrmann 04a645cce5 ukify: check terminal colour support more thoroughly
This adds an extended version of mkosi's terminal_is_dumb that checks that both
stdout and stderr are connected to a TTY and also checks that the TERM
environment variable is not set to dumb. Additionally this adds support for the
NO_COLOR variable.

(cherry picked from commit 2c46b11b319e42acb113f659098fad8eeac51b69)
2026-10-16 11:36:33 +01:00
vidir-semaphor afb890d5fc Fix apparent copy-past error in (un)lock-secureboot-policy entry
(cherry picked from commit 8e39ca4bfa6c77c8639bbeb89ec938e6e6683cec)
2026-10-16 11:36:33 +01:00
Ilya Naidanov f5ecd46e22 binfmt: clear the ignored flush failure before the registration loop
The "flush out all rules" step writes to /proc/sys/fs/binfmt_misc/status and
explicitly ignores failure, but it assigns the result to the same r that
RET_GATHER() consumes below. RET_GATHER() keeps the first error it is given,
so a failed flush is still returned from run() and systemd-binfmt exits 1 even
when every rule in binfmt.d was registered successfully.

Reset r after the ignored flush so it cannot be gathered.

Tested on WSL2 (kernel 6.18.40.1-microsoft-standard-WSL2), systemd 261, where
/proc/sys/fs/binfmt_misc/status is a read-only tmpfs. Before this, the binary
registered /etc/binfmt.d/nixos.conf successfully and then exited 1; after, it
exits 0. /proc/sys/fs/binfmt_misc/WSLInterop stays enabled in both cases.

Fixes #44035.

(cherry picked from commit 8fc6b2141b113f63427a766aa800539437138d6c)
2026-10-16 11:36:33 +01:00
Jonghyun An 1de356e556 man: document ukify SignInitrdPCRs setting
UKI/SignInitrdPCRs was added together with --sign-initrd-pcrs, but only
that command-line option is documented. Document the configuration key
and move the entry to the [UKI] section.

Fixes #43863.

(cherry picked from commit 4f8ca5032fd0633c6b5caff4868a375ac91b5b0f)
2026-10-16 11:36:33 +01:00
Daan De Meyer 121d621934 rpm: Fix copy paste bug in lua triggers
(cherry picked from commit df4eba96b645d1423b3b5d2090e720c2dc28c58b)
2026-10-16 11:36:33 +01:00
Daan De Meyer 4acbcd3302 nsresourced: keep running if the BPF-LSM programs cannot be attached
Since 7eb016d60b ("nsresourced: restore the BPF-LSM policy from the
registry on startup"), the programs are loaded in manager_setup_bpf()
but only attached later in manager_attach_bpf(). Before that, a failed
attach made the whole setup fail, and nsresourced proceeded with the
user namespace interfaces disabled. Now the same failure is fatal, and
nsresourced exits on kernels that can load BPF-LSM programs but not
attach them, such as arm64 before 7.2.

Handle a failed attach like a failed setup again: log it, drop the BPF
state, and continue with the user namespace interfaces disabled.

When a program fails to attach, the programs attached before it stay
attached, because userns_restrict_attach() has already pinned their
links. The programs keep enforcing the policy. Without the ring buffer
reader, nsresourced never reaps dead namespaces from the maps. Remove
the pins created by the failed attach, so that dropping the BPF state
detaches the programs.

test-userns-restrict fails on the same kernels, because it asserts that
the attach succeeds. Skip it instead.

Fixes: #43964
(cherry picked from commit 4446b9bb51c9900f22d7ba50379fa96dcbfb58f2)
2026-10-16 11:36:33 +01:00
Zbigniew Jędrzejewski-Szmek 58befb6079 man/systemd-vmspawn: consistently mark as experimental
It was added as experimental in v255: "this component is experimental and
its public interface is subject to change". This status was never changed
and the meson config still disables vmspawn by default in non-developer
builds. I think this makes sense to keep things this way and remove all
experimental markings at once with an official announcement once we're
sure about the interface.

(cherry picked from commit f2323da4da8c3311b855f505cdddc66400c501ee)
2026-10-16 11:36:33 +01:00
Zbigniew Jędrzejewski-Szmek 945e223a6c man: add a shared "experimental" blurb for features
(cherry picked from commit a6eb2b4d2e7f747bbfb0f5f3ebb1421855113d36)
2026-10-16 11:36:33 +01:00
Zbigniew Jędrzejewski-Szmek bc97e77ba7 man: reword "experimental" blurbs to be more accurate
The text implied that the changes may happen randomly at any time.
Obviously, they can only happen after an update, but also we're unlikely
to do that not on a major release boundary. So town down that part of the
message. At the same time, it's important that the change might just
happen. For stable features, we also sometimes implement incompatible
changes, but this is preceded by announcements and lengthy deprecation
periods. So use the phrase "without advance notice".

OTOH, the text implicitly promised future stabilization. This might or
might not happen, so remind the users that it might not.

(cherry picked from commit 96cb6a5c74c8cd64334c48ddcca18e128e9a40ea)
2026-10-16 11:36:33 +01:00
Zbigniew Jędrzejewski-Szmek d81edcf73d man: reuse the shared "experimental" blurbs
The blurbs were added to be shared, but no sharing was actually
done.

Also, rename "singular"/"plural" to "option"/"options", so that we
can later have "component"/"components" and possibly other
variants.

The text were a bit different in various places, but I don't think
it was a useful distinction.

(cherry picked from commit 69dd30fddf2bbf358e05a632b0ef3383eb46b028)
2026-10-16 11:36:33 +01:00