Commit Graph

53089 Commits

Author SHA1 Message Date
Frantisek Sumsal
bd8ea741a4 ci: build with clang-13
Also, drop clang-10 builds to conserve resources.
2021-09-14 19:06:01 +02:00
Lennart Poettering
9a89ab26d6 man: extend documentation about TPM2 PCRs
This is an effort to compile a somewhat complete list how PCRs are
actually used on Linux systems these days. It contains data from: the
UEFI PC spec, the shim, the IMA, grub documentation.

I validated these PCRs to some level in the sources.

The grub specific stuff I only added in comments, since I was too lazy
too validate it (also, meh, grub).

It also gives people a hint on which PCR to bind to (and maybe kind of
an explanation of our default choice).
2021-09-14 17:37:06 +02:00
Lennart Poettering
2fe29f3135 Merge pull request #20697 from yuwata/in-addr-prefix
core: rewrite IPAddressAllow/Deny= parser
2021-09-14 15:58:20 +02:00
Luca Boccassi
76ab98fa2b docs: generic info about adding directives in ARCHITECTURE.md 2021-09-14 13:55:05 +01:00
Yu Watanabe
9d01399d44 network: replace config_parse_address_filter() with config_parse_in_addr_prefixes() 2021-09-14 20:31:17 +09:00
Yu Watanabe
84ebe6f013 core: replace IPAddressAccessItem with struct in_addr_prefix
Previously, if a unit file which contains n IPAddressAllow/Deny= lines,
then the computational order of parsing the file was O(n^3), as
ip_address_access_reduce(), whose order is O(n^2), is called for each line.

By replacing in_addr_prefix related functions, now the computational
order is O(n log n).

Fixes #20680.
2021-09-14 20:30:09 +09:00
Yu Watanabe
60da07ecc7 core/cgroup: set bitfield to reduce struct size 2021-09-14 20:30:09 +09:00
Yu Watanabe
0856e78df0 test: add tests for in-addr-prefix-util.c 2021-09-14 20:30:09 +09:00
Yu Watanabe
0bc311bbe9 test: slightly modernize test-in-addr-util.c 2021-09-14 20:30:09 +09:00
Yu Watanabe
bffaa49ec4 in-addr-prefix-util: introduce several utilities for address prefix 2021-09-14 20:30:09 +09:00
Yu Watanabe
c4f06a75ea Merge pull request #20700 from yuwata/network-dhcp-cleanups
network: several DHCP related cleanups
2021-09-14 20:29:27 +09:00
Yu Watanabe
e47bcb7d0b network: do not use RouteTable= in [DHCPv4] section for DHCPv6 routes
We forgot to add RouteTable= in [DHCPv6] section when we split [DHCP]
into two.
2021-09-14 17:51:19 +09:00
Yao Wei (魏銘廷)
ed938716cd Add additional Dell models that require ACCEL_LOCATION=base
This is a related commit to the bug reported in Ubuntu:
  https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1938259

This adds additional 4 models that without this param, the screen rotates
when the clamshell laptop rotates, which is an unwanted behavior.

This commit also merges entries that needs the same param.

Signed-off-by: Yao Wei (魏銘廷) <yao.wei@canonical.com>
2021-09-14 09:42:31 +02:00
Lennart Poettering
b83bbbac87 Merge pull request #20713 from yuwata/udev-watch-retry
udev-watch: retry to save watch handle on error
2021-09-14 09:40:23 +02:00
Yu Watanabe
967e6a6403 network: use ltype to distinguish DHCPv4 and DHCPv6 2021-09-14 15:21:10 +09:00
Yu Watanabe
471e332d50 network: dhcp4: use free_and_strdup_warn() 2021-09-14 15:21:10 +09:00
Yu Watanabe
ec84bb2a2b network: dhcp4: log server address 2021-09-14 15:21:10 +09:00
Yu Watanabe
3596fb3600 network: dhcp4: return earlier on failure 2021-09-14 15:21:10 +09:00
Yu Watanabe
429dc05a72 network: move common route settings to {dhcp4,ndisc}_request_route() 2021-09-14 15:21:10 +09:00
Yu Watanabe
8be102f8b8 test-network: kernel treats the lowest IP address as unicast since 5.14
See kernel's 94c821c74bf5fe0c25e09df5334a16f98608db90.
2021-09-13 21:41:16 +02:00
Lennart Poettering
99db797bc6 escape: improve logging when escaping paths that are slightly non-conforming
Fixes: #20663
2021-09-14 03:04:57 +09:00
Benjamin Herrenschmidt
f90eea7d18 virt: Improve detection of EC2 metal instances
The current detection code relies on /sys/firmware/dmi/entries/0-0/raw
to disambiguate Amazon EC2 virtualized from metal instances.

Unfortunately this file is root only. Thus on a c6g.metal instance
(aarch64), we observe something like this:

$ systemd-detect-virt
amazon
$ sudo systemd-detect-virt
none

Only the latter is correct.

The right long term fix is to extend the kernel to expose the SMBIOS BIOS
Characteristics properly via /sys/class/dmi, but until this happens (and
for backwards compatibility when it does), we need a plan B.

This change implements such a workaround by falling back to using the
instance type from DMI and looking at the ".metal" string present on
metal instances.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
2021-09-14 01:44:20 +09:00
Lennart Poettering
c116f23394 Merge pull request #20716 from poettering/tpm2-primary-rsa
tpm2: be smarter when picking primary key algorithm and PCR bank
2021-09-13 17:12:20 +02:00
Lennart Poettering
f4529c4d97 update TODO 2021-09-13 15:02:57 +02:00
Lennart Poettering
d38466bae6 tpm2: log about invalid PCRs on each unsealing
Let's log every time we use uninitialized PCRs when unsealing a secret
via TPM2. This indicates a firmware issue usually, and is something we
shouldn't just show when enrolling but also show every time we unseal,
so that the fact that the selected PCR policy is pretty much pointless
is repeatedly shown.
2021-09-13 15:02:53 +02:00