Commit Graph
86921 Commits
Author SHA1 Message Date
Lennart Poettering 9c8a2e53d3 test: add superficial testcase for tpm2 identification 2026-03-04 08:28:46 +01:00
Lennart Poettering a420348cc3 tpm2-util: check udev db to determine if NvPCRs are going to work
Fixes: #40485
2026-03-04 08:28:46 +01:00
Lennart Poettering 9c40895f13 tpm2-util: remove strjoina() usage on user-controlled data 2026-03-04 08:28:46 +01:00
Lennart Poettering f2eed3fa25 hwdb: introduce hwdb for tpm2 devices
This hwdb is can carry hw quirks and similar for us, in particular tell
us if nvpcrs have a chance of working.
2026-03-04 08:28:41 +01:00
Lennart Poettering dc75e54270 udev: add tpm2_id builtin
We need to be able to look up tpm2 metadata from hwdb, hence add a way
to synthesize a whdb lookup key from with udev rules.
2026-03-04 08:28:29 +01:00
Lennart Poettering bafc133178 tpm2-util,analyze: add helper for generating hwdb lookup key from TPM2 vendor data
Our goal is to find TPM2 metadata in hwdb, hence let's compile a
"modalias"-style string from the TPM2 metadata, we can use as hwdb
lookup key.
2026-03-04 08:28:29 +01:00
Lennart Poettering 205b70e328 analyze: add "identify-tpm2" command that shows TPM2 chip information 2026-03-04 08:28:29 +01:00
Lennart Poettering 98a9844f3e tpm2-util: add tpm2_get_vendor_info() helper for getting TPM2 vendor info from the device 2026-03-04 08:28:29 +01:00
Lennart Poettering 5f85409f93 tpm2-util: also load libtss2-tcti-device.so.0 in dlopen_tpm2()
This TCTI module is the one we need to actually access a Linux TPM
device, we'll hence pretty much always need it if we do TPM at all.
Given that we nowadays turn off dlopen() after fork() in the child,
let's explicitly load it as part of dlopen_tpm2() so that it is
available whenever TPM2 is used.
2026-03-04 08:28:29 +01:00
Lennart Poettering 96a8bfcd7a parse_hwdb: sort general matches 2026-03-04 08:22:20 +01:00
Lennart Poettering 4dbb0cd0bf parse_hwdb: introduce local variable for boolean syntax 2026-03-04 08:22:20 +01:00
Lennart Poettering 170a8f1d40 tpm2-util: mark two functions as static that are not used outside of tpm2-util.c 2026-03-04 08:22:20 +01:00
Lennart Poettering 59a9d1d8ca udevadm: fix --help text for udevadm test-builtin 2026-03-04 08:47:19 +09:00
Mike Yuan 36d30330f7 ansi-color: in 256 mode, always set the fallback color first
Linux console is very weird when it comes to ANSI color sequences.
Not only that it isn't aware of ':' separator (c.f.
https://github.com/systemd/systemd/pull/40878#issuecomment-3979826739),
it even skips the whole CSI-m sequence if it contains parts it cannot
parse. Hence when color mode is set to 256 (i.e. default when no
extra info is available) let's always emit two distinct CSI-m sequences,
and set the fallback 16 color first in case the terminal doesn't have
complete support for the 256 one.

Replaces #40905
2026-03-03 23:56:05 +01:00
Mike Yuan 085f92730a tree-wide: use ALPHANUMERICAL where appropriate
Prompted by 43116c5662
2026-03-04 07:36:10 +09:00
David Santamaría Rogado 3e7b9b7462 udev: rules: improve usb integration detection
usb hubs tend to expose removable attribute as unknown. This makes some
problems like a hub for external usb ports in pogo pins is unknown and
also soldered hubs in laptops for keyboard+touchpad.

Let's set internal when the device removable attribute is fixed and
external when removable, but when it's unknown lets check the parent
ports (not the host devpath!=0) attribute to decide.

This makes us to missdetect pogo ping connected external usb hubs but
let us to correctly detect laptop internal keyboards and touchpads that
are wired through hubs instead directly.

This behaviour is more desirable, as actually there are a bunch of
laptops with this setup.

Fixes: a4381cae8b.
2026-03-04 07:33:51 +09:00
Zbigniew Jędrzejewski-Szmek a8637c059b vmspawn: change order of fields in --extra-drive=
Closes #40877. As requested, --extra-drive=path[:format] is changed
to --extra-drive=[format:]path, so that the parsing is less ambiguous.
(In the original request, it was requested that the empty format can be
used also, but that was dropped in the second version of the patch.)
2026-03-04 07:05:32 +09:00
Luca Boccassi 7791edc112 Chores for RC2 (#40939) 2026-03-03 21:39:43 +00:00
Yu Watanabe 43116c5662 tree-wide: use DIGITS and friends 2026-03-03 22:18:26 +01:00
Yu Watanabe 8e82ea1468 udev/scsi: use hexchar() 2026-03-03 22:18:26 +01:00
Lennart Poettering acd23fc491 sd-messages: fix typo
(This was introduced in v260, i.e. not yet released, hence not API
break)
2026-03-03 20:15:29 +01:00
Lennart Poettering ec718b44a1 machined: add comment explaining access to machine objects a bit 2026-03-03 20:01:09 +01:00
Zbigniew Jędrzejewski-Szmek 6e0f0510d2 NEWS: move interesting items closer to top and mention PrivateTmp changes
In https://bugzilla.redhat.com/show_bug.cgi?id=2443620 it was
reported that the changes to unit ordering were surprising. Let's
add a note about the PrivateTmp= handling changes.
Follow-up for https://github.com/systemd/systemd/pull/39790.
2026-03-03 18:50:27 +01:00
Luca Boccassi 05c2147a52 NEWS: update contributors list 2026-03-03 17:44:49 +00:00
Luca Boccassi 71a230d4a6 Update hwdb
ninja -C build update-hwdb
2026-03-03 17:42:40 +00:00
Mike Yuan 38a527b0c6 systemctl-start-unit: enclose command in single quotes 2026-03-03 17:51:43 +01:00
Zbigniew Jędrzejewski-Szmek 80c78ab0e9 systemctl: rename enqueue-marked-jobs to enqueue-marked (#40930)
Closes #40883. As described in the issue, it's not "jobs" that are
marked, and also the name is unnecessarilly long.

I think we don't need any compatibility measures here. At least in the
rpm world, package upgrade scripts go through the helper which is part
of the package so the new systemctl and the new helper are upgraded
together.
2026-03-03 17:39:23 +01:00
Mikhail Novosyolov 9aad3336ff hwdb/keyboard: Map FN key on Positron Proxima 15
After kernel commit 907bc9268a ("Input: atkbd - map F23 key to support default copilot shortcut")
Fn+F5 combination (switch touchpad on/off) stopped working correctly.

Fn produces F23, it is probably a bug in BIOS, ther eis no "Copilot" key.
It was ignored before that commit, but now we have to remap it here in hwdb.

This workaround is similar to systemd commit d2502f55a2
("hwdb/keyboard: Map FN key on TUXEDO InfinityFlex 14 Gen1")

Hardware probe of this notebook: https://linux-hardware.org/?probe=7aca7ed668
See also: https://bugzilla.rosa.ru/show_bug.cgi?id=19950
2026-03-03 23:31:01 +09:00
Zbigniew Jędrzejewski-Szmek d90858544c systemctl: rename enqueue-marked-jobs to enqueue-marked
Closes #40883. As described in the issue, it's not "jobs" that are
marked, and also the name is unnecessarilly long.

I think we don't need any compatibility measures here. At least in the
rpm world, package upgrade scripts go through the helper which is part
of the package so the new systemctl and the new helper are upgraded
together.
2026-03-03 15:26:45 +01:00
Zbigniew Jędrzejewski-Szmek ec4ff79f07 NEWS: mention the sd_varlink_field_type_t breakage
Follow-up for 93d768e0f3. The commit with
the fix didn't mention this, but the reported reproducer was:
> Install openSUSE Tumbleweed with account-utils and systemd v258.
> Compile and install systemd v260. Run "varlinkctl list-methods
> /run/account/newidmapd-socket" -> the newidmap service crashes in
> varlink_idl_format_all_fields(). Recompile newidmap with systemd v260
> headers -> varlinkctl list-methods works again.

Other people might hit the same issue, so let's mention that this was
fixed.
2026-03-03 15:05:31 +01:00
Zbigniew Jędrzejewski-Szmek 72baece86a some chaseat() love (#40825) 2026-03-03 14:53:20 +01:00
Yu Watanabe 950eabc791 TODO: fix typo 2026-03-03 22:11:44 +09:00
Bouke van der Bijl 166e62215f man: fix typo in docs for notify-ready option 2026-03-03 12:36:03 +00:00
Eisuke Kawashima 4bdfcc2ee2 shell-completion: update run0 completion 2026-03-03 12:35:28 +00:00
naly zzwd 179ed677ac po: Translated using Weblate (Catalan)
Currently translated at 100.0% (266 of 266 strings)

Co-authored-by: naly zzwd <xeanhort007@gmail.com>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/ca/
Translation: systemd/main
2026-03-03 20:03:45 +09:00
Jim Spentzos fafd7cabff po: Translated using Weblate (Greek)
Currently translated at 100.0% (266 of 266 strings)

Co-authored-by: Jim Spentzos <jimspentzos2000@gmail.com>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/el/
Translation: systemd/main
2026-03-03 20:03:45 +09:00
Lennart Poettering d2b27a7a8c xstatx_full(): add flag to acquire STATX_MNT_ID_UNIQUE if we can, with fallback. 2026-03-03 08:49:23 +01:00
Lennart Poettering 2e9208199f stat-util: teach statx_mount_same() STATX_MNT_ID_UNIQUE
So far statx_mount_same() assumed STATX_MNT_ID_UNIQUE didn't exist.
However it does exist, hence do something useful if we see it set. Note
that this creates a certain ambiguity: if we compare one statx struct
with STATX_MNT_ID_UNIQUE and one without it (but with the regular mnt
id), then we cnanot really come to a clear conclusion, hence need to
introduce a third, unknown state.

Note that we don't request STATX_MNT_ID_UNIQUE yet wherever we call
statx_mount_same(). THis will be added in a later commit.
2026-03-03 08:48:01 +01:00
Lennart Poettering 6d61bb671d mountwork: use statx_mount_same() where appropriate 2026-03-03 08:48:01 +01:00
Lennart Poettering e4206858ad fd-util: minor shortcut 2026-03-03 08:48:01 +01:00
Lennart Poettering 4023840ffa fd-util: rename fds_are_same_mount() fds_inode_and_mount_same()
The old name suggested this would only check if the two inodes are on
the same mount, but it actually checks if they are the same inodes too.

Let's rename it to make this clearer, in particular as we have
both statx_inode_same() and statx_mount_same() already, and they are
even used here, and hence very confusing.

This also drops two checks from the test case, which are simply wrong.
Given they apparently weren't load bearing (since no CI tripped up),
let's just drop them.
2026-03-03 08:48:01 +01:00
Lennart Poettering 0384875582 chase: drop wrong optimization
The same optimization is already applied in the very similar
dir_fd_is_root() check a few lines up – with the exception that it
doesn't accept AT_FCWD there. And frankly turning off
CHASE_AT_RESOLVE_IN_ROOT if we operate on AT_FCWD is simply wrong. Hence
remove this code.
2026-03-03 08:48:01 +01:00
Lennart Poettering 3538b77f9d chase: tighten checks on ".." once we hit the root of an CHASE_AT_RESOLVE_IN_ROOT root tree
Let's harden things in case concurrent access is allowed to a root tree
passed via CHASE_AT_RESOLVE_IN_ROOT: let's not just validate via the
path if we hit the root of the tree, but also by comparing inodes +
mount ids.

Hardening opportunity reported by Sebastian Wick.
2026-03-03 08:48:01 +01:00
Lennart Poettering c8031ff37e chase: port to statx()
In one of the next commits we want to acquire .stx_mnt_id from statx()
for each inode we traverse (plain fstat() doesn't provide that field).
Hence let's port chase() over to statx() as preparation for that.

No change in behaviour.
2026-03-03 08:48:01 +01:00
Lennart Poettering 004e60e0fc chase: put limit on overall chase cycles
Let's add some protections in case we deal with inodes owned by an
untrusted person, with concurrent access: let's put a limit on how long
we traverse, and fail eventually so that live changes cannot send us in
circles indefinitely.

This reworks the current CHASE_MAX logic so that it not only applies to
symlinks transitions, but to any transitions.

This also bumps CHASE_MAX a bit, given that it's now bumped on every
single iteration of the loop.
2026-03-03 08:48:01 +01:00
Lennart Poettering 97fe03e12f stat-util: add statx() flavours of stat_verify_regular() + stat_verify_socket() 2026-03-03 08:48:01 +01:00
Lennart Poettering 36d7e177ad fd-util: make use of XAT_FDROOT in path_is_root_at() 2026-03-03 08:48:01 +01:00
Kai Lüke 1f0bc341c5 meson: Work around Meson install_subdir limitation
When install_subdir encounters a mkosi.tools tree with a /bin to
/usr/bin symlink it fails to copy it because it dereferences but still
treats it like a file.
Work around the Meson bug by excluding the mkosi.tools tree from
installation like mkosi.local is excluded. We anyway don't want the
tools tree end up there.
2026-03-03 16:32:14 +09:00
noxiouz fbf533859f network: fix error aggregation in wwan_check_and_set_configuration()
When removing marked routes, the condition `if (ret)` incorrectly
overwrites any previously accumulated error in `ret` with the latest
return value `r`, even if `r >= 0` (success). This means an earlier
real error can be silently cleared by a subsequent successful
route_remove() call.

The parallel address_remove() block just above uses the correct
`if (r < 0)` pattern. Apply the same fix to the route_remove() block.
2026-03-03 08:59:48 +09:00
Lennart Poettering 66a43b02e6 docs: document the "verity" NvPCR measurements
I forgot this when I posted 32f405074a,
let's add it now.
2026-03-02 23:26:21 +00:00