Commit Graph
49437 Commits
Author SHA1 Message Date
Lennart Poettering 6f9a1adf6d vmspawn: add env var that can extend the qemu cmdline
This is a bit hackish, but really useful sometimes to play around with
some qemu switches.
2024-04-20 12:10:42 +02:00
Lennart Poettering 77290bc83f vmspawn: enable hyperv enlightenments
THese are generally recommended (and libvirt/gnome-boxes default to them
hence). They are mostly relevant for Windows, but I think it makes sense
to enable them anyway for Linux too, simply to excercise #28001, and
they shouldn't hurt.
2024-04-20 12:10:42 +02:00
Lennart Poettering cea9216a42 detect-virt: detect hyperv-enlightened qemu as qemu, not as hyperv
CPUID reporting hyperv should be taken with a grain of salt, and we
should prefer other mechanisms then.

Fixes: #28001
2024-04-20 12:10:42 +02:00
Yu Watanabe 4a7cd0caad sd-event: fix sd_event_source_get_inotify_path()
Follow-ups for 74c4231ce5.

Previously, the path is obtained from the fd, but it is closed in
sd_event_loop() to unpin the filesystem.
So, let's save the path when the event source is created, and make
sd_event_source_get_inotify_path() simply read it.
2024-04-20 11:14:32 +02:00
Yu Watanabe 201f76287f network/radv: sd-radv allows to update MAC address without stopping 2024-04-20 14:59:27 +09:00
Yu Watanabe 1fea917a1b sd-radv: use sd_radv_is_running()
This also drops several unnecessary conditions for checking sd-radv is running
or not in setting options, e.g. home agent or mac address.
2024-04-20 14:59:27 +09:00
Yu Watanabe 89d7f069d3 sd-radv: shorten enumerated type definition 2024-04-20 14:59:27 +09:00
Yu Watanabe 418f2dc755 network: introduce network- and protocol-independent default for UseDomains=
Follow-up for fb57300743.

Prompted by #32273.
2024-04-20 12:01:53 +09:00
Lennart Poettering 5c81de98fc timedate: handle gracefully if RTC lost time because of power loss
Apparently some RTC drivers return EINVAL in that case when we try to
read it. Handle that reasonably gracefully.

Fixes: #31854
2024-04-20 09:15:07 +09:00
Mike Yuan b6d31deca4 shared/vpick: check deterministic suffix earlier
Follow-up for 421a4ba7e4
2024-04-20 07:17:04 +08:00
Mike Yuan fde8fb7466 shared/vpick: flatten errno check 2024-04-20 07:16:24 +08:00
Mike Yuan 164f3d8f3d shared/vpick: use strdup_to where appropriate 2024-04-20 07:16:00 +08:00
Lennart Poettering bf49f3bb44 Merge pull request #31872 from tfg13/main
stub+ukify: Add support for UKI .ucode section
2024-04-19 23:59:13 +02:00
Lennart Poettering 6e10417ff6 Merge pull request #31889 from aplanas/fix_pcrlock_stdin
pcrlock: support measurement of big files
2024-04-19 23:57:28 +02:00
Luca Boccassi 0c8780babf Merge pull request #32346 from yuwata/sd-radv-handle-header-param-gracefully
sd-radv: handle header param gracefully
2024-04-19 21:14:21 +02:00
Antonio Alvarez Feijoo cc51dbe999 cpio: fix assert 2024-04-19 20:38:44 +02:00
Antonio Alvarez Feijoo 2f49ed9a01 stub: get uname from image before loading addons
Otherwise uname is always NULL before calling `load_addons()`, so it's not being
checked if .uname matches between addons and UKI.

Fixes 68f85761e2
2024-04-19 20:37:39 +02:00
Luca Boccassi 565f6130b2 Merge pull request #32142 from bluca/portable_vpick
portable: support vpick
2024-04-19 20:34:16 +02:00
Alberto Planas bb6fe2afbc pcrlock: add make_pcrlock_record_from_stream
To hash long files (like initrd) add the funcion
make_pcrlock_record_from_stream, that will read a long file (or stdin)
to generate the digests of multiple hashes, redading block by block.

Use this new function in verb_lock_raw and verb_lock_kernel_initrd.

Signed-off-by: Alberto Planas <aplanas@suse.com>
2024-04-19 16:43:00 +02:00
Daan De Meyer f5fefec786 vmspawn: Fix shared memory check
We need the shared memory added if we're doing runtime mounts as well.
2024-04-19 16:22:07 +02:00
Tobias Fleig d380337dc5 ukify: Add support for .ucode UKI section
This commit teaches ukify how to build a .ucode section into UKIs. This
section is functionally an initrd, intended for microcode updates.
2024-04-19 06:28:47 -07:00
Tobias Fleig 590ac4bd27 measure: Add .ucode UKI section support
This commit adds support for the new ".ucode" UKI section to
systemd-measure. It is functionally an initrd and is treated as such by
measure.
2024-04-19 05:58:56 -07:00
Tobias Fleig aea81bc0ff stub: Add support for .ucode UKI section
This commit adds support for loading, measuring and handling a ".ucode"
UKI section. This section is functionally an initrd, intended for
microcode updates. As such it will always be passed to the kernel first.
2024-04-19 05:58:46 -07:00
Luca Boccassi 8257508c58 portable: support vpick
Resolve at attach/detach/inspect time, so that the image is pinned and requires
re-attaching on update, given files are extracted from it so just passing
img.v/ to RootImage= is not enough to get a portable image updated
2024-04-19 13:25:32 +01:00
Luca Boccassi 421a4ba7e4 vpick: add pick_filter_image_any filter that matches both dirs and images 2024-04-19 13:25:32 +01:00
Luca Boccassi 14f75708e2 Merge pull request #32349 from yuwata/sd-event-source-get-inotify-path
sd-event: introduce sd_event_source_get_inotify_path()
2024-04-19 12:19:06 +02:00
Luca Boccassi 87544df83c Merge pull request #32345 from yuwata/sd-radv-send
sd-radv: introduce sd_radv_send(), and reset timer on sending unsplicited RA
2024-04-19 11:59:08 +02:00
Luca Boccassi 5dcd6b1d55 Merge pull request #31978 from nolange/fix_openssl_deprecations
Fix openssl deprecations
2024-04-19 11:20:44 +02:00
Yu Watanabe d5f24a0ea9 sd-event,sd-journal: fix error handling of inotify_add_watch_fd()
Fixes a bug in 97ef539169 and
858749f731.
2024-04-19 11:10:55 +02:00
Krzesimir Nowak d3577fb7ba sysext: Determine extensions earlier
Before any directory in root filesystem is potentially made.
2024-04-19 10:01:19 +02:00
Krzesimir Nowak b2370203d9 sysext: Use EPROTO for child failure 2024-04-19 08:59:10 +02:00
Krzesimir Nowak 90ace86359 sysext: Use the new path-util helper 2024-04-19 08:33:04 +02:00
Krzesimir Nowak 581d8a1470 path-util: Add a helper for checking paths
The difference with the already existing path_equal_or_inode_same function is
that the new one does not swallow errors.
2024-04-19 08:30:40 +02:00
Yu Watanabe 74c4231ce5 sd-event: introduce sd_event_source_get_inotify_path()
This may be useful when there are multiple inotify event sources exist.
Without this, users need to manage the event sources and paths.
2024-04-19 14:23:11 +09:00
Krzesimir Nowak 55c28a88f1 sysext: Make static const a macro instead 2024-04-19 07:21:35 +02:00
Krzesimir Nowak 3e8f4d92b4 sysext: Use string table for parsing mutable mode 2024-04-19 07:21:02 +02:00
Krzesimir Nowak 080203639b sysext: Fix ephemeral-import mode for unused hierarchies 2024-04-19 07:20:49 +02:00
Krzesimir Nowak fe01b0d8c1 sysext: Code style fixes 2024-04-19 07:19:09 +02:00
Krzesimir Nowak e30623b79d sysext: Check if preexisting mutable directory has a valid mode
Preexisting mutable directory is likely set by the admin, so we expect it to be
set up properly instead of changing the mode of the directory behind admin's
back.
2024-04-19 07:18:34 +02:00
Krzesimir Nowak 3de7ce7fe7 sysext: Make sure that merged hierarchy does not change its permissions
The merged overlayfs filesystem mountpoint has a mode of its top layer. We have
been creating all the directories to be used as layers with mode 0700, so the
result was a merged hierarchy with such mode - it rendered the merged hierarchy
to be accesible only by root.

Change the mode of a directory serving as the top layer to match the hierarchy
to avoid such situations.
2024-04-19 07:15:01 +02:00
Krzesimir Nowak cb409e9074 sysext: Fix some small issues in error cases 2024-04-19 07:15:01 +02:00
Yu Watanabe c1ab4458f2 sd-event: rename argument for storing result 2024-04-19 13:59:26 +09:00
Yu Watanabe ff5b9aeeda Merge pull request #32340 from YHNdnzj/wait-for-unit-cleanup
bus-wait-for-units: some cleanup
2024-04-19 12:36:48 +09:00
Yu Watanabe 2a1e890943 sd-radv: reset timer on sending unsolicited RA
Addresses https://github.com/systemd/systemd/pull/32267#discussion_r1567078807.
2024-04-19 12:05:41 +09:00
Yu Watanabe 16e4dce6e8 sd-radv: expose sd_radv_send()
To allow library users manually send RA.
Currently, this is not used, but will be used later.
2024-04-19 12:04:58 +09:00
Yu Watanabe 8276dd9ef2 Merge pull request #32290 from yuwata/network-conf-parser-cleanups
network,nspawn: several cleanups for conf-parsers
2024-04-19 11:53:22 +09:00
Yu Watanabe ba5dc3afad sd-radv: set router preference gracefully
Rather than refusing to set non-zero preference, when lifetime is zero,
let's handle that gracefully on send.
2024-04-19 11:44:59 +09:00
Yu Watanabe 03401969d4 sd-radv: allow to modify RA header elements without stopping sd-radv
This also makes too large retransmit time handled gracefully,
as even if a too large value is specified, usec_to_be32_msec() in
radv_send_router() will handle it gracefully anyway.
Note, networkd still refuses such invalid values. Hence, this does not
change any effective behavior.
2024-04-19 11:44:59 +09:00
Mike Yuan 61cd6c4db7 bus-wait-for-units: simplify property_map_job_id 2024-04-19 10:08:37 +08:00
Mike Yuan ac21fafbea bus-wait-for-units: drop 'current' field
This is not used anywhere.
2024-04-19 10:08:37 +08:00