Zbigniew Jędrzejewski-Szmek [Thu, 25 Jan 2024 20:31:30 +0000 (21:31 +0100)]
man/networkd.conf: remove strange comment
Does anyone even read those pages‽
Zbigniew Jędrzejewski-Szmek [Thu, 25 Jan 2024 17:34:08 +0000 (18:34 +0100)]
pstore: align table
Zbigniew Jędrzejewski-Szmek [Thu, 25 Jan 2024 15:38:28 +0000 (16:38 +0100)]
journald: inline one variable declaration
Zbigniew Jędrzejewski-Szmek [Thu, 14 Dec 2023 09:58:19 +0000 (10:58 +0100)]
shared/pretty-print: inline one more variable declaration
Zbigniew Jędrzejewski-Szmek [Thu, 14 Dec 2023 09:57:05 +0000 (10:57 +0100)]
shared/pretty-print: use normal else-if cascade
This is not a hot path, but it seems silly to evalute subsequent branches,
which can never match once one has matched. Also, it makes the code harder to
read, because the reader has to first figure out that only one branch can
match.
Zbigniew Jędrzejewski-Szmek [Fri, 8 Dec 2023 08:56:43 +0000 (09:56 +0100)]
bsod: do not use STRLEN
The compiler optimizes strlen away, so we can use the simplest form that is
type safe and more natural. STRLEN is only for array initialization.
Zbigniew Jędrzejewski-Szmek [Tue, 23 Jan 2024 12:01:43 +0000 (13:01 +0100)]
basic/alloc-util: drop unnecessary parens
By definition, a parameter cannot contain a comma because commas
are used to delimit parameters. So we also don't need to use parens
when the use site is delimited by commas.
Luca Boccassi [Mon, 29 Jan 2024 19:19:17 +0000 (19:19 +0000)]
Merge pull request #31106 from poettering/bus-creds-pidref
sd-bus: port "sd_bus_creds" object to pidfds and use it everywhere
Lennart Poettering [Fri, 26 Jan 2024 17:42:33 +0000 (18:42 +0100)]
update TODO
Lennart Poettering [Fri, 26 Jan 2024 18:00:43 +0000 (19:00 +0100)]
man: document the new APIs
Lennart Poettering [Fri, 26 Jan 2024 17:41:24 +0000 (18:41 +0100)]
tree-wide: port various things over to new pidref helpers
THis not only mkaes a lot of code shorter, but also safer, as we pin the
clients via a pidfd.
Lennart Poettering [Fri, 26 Jan 2024 17:40:09 +0000 (18:40 +0100)]
bus-util: add helper for getting PidRef structs from bus
This adds two helpers: one for extracting a PidRef from an sd_bus_creds
object, and one from doing this from and sd_bus_message object.
Lennart Poettering [Fri, 26 Jan 2024 17:01:25 +0000 (18:01 +0100)]
sd-bus: tighten rules on sd_bus_query_sender_creds() a bit
Let's always derive credentials from a bus name or a conneciton fd if we
can, because they pin things.
Let's not go via PID really, because it's always racy to do so.
Note that this doesn't change much, since we wouldn't use such augmented
data for auth anyway (because it will be masked in the
sd_bus_creds.augmented mask as untrusted). But still, let's prefer
trusted data over untrusted data.
Lennart Poettering [Fri, 26 Jan 2024 16:09:02 +0000 (17:09 +0100)]
sd-bus: also read supplementary gids from bus driver
Lennart Poettering [Fri, 26 Jan 2024 15:46:09 +0000 (16:46 +0100)]
sd-bus: add pidfd to the sd_bus_creds structure
Let's continue with the pidfd'ification, and include pidfd in our
sd_bus_creds structure tha tracks a peers credentials.
Lennart Poettering [Mon, 29 Jan 2024 09:18:30 +0000 (10:18 +0100)]
socket-util: start SO_PEERGROUP loop with sysconf(_SC_NGROUPS_MAX), too
We do this for getgroups_malloc() hence we should do this here too,
after all whether we do it for a socket peer or for ourselves doesn't
make too much of a difference.
r-vdp [Mon, 29 Jan 2024 10:21:12 +0000 (11:21 +0100)]
Fix bug where systemd-tmpfiles gets stuck on fifos in tmp.
Fixes #30690.
Mike Yuan [Sat, 27 Jan 2024 18:08:54 +0000 (02:08 +0800)]
Merge pull request #31108 from yuwata/core-trivial-cleanups
core: several trivial cleanups
Yu Watanabe [Fri, 26 Jan 2024 07:11:10 +0000 (16:11 +0900)]
core/service: introduce SERVICE_STATE_WITH_{MAIN,CONTROL}_PROCESS()
Yu Watanabe [Fri, 26 Jan 2024 06:23:20 +0000 (15:23 +0900)]
core/socket: introduce SOCKET_STATE_WITH_PROCESS() helper function
Yu Watanabe [Thu, 25 Jan 2024 09:21:41 +0000 (18:21 +0900)]
core/unit: update outdated comment
Follow-up for
37eb258e91c780fd6fe5e44110abd9da71dce6de.
Daan De Meyer [Fri, 26 Jan 2024 10:29:35 +0000 (11:29 +0100)]
units: Order pcrlock services after systemd-remounts-fs.service
These write to /var and as such need to wait until after the rootfs
has been remounted read-write.
David Venhoek [Fri, 26 Jan 2024 09:40:03 +0000 (10:40 +0100)]
timesyncd: make the transmit timestamp in requests fully random
This improves security against off-path attackers, and avoids leaking
the current system time.
Frantisek Sumsal [Fri, 26 Jan 2024 13:28:20 +0000 (14:28 +0100)]
test: use lstat() instead of stat(follow_symlinks=False)
This makes the test compatible with Python 3.9, as the follow_symlinks
keyword was introduced in Python 3.10.
Luca Boccassi [Fri, 26 Jan 2024 21:13:15 +0000 (21:13 +0000)]
Merge pull request #31105 from mrc0mmand/test-nspawn
test: set -ex separately
Lennart Poettering [Fri, 26 Jan 2024 20:42:39 +0000 (21:42 +0100)]
update TODO
Frantisek Sumsal [Fri, 26 Jan 2024 17:09:09 +0000 (18:09 +0100)]
test: clean up the code a bit
Frantisek Sumsal [Fri, 26 Jan 2024 10:08:26 +0000 (11:08 +0100)]
packit: add a libarchive runtime dependency too
Addresses https://github.com/systemd/systemd/pull/31075#issuecomment-
1911117026:
[ 40.039232] testsuite-50.sh[624]: ++ systemd-dissect --make-archive /tmp/tmp.RZEq3t/minimal_0.raw
[ 40.044745] testsuite-50.sh[625]: ++ sha256sum
[ 40.066693] systemd-dissect[621]: libarchive.so.13 is not installed: libarchive.so.13: cannot open shared object file: No such file or directory
[ 40.068577] systemd-dissect[621]: Archive support not available (compiled without libarchive, or libarchive not installed?).
[ 40.092242] systemd-dissect[624]: libarchive.so.13 is not installed: libarchive.so.13: cannot open shared object file: No such file or directory
[ 40.095716] systemd-dissect[624]: Archive support not available (compiled without libarchive, or libarchive not installed?).
[ 40.100510] testsuite-50.sh[538]: + test
e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 '!=' ''
[ 40.100510] testsuite-50.sh[538]: + test
e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 =
e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
[ 40.108249] testsuite-50.sh[627]: + tar t
[ 40.113791] testsuite-50.sh[626]: + systemd-dissect --make-archive /tmp/tmp.RZEq3t/minimal_0.raw
[ 40.120300] testsuite-50.sh[628]: + grep etc/os-release
[ 40.176288] systemd-dissect[626]: libarchive.so.13 is not installed: libarchive.so.13: cannot open shared object file: No such file or directory
[ 40.180273] systemd-dissect[626]: Archive support not available (compiled without libarchive, or libarchive not installed?).
[ 40.184017] testsuite-50.sh[627]: tar: This does not look like a tar archive
[ 40.185430] testsuite-50.sh[627]: tar: Exiting with failure status due to previous errors
Follow-up for
b68f4ca.
Frantisek Sumsal [Fri, 26 Jan 2024 14:44:39 +0000 (15:44 +0100)]
test: fix the container ID check
It never worked, but the fail was masked by missing set -e, see the
previous commit.
Also, throw env into the test container and dump the environment on
container start, to make potential failures easier to debug.
Luca Boccassi [Wed, 13 Dec 2023 14:01:17 +0000 (14:01 +0000)]
man: add working example for sd_bus_set_watch_bind()
This example is able to deal with D-Bus going away and reappearing,
like on soft-reboot, so link it in both manpages.
Frantisek Sumsal [Fri, 26 Jan 2024 14:29:49 +0000 (15:29 +0100)]
test: set -ex separately
We call the entrypoint.sh script using `bash entrypoint.sh`, so -ex from
the shebang won't be used in that case. Whoopsie.
Luca Boccassi [Tue, 23 Jan 2024 16:01:31 +0000 (16:01 +0000)]
core: add SYSTEMD_VERITY_SHARING env var for local development
When running an image that cannot be mounted (e.g.: key missing intentionally
for development purposes), there's a retry loop that takes some time
and slows development down. Add an env var to disable it.
Daan De Meyer [Fri, 26 Jan 2024 08:02:34 +0000 (09:02 +0100)]
Merge pull request #31095 from bluca/test_time_tz
test: unset TZ before timezone-sensitive unit tests are run
Daan De Meyer [Fri, 26 Jan 2024 08:01:19 +0000 (09:01 +0100)]
Merge pull request #31048 from YHNdnzj/fstab-modernization
fstab-util/generator: a few cleanups/improvements
Luca Boccassi [Thu, 25 Jan 2024 20:31:39 +0000 (20:31 +0000)]
sd-bus: fix exiting event loop when sd_bus_set_exit_on_disconnect is used
If sd_bus_set_exit_on_disconnect is used and the bus is part of an event
loop, and the D-Bus connection goes away (e.g.: soft-reboot), sd-bus
will always exit() the program instead of returning from the loop, as
the reference to the event is removed before it is checked.
Daan De Meyer [Fri, 26 Jan 2024 07:59:16 +0000 (08:59 +0100)]
Merge pull request #31092 from DaanDeMeyer/auto-features
mkosi: Use --auto-features=enabled for meson
Luca Boccassi [Fri, 26 Jan 2024 00:25:04 +0000 (00:25 +0000)]
CI: set TZ= in a unit test run to ensure tests don't break
Luca Boccassi [Fri, 26 Jan 2024 00:22:38 +0000 (00:22 +0000)]
test: unset TZ before timezone-sensitive unit tests are run
Some tests have hard-coded results that need to match, and change if
the caller has a timezone set via the TZ= environment variable, as it
is the case during reproducible build tests. Unset it.
Daan De Meyer [Thu, 25 Jan 2024 14:37:51 +0000 (15:37 +0100)]
mkosi: Use --auto-features=enabled for meson
Yu Watanabe [Thu, 25 Jan 2024 20:30:01 +0000 (05:30 +0900)]
Merge pull request #31083 from yuwata/core-several-cleanups
core: several cleanups
Luca Boccassi [Thu, 25 Jan 2024 18:20:25 +0000 (18:20 +0000)]
Merge pull request #31090 from poettering/bpf-lsm-rename
rename a bunch of bpf related .c/.h files, and functions there in to make naming of systematic
Daan De Meyer [Thu, 25 Jan 2024 14:37:27 +0000 (15:37 +0100)]
mkosi: Fix formatting in build script
Lennart Poettering [Wed, 24 Jan 2024 11:28:41 +0000 (12:28 +0100)]
dissect: add --make-archive option to convert DDI to tarball
Daan De Meyer [Wed, 24 Jan 2024 11:24:11 +0000 (12:24 +0100)]
man: Document ranges for distributions config files and local config files
Let's recommend that config files and drop-ins in /usr use the range
0-49 and config files in /etc and /run use the range 50-99 so that
files in /run and /etc will generally always override files from
/usr.
Mike Yuan [Mon, 22 Jan 2024 16:00:46 +0000 (00:00 +0800)]
fstab-generator: drop unapplicable options for /usr/ too
We already drop these for /sysroot/usr/ in parse_fstab
(
1e9b2e4fdd8d04e3fbfadbc0b92dc138c819c221). Let's make
things consistent, and do the same for /usr/ too (after
switch-root).
Mike Yuan [Mon, 15 Jan 2024 17:04:44 +0000 (01:04 +0800)]
fstab-generator: modernize write_extra_dependencies
Mike Yuan [Tue, 23 Jan 2024 14:40:17 +0000 (22:40 +0800)]
fstab-generator: add missing assertions
Mike Yuan [Mon, 22 Jan 2024 16:33:51 +0000 (00:33 +0800)]
fstab-generator: drop unneeded initialization
Mike Yuan [Sat, 20 Jan 2024 14:16:52 +0000 (22:16 +0800)]
fstab-util: clean up fstab_filter_options
Let's get rid of the confusing goto so that the flow is more
straightforward. Note that the behavior is slightly changed:
previously, ret_filtered would be an empty string even if
the original opts passed in is NULL, but after this commit
it returns NULL too. But this shouldn't matter, as all our
code handles NULL opts gracefully.
Mike Yuan [Thu, 25 Jan 2024 16:47:23 +0000 (00:47 +0800)]
fstab-generator: drop assertions for mount opts
fstab_filter_options accepts NULL and (with later changes)
might even return NULL.
Mike Yuan [Mon, 22 Jan 2024 14:49:32 +0000 (22:49 +0800)]
fileio: fputs_with_space → _with_separator and modernization
Lennart Poettering [Thu, 25 Jan 2024 16:12:13 +0000 (17:12 +0100)]
Merge pull request #31089 from keszybz/drop-syscall-filtering-and-new-syscalls
Drop syscall filtering and add new syscalls
Yu Watanabe [Wed, 24 Jan 2024 07:11:28 +0000 (16:11 +0900)]
core: introduce unit_unwatch_pidref_done() helper function
No functional change, just refactoring.
Yu Watanabe [Thu, 25 Jan 2024 07:41:37 +0000 (16:41 +0900)]
core/unit: split out unit_kill_one()
This also renames 'error' -> 'ret_error'.
No functional change, just refactoring.
Yu Watanabe [Wed, 24 Jan 2024 06:27:52 +0000 (15:27 +0900)]
core/unit: split out unit_kill_context_one()
No functional change, just refactoring.
Lennart Poettering [Thu, 25 Jan 2024 15:24:19 +0000 (16:24 +0100)]
Merge pull request #31082 from yuwata/network-cleanups-for-removing-routes
network: several cleanups for removing routes
Lennart Poettering [Thu, 25 Jan 2024 13:06:37 +0000 (14:06 +0100)]
update TODO
Lennart Poettering [Thu, 25 Jan 2024 13:06:59 +0000 (14:06 +0100)]
bpf-socket-bind: rename bpf_serialize_socket_bind() → bpf_socket_bind_serialize()
This function is the only outlier, all other BPF glue functions are
called bpf_<module>_xyz(). Hence swap this over here too.
Lennart Poettering [Thu, 25 Jan 2024 13:02:24 +0000 (14:02 +0100)]
core: rename restrict-ifaces.[ch] → bpf-restrict-ifaces.[ch]
Let's also clean-up naming of the "restrict-ifaces" BPF code. Let's name
the userspace glue analogous to the actual bpf code in src/core/bpf.
Lennart Poettering [Thu, 25 Jan 2024 12:56:32 +0000 (13:56 +0100)]
bpf-restrict-fs: also rename functions to bpf_restrict_fs_xyz()
Rename the functions too, to make clear this is really just about the
restrict-fs, and not generic LSM_BPF code.
Franck Bui [Thu, 25 Jan 2024 08:53:21 +0000 (09:53 +0100)]
loop-util: drop unused .uevent_seqnum_not_before and .timestamp_not_before fields
Lennart Poettering [Thu, 25 Jan 2024 14:47:56 +0000 (15:47 +0100)]
Merge pull request #31087 from YHNdnzj/logind-cleanup
logind: several cleanups
Lennart Poettering [Thu, 25 Jan 2024 12:41:46 +0000 (13:41 +0100)]
core: rename "bpf-lsm.[ch]" → "bpf-restrict-fs.[ch]"
This file is a bit misnamed. What it actually implements is one specific
BPF LSM module, that restricts file systems. As such it really should be
named after that, and not primarily by the mechanism it uses for that.
With this our glue code is now named the same way as the actual bpf code
files in src/core/bpf/, thus things become a bit more symmetric.
This is particular relevant as we'll soon have another BPF LSM in our
tree, see #26826, and we should be able to distinguish them by name.
This commit just renames the files and does some dumb search/replace of
the string. A follow-up commit will name some functions more expressively
inside the files.
Zbigniew Jędrzejewski-Szmek [Thu, 25 Jan 2024 12:45:14 +0000 (13:45 +0100)]
Update syscalls lists
For discussion of listmount() and statmount(), see
https://lwn.net/Articles/950569/.
Zbigniew Jędrzejewski-Szmek [Thu, 25 Jan 2024 12:26:21 +0000 (13:26 +0100)]
meson: drop arch filtering in syscall list
I added the filtering in
752fedbea7c02c82287c7ff2a4139f528b3f7ba8 as a way
to reduce the number of items in the tables. I thought it's "obvious", but
it might not be so.
One immediate problem is that the filter is broken, because on arm64,
os.uname().machine returns "aarch64", so we incorrectly filter out the arm
syscalls (there is just one: arm_fadvise64_64). Of course we could fix the
filter, but I think it's better to nuke it altogether. The filter on applies to
1 arm syscall and 5 s390 syscalls, and we have 500+ other syscalls, so this
"optimization" doesn't really matter. OTOH, if we get the filter wrong,
the result is bad. And also, the existence of the filter at all creates
problems for cross-builds.
I wanted to get rid of 'generate-syscall-list.py', but we need to generate a
backslash in the output. https://github.com/mesonbuild/meson/issues/1564 makes
this very very hard, since any attempt to put a backslash an inline argument
results in the backslash being replaces by a forward slash, which doesn't quite
have the same meaning. So let's use a standalone script until
https://github.com/mesonbuild/meson/issues/1564 is resolved.
Zbigniew Jędrzejewski-Szmek [Thu, 25 Jan 2024 12:23:25 +0000 (13:23 +0100)]
meson: use a single line for one-item file lists
That file was mixing two styles, which looks ugly. Let's not make
the file unnecessarily long.
Lennart Poettering [Wed, 24 Jan 2024 21:40:04 +0000 (22:40 +0100)]
cgroup: don't enable bpf pseudo-controllers when doing a wildcard delegation
We can only delegate actual controllers, not the BPF pseudo-controllers
we defined as there's imply no concept for that. Hence, when users set
Delegate=yes to do a wildcard delegation, only delegate the regular
controllers.
This means that we won't bother with BPF stuff for such units where it's
entirelly unnecessary.
Lennart Poettering [Wed, 24 Jan 2024 21:39:33 +0000 (22:39 +0100)]
user-util: add comments explaining what the user name size limits effectively mean
Mike Yuan [Thu, 25 Jan 2024 09:29:50 +0000 (17:29 +0800)]
logind-user: don't clear individual fields if object is freed anyway
Mike Yuan [Thu, 25 Jan 2024 10:27:40 +0000 (18:27 +0800)]
logind-dbus: send session reply only for user start jobs
Mike Yuan [Thu, 18 Jan 2024 07:28:39 +0000 (15:28 +0800)]
logind-dbus: modernize method_set_user_linger
Currently, user_start() doesn't return any error,
but let's not eat up the return value.
Preparation for #30910, after which user_start()
does return error.
Mike Yuan [Wed, 24 Jan 2024 13:56:56 +0000 (21:56 +0800)]
logind-user: don't say "user X logged out" in user_finalize
"Logging out" is something done by the human user. When we stop
tracking/GC a User object, let's use a more generic phrase in case
the specific User doesn't have human users (i.e. "user" class sessions)
at all. Eventually we want something like #2900, and log this
when all user class sessions log out and we're lingering again I think.
Bernhard M. Wiedemann [Thu, 25 Jan 2024 04:48:35 +0000 (05:48 +0100)]
Sort input file list
so that /usr/lib/systemd/tests/unit-tests/test-libsystemd-sym
builds in a reproducible way
in spite of non-deterministic filesystem readdir order
See https://reproducible-builds.org/ for why this is good.
This patch was done while working on reproducible builds for openSUSE.
Yu Watanabe [Tue, 16 Jan 2024 03:47:40 +0000 (12:47 +0900)]
test-network: check if networkd forgets routes silently removed by the kernel
Yu Watanabe [Tue, 16 Jan 2024 03:01:50 +0000 (12:01 +0900)]
network/nexthop: drop dependent routes on removal
If a nexthop is removed, dependent routes are silently removed by the kernel.
Hence, networkd may be confused that routes that depends on the nexthop still
exist, and may fail to configure other routes or so.
This is the one for routes of
3cbbe8635a16f096a3b0eff993f7681401535605.
Yu Watanabe [Mon, 15 Jan 2024 04:02:16 +0000 (13:02 +0900)]
network/route: introduce reverse map for route with nexthop ID
It is not used in this commit, but will be used later.
Preparation for later commits.
This is the one for routes of
531c7246829a41dd7e51847bd4d77aa012ff478f.
Yu Watanabe [Sat, 6 Jan 2024 21:11:09 +0000 (06:11 +0900)]
network/route: also remove route on cancelling request
Otherwise, the route may arrive after we call
link_drop_foreign_address() or so on reconfiguring interface.
This is the one for routes of
4303e9806befc0c5b8067e45225e5d952f427b3a.
Yu Watanabe [Sun, 7 Jan 2024 05:41:56 +0000 (14:41 +0900)]
network/route: drop Route object even if we fail to remove the route
If we could not remove a route, then previously the corresponding
Route object was never removed, as it was freed only when we receive
remove notification from the kernel. So, we might confused that the
route still exists and being removed, and might block reconfiguring
the route.
With this change, even if we fail to remove a route, the corresponding
Route object will be freed.
This is the one for routes of
56a995fe8e50b2432ff930ed0431cc70adbe492d.
Yu Watanabe [Sun, 7 Jan 2024 06:16:03 +0000 (15:16 +0900)]
network/route: introduce ref/unref functions for Route object
Then, Route object can live if it is detached from the owner (Manager,
Network, or Wireguard object).
This is the one for routes of
ebd96906477aac2bbc6b9de0d6e9bd0f39db5581.
Yu Watanabe [Tue, 9 Jan 2024 06:49:20 +0000 (15:49 +0900)]
network/route: introduce route_remove_and_cancel()
Then, replace route_remove_and_drop() with it.
If a route is requested, and the request is already called,
we may not received its reply and notification from the kernel, and
the corresponding Route object may not be remembered. Even in such
case, we need to remove the route, otherwise the route will come
later after the function called.
This is the version for route of
f22b586a215962416bdbd692aabb89b1ac2999d0.
Mike Yuan [Thu, 25 Jan 2024 07:22:07 +0000 (15:22 +0800)]
Merge pull request #31072 from YHNdnzj/va-arg-foreach
tree-wide: replace FOREACH_POINTER with FOREACH_ARGUMENT (VA_ARGS_FOREACH)
Frantisek Sumsal [Wed, 24 Jan 2024 18:19:29 +0000 (19:19 +0100)]
test: use the default nsec3-iterations value
In Knot 3.2 the nsec3-iterations default was changed to 0 and Knot now
issues a warning if the value is > 0. Let's just use the default value,
since it's not something that's important for our tests.
Mikko Ylinen [Thu, 18 Jan 2024 11:34:09 +0000 (13:34 +0200)]
efi: Add EFI CC measurement protocol to stub
In confidential computing, a virtual firmware may support measurement and
event log based upon the hardware Trusted Execution Environment (TEE)
capability.
The UEFI specification defines an interface between the virtual guest OS
and virtual firmware as EFI_CC_MEASUREMENT_PROTOCOL. The (vendor specific)
measurements are captured in the CC eventlog that follows the TCG2 format.
OVMF virtual firmware has the EFI_CC_MEASUREMENT_PROTOCOL support for
Intel Trust Domain Extensions (TDX). Intel TDX has 4 runtime measurement
registers (RTMR) defined as:
RTMR[0] for TDVF configuration
RTMR[1] for the TD OS loader and kernel
RTMR[2] for the OS application
RTMR[3] reserved for special usage only
The RTMR to PCR mappings are defined in the UEFI Spec 2.10 Section 38.4.1
as follows:
TPM PCR Index | CC Measurement Register Index | TDX-measurement register
------------------------------------------------------------------------
0 | 0 | MRTD
1, 7 | 1 | RTMR[0]
2-6 | 2 | RTMR[1]
8-15 | 3 | RTMR[2]
The CC measurement eventlog is currently exposed as a raw CCEL ACPI table
by the guest OS and the events can be replayed to check log matches with
the RTMR values.
Add EFI CC measurement protocol to stub to get the UKI components measured
and included in the remote attestation reports when vTPMs are not available.
Luca Boccassi [Wed, 24 Jan 2024 19:36:53 +0000 (19:36 +0000)]
mkosi: install libip4tc2 in debian/ubuntu
It's now a dlopen library and it is installed at build time via
libiptc-dev, but was never added to the running image.
Follow-up for
5b5f8f8b9aef405cdc42771e7876988d5aefb51e
Andrew Sayers [Tue, 9 Jan 2024 12:41:29 +0000 (12:41 +0000)]
Make RestartPreventExitStatus= documentation resemble SuccessExitStatus=
The documentation for `RestartPreventExitStatus=` differs from that for `SuccessExitStatus=` in ways that are sometimes confusing (e.g. using `numeric exit codes` instead of `numeric termination statuses`), and other times plain incorrect (e.g. not mentioning `termination status names`, which I've just confirmed to work in systemd 255).
This patch modifies the documentation to be as similar as possible, so as to reduce the reader's cognitive load.
Daan De Meyer [Fri, 19 Jan 2024 13:21:24 +0000 (14:21 +0100)]
Remove a few references to dracut
Let's remove some explicit references to dracut as we prefer initrds
built with mkosi these days.
Mike Yuan [Wed, 24 Jan 2024 08:51:58 +0000 (16:51 +0800)]
tree-wide: replace FOREACH_POINTER with FOREACH_ARGUMENT
The latter is more generic and while being compatible with
the former.
Mike Yuan [Wed, 24 Jan 2024 13:15:53 +0000 (21:15 +0800)]
macro: rename VA_ARGS_FOREACH to FOREACH_ARGUMENT
"VA_ARGS" is kinda confusing, as the macro just iterates through
all arguments passed and has nothing to do with va_arg.
Yu Watanabe [Sun, 14 Jan 2024 05:20:03 +0000 (14:20 +0900)]
network/route: manage all routes by Manager object
Previously, a Route object is owned by a Link object corresponding to the
outgoing interface of the route, and a Route object that does not have
outgoing interface is owned by the Manager object.
However, there were several issues:
- if a route has a nexthop ID, then the corresponding nexthop may be
changed to use another interface, hence the outgoing interface of the
route may be changed.
- if a route requested with MultiPathRoute=, then the link who requests
the route is different from the outgoing interface of the configured
route. So, we need to find routes on other interfaces on reconfiguring
or so.
By this change, the limit of the number of routes per-interface is
tentatively dropped. Let's re-introduce the limit later in a nicer way.
Takashi Sakamoto [Tue, 23 Jan 2024 06:20:29 +0000 (15:20 +0900)]
hwdb: ieee1394-unit-function: adjustment of entries with device attributes available in Linux v6.8
The series of changes[1] has been merged to Linux v6.8-rc1[2], which
alters the parser of the content of configuration ROM. As a result, some
device attributes for model information in the legacy layout of
configuration ROM are finally available for node and unit devices. The
change enables to distinguish the devices by model information, and what
is required in systemd PR 30205[3]. It can improve the hwdb for IEEE 1394
functions in the point addressed at issue 25029[4].
This commit fulfills some entries for the hwdb, which corresponds to some
devices with the legacy layout of configuration ROM. They provides both
vendor and model names to udev applications.
[1] https://lore.kernel.org/lkml/
20240110111331.GA138108@workstation.local/
[2] https://lore.kernel.org/lkml/CAHk-=wiB4iHTtfZKiy5pC24uOjun4fbj4kSX0=ZnGsOXadMf6g@mail.gmail.com/
[3] https://github.com/systemd/systemd/pull/30205
[4] https://github.com/systemd/systemd/issues/25029
Mike Yuan [Wed, 24 Jan 2024 09:02:28 +0000 (17:02 +0800)]
id128-util: use FOREACH_STRING where appropriate
Lennart Poettering [Wed, 24 Jan 2024 08:58:07 +0000 (09:58 +0100)]
Merge pull request #31003 from enr0n/skip-test-when-apparmor-restricts-userns
Skip more tests when apparmor restricts unprivileged user namespaces
Lennart Poettering [Wed, 24 Jan 2024 08:35:30 +0000 (09:35 +0100)]
Merge pull request #31067 from RA-Kooi/xen-uuid
machine-id-setup: Generate stable machine IDs on Xen virtual machines.
Yu Watanabe [Wed, 24 Jan 2024 07:31:37 +0000 (16:31 +0900)]
Merge pull request #31070 from yuwata/core-cleanups
core: several trivial cleanups
Yu Watanabe [Wed, 24 Jan 2024 05:40:25 +0000 (14:40 +0900)]
core/exec-invoke: drop unused pam_pid
Yu Watanabe [Wed, 24 Jan 2024 05:39:20 +0000 (14:39 +0900)]
core/service: declare 'int r' at the beginning
Yu Watanabe [Wed, 24 Jan 2024 05:33:41 +0000 (14:33 +0900)]
unit: modernize unit_pid_set()
Yu Watanabe [Wed, 24 Jan 2024 05:02:46 +0000 (14:02 +0900)]
core: use helper functions like unit_main_pid() in unit_kill_context()
No functional changes. Just refactoring.
Yu Watanabe [Wed, 24 Jan 2024 05:08:40 +0000 (14:08 +0900)]
core: introduce unit_main_pid_full() which optionally provides if the PID is alien or not
Yu Watanabe [Wed, 24 Jan 2024 04:54:45 +0000 (13:54 +0900)]
core: constify PidRef arguments