1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2024-12-27 03:21:32 +03:00
Commit Graph

7209 Commits

Author SHA1 Message Date
Lennart Poettering
39a72c13b8
Merge pull request #25665 from poettering/dissect-memory
dissect: add a mode for operating on an in-memory copy of a DDI, inst…
2022-12-08 17:23:15 +01:00
Lennart Poettering
a579990277
Merge pull request #25180 from keszybz/ukify
ukify: add helper to create UKIs
2022-12-08 15:11:18 +01:00
Lennart Poettering
e7e2fbdd60 man: add doc for new --in-memory switch of systemd-dissect 2022-12-08 12:49:50 +01:00
Yu Watanabe
15f330cf87 man: mention that DefaultRouteOnDevice= create the IPv4 default route
And add an example setting for creating an IPv6 default route.

Closes #25440.
2022-12-08 10:26:26 +01:00
Yu Watanabe
2e83783030
Merge pull request #25672 from jelly/FirwmwareName
Extend hostnamed DMI firmware properties
2022-12-08 16:04:36 +09:00
Jelle van der Waa
ff4d26dff4 hostnamed: expose FirmwareDate dbus property
Expose /sys/class/dmi/id/bios_date as dbus property in hostnamed.
2022-12-07 20:35:56 +01:00
Jelle van der Waa
f233bbd607 hostnamed: expose FirmwareVendor as dbus property
Expose /sys/class/dmi/id/bios_vendor as dbus property in hostnamed.
2022-12-07 20:34:30 +01:00
Lennart Poettering
0305cf6e9d dissect: add simple --discover command 2022-12-07 17:57:22 +01:00
Zbigniew Jędrzejewski-Szmek
54c84c8a7a ukify: allow multiple initrds
If given, multiple initrds are concatenated into a temporary file which then
becomes the .initrd section.

It is also possible to give no initrd. After all, some machines boot without an
initrd, and it should be possible to use the stub without requiring an initrd.
(The stub might not like this, but this is something to fix there.)
2022-12-07 17:22:05 +01:00
Zbigniew Jędrzejewski-Szmek
0fdf4e1810 man: add man page for ukify 2022-12-07 15:53:47 +01:00
Luca Boccassi
3dd581f9e4
Merge pull request #25651 from keszybz/man-halt
Deemphasize 'halt' subcommand
2022-12-07 15:49:30 +01:00
Zbigniew Jędrzejewski-Szmek
269d17f955 man: deemphasize "halt"
Systemd documents "halt" as the primary shutdown mechanism, redirecting
"reboot" and "shutdown" to the halt(8), but halt is a really strange and
obsolete concept. Who would want to really keep their machine running after
shutdown? I expect that halting is almost unused. Let's at least make it less
prominent in the docs.

While at it, use "power off" for a verb and "power-off" for noun (but "poweroff"
of the actual command name).
2022-12-07 10:26:31 +01:00
Aidan Dang
b04ff66b42 Implement --luks-pbkdf-force-iterations for homed 2022-12-06 15:56:11 +01:00
Zbigniew Jędrzejewski-Szmek
9551c46a3d man: reword sentence
"Such as … suchlike" repeats too much.
2022-12-06 11:44:30 +01:00
Zbigniew Jędrzejewski-Szmek
8608fef36c
Merge pull request #25437 from YHNdnzj/systemctl-disable-warn-statically-enabled-services
systemctl: warn if trying to disable a unit with no install info
2022-12-05 10:27:24 +01:00
Mike Yuan
108d35ac7d
systemctl: allow suppress the warning of no install info using --no-warn
In cases like packaging scripts, it might be desired to use
enable/disable on units without install info. So, adding an
option '--no-warn' to suppress the warning.
2022-12-03 20:26:19 +08:00
Mike Yuan
bf1bea43f1
systemctl: warn if trying to disable a unit with no install info
Trying to disable a unit with no install info is mostly useless, so
adding a warning like we do for enable (with the new dbus method
'DisableUnitFilesWithFlagsAndInstallInfo()'). Note that it would
still find and remove symlinks to the unit in /etc, regardless of
whether it has install info or not, just like before. And if there are
actually files to remove, we suppress the warning.

Fixes #17689
2022-12-03 20:26:14 +08:00
Yu Watanabe
6c2d70ce9f tree-wide: fix typo 2022-12-02 13:27:08 +09:00
Neil Moore
d833ed781f virt: Support detection of LMHS SRE guests 2022-12-02 10:29:14 +09:00
Daan De Meyer
003cb0e046
Merge pull request #25579 from DaanDeMeyer/copy-graceful-symlinks
repart: Ignore copy failures for unsupported file types
2022-12-01 13:47:14 +01:00
Daan De Meyer
336ae0e71d repart: Ignore copy failures for unsupported file types
e.g. vfat doesn't support symlinks, sockets, fifos, etc so let's ignore
any copy failures related to unsupported file types when populating
filesystems.
2022-12-01 12:14:35 +01:00
Nick Rosbrook
3b44e33ff4 man: clarify ManagedOOMPreference documentation
Explicitly state that ManagedOOMPreference is always honored when the
unit's cgroup is owned by root.
2022-11-29 16:01:58 -05:00
Lennart Poettering
0461375326
Merge pull request #25385 from drvink/main
systemd: Support OOMPolicy in scope units
2022-11-29 14:40:18 +01:00
Joerg Behrmann
0ccfd3564b kernel-install: Add uki layout
Currently the kernel-install man page only documents the bls layout for use
with the boot loader spec type #1. 90-loaderentry.install uses this layout to
generate loader entries and copy the kernel image and initrd to $BOOT.

This commit documents a second layout "uki" and adds 90-uki-copy.install,
which copies a UKI "uki.efi" from the staging area or any file with the .efi
extension given on the command line to
$BOOT/EFI/Linux/$ENTRY_TOKEN-$KERNEl_VERSION(+$TRIES).efi

This allows for both locally generated and distro-provided UKIs to be handled
by kernel-install.
2022-11-29 11:33:27 +01:00
Yu Watanabe
f329a41be4
Merge pull request #25533 from keszybz/meson-fixups
Meson fixups
2022-11-26 11:27:34 +09:00
Zbigniew Jędrzejewski-Szmek
25d3a2816b meson: regenerate meson rules
Forgotten in 85bc6b0549.
2022-11-25 18:33:53 +01:00
Lennart Poettering
17f244e8f9 resolved: introduce the _localdnsstub and _localdnsproxy special hostnames for 127.0.0.54 + 127.0.0.53
Let's give these special IP addresses names. After all name resolution
is our job here.

Fixes: #23623
2022-11-25 17:37:30 +01:00
Daan De Meyer
7d505753f1 repart: Add --skip-partitions=
--include-partitions and --exclude-partitions now fully exclude
partitions from repart. Whenever a partition type is excluded, we
don't take any partitions of that type into account at all when
running systemd-repart.

--skip-partitions= is introduced to do what --exclude-partitions did
previously. Any skipped partitions are taken into acount when doing
size calculations, but are not yet populated.

Why do we need both concepts? Exclusion is needed so that we can
use shared repart definitions to generate bootable and non-bootable
images. When generating a non-bootable image, we use --exclude-partitions
to exclude the ESP partition. Skipping is needed so that we can
populate the root partition while skipping the ESP partition, get
the roothash of the root partition, use that to generate a UKI, and
finally populate the ESP partition with the UKI included.
2022-11-25 12:07:38 +01:00
Mark Laws
5fa098357e systemd: Support OOMPolicy in scope units
Closes #25376.
2022-11-24 19:41:28 +09:00
Zbigniew Jędrzejewski-Szmek
70b9ea26b6 man/journalctl: mention systemd-cat, make the description more direct
We said "query the journal". This is true but also very generic. Let's say
"print log entries from the journal" instead, so that users who are looking for
"logging" are more likely to figure out that the journalctl is the tool for
them.

Also, mention systemd-journal-remote.service which can write the journal too.
And give some hints how to figure out how to write *to* the journal.
2022-11-22 13:31:04 +01:00
Anita Zhang
6ee27eb3ca man: update docs for MemoryZSwapMax= 2022-11-22 11:01:50 +01:00
Jason A. Donenfeld
47b3e96647 boot: remove random-seed-mode
Now that the random seed is used on virtualized systems, there's no
point in having a random-seed-mode toggle switch. Let's just always
require it now, with the existing logic already being there to allow not
having it if EFI itself has an RNG. In other words, the logic for this
can now be automatic.
2022-11-22 01:30:03 +01:00
Luca Boccassi
a0c544ee09
Merge pull request #25379 from keszybz/update-doc-links
Update doc links
2022-11-22 01:07:13 +01:00
Zbigniew Jędrzejewski-Szmek
db81144428 tree-wide: BLS and DPS are now on uapi-group website 2022-11-21 12:26:35 +01:00
BerndAdameit
082ac7bb12 man/sd_bus_default: Refer to man-pages project (man7.org) for ssh(1) 2022-11-21 11:35:33 +01:00
Yu Watanabe
8c92063633 network: tc-cake: add support to specify ACK filter 2022-11-19 07:08:22 +09:00
Yu Watanabe
3af9cd0bf1 network: tc-cake: add support to specify RTT 2022-11-17 21:13:42 +09:00
Luca Boccassi
39a306ba34
Merge pull request #25319 from zx2c4-forks/krngseed
boot: implement kernel EFI RNG seed protocol with proper hashing
2022-11-16 15:07:54 +01:00
Gerd Hoffmann
941d418d19 systemd-boot man page: add section for virtual machines 2022-11-16 12:52:58 +01:00
angus-p
847dd8927b Update hostnamectl.xml
set-hostname is obsolete
2022-11-16 00:12:16 +01:00
Pasha Vorobyev
d7fe0a6723 MemoryZSwapMax directive to configure new memory.zswap.max cgroup file 2022-11-15 21:15:37 +01:00
Daan De Meyer
81d1098bc1 repart: Add --include/--exclude-partitions
Let's allow filtering the partitions to operate on by partition
type UUID. This is necessary when building bootable images with a
verity protected root/usr partition as we can only build the UKI
image when we have the verity roothash which means we cannot populate
the EFI partition yet when we run repart initially to determine the
verity roothash.
2022-11-15 13:45:25 +01:00
Daan De Meyer
32a3f802f6
Merge pull request #24908 from DaanDeMeyer/repart-minimize
repart: Add Minimize setting
2022-11-15 08:19:28 +01:00
Jason A. Donenfeld
0be72218f1 boot: implement kernel EFI RNG seed protocol with proper hashing
Rather than passing seeds up to userspace via EFI variables, pass seeds
directly to the kernel's EFI stub loader, via LINUX_EFI_RANDOM_SEED_TABLE_GUID.
EFI variables can potentially leak and suffer from forward secrecy
issues, and processing these with userspace means that they are
initialized much too late in boot to be useful. In contrast,
LINUX_EFI_RANDOM_SEED_TABLE_GUID uses EFI configuration tables, and so
is hidden from userspace entirely, and is parsed extremely early on by
the kernel, so that every single call to get_random_bytes() by the
kernel is seeded.

In order to do this properly, we use a bit more robust hashing scheme,
and make sure that each input is properly memzeroed out after use. The
scheme is:

    key = HASH(LABEL || sizeof(input1) || input1 || ... || sizeof(inputN) || inputN)
    new_disk_seed = HASH(key || 0)
    seed_for_linux = HASH(key || 1)

The various inputs are:
- LINUX_EFI_RANDOM_SEED_TABLE_GUID from prior bootloaders
- 256 bits of seed from EFI's RNG
- The (immutable) system token, from its EFI variable
- The prior on-disk seed
- The UEFI monotonic counter
- A timestamp

This also adjusts the secure boot semantics, so that the operation is
only aborted if it's not possible to get random bytes from EFI's RNG or
a prior boot stage. With the proper hashing scheme, this should make
boot seeds safe even on secure boot.

There is currently a bug in Linux's EFI stub in which if the EFI stub
manages to generate random bytes on its own using EFI's RNG, it will
ignore what the bootloader passes. That's annoying, but it means that
either way, via systemd-boot or via EFI stub's mechanism, the RNG *does*
get initialized in a good safe way. And this bug is now fixed in the
efi.git tree, and will hopefully be backported to older kernels.

As the kernel recommends, the resultant seeds are 256 bits and are
allocated using pool memory of type EfiACPIReclaimMemory, so that it
gets freed at the right moment in boot.
2022-11-14 15:21:58 +01:00
Vitaly Kuznetsov
019243553d measure: fix section names in 'objcopy' example in systemd-measure man
A copy paste error has crippled in the objcopy example in 'systemd-measure'
manual,  "--change-section-vma" should reference the section being added,
not ".splash". When used as-is, the resulting UKI is unbootable.

Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
2022-11-14 12:31:33 +01:00
Carlo Teubner
e48237358f man/systemd-dissect.xml: fix trivial error 2022-11-12 01:41:59 +01:00
Daan De Meyer
c4a87b76c3 repart: Take into account minimal filesystem size
Instead of requiring users to guess the required space for partitions
populated with CopyFiles=, let's make an educated guess ourselves. We
can populate the filesystem once in a very large sparse file and see
how much data is actually used as a good indicator of the required size.
2022-11-11 14:33:19 +01:00
Lennart Poettering
b5b40106c7 man: document new systemd-dissect --mtree switch 2022-11-09 22:20:51 +01:00
Lennart Poettering
1a06ce16b2 man: document the new --with switch of systemd-dissect 2022-11-09 14:57:23 +01:00
Zbigniew Jędrzejewski-Szmek
2fa6574e83 man: add note that network-generator is not a generator
Also fix indentation.
2022-11-08 12:13:45 +01:00