1
0
mirror of https://github.com/systemd/systemd.git synced 2025-02-28 05:57:33 +03:00

68947 Commits

Author SHA1 Message Date
Zbigniew Jędrzejewski-Szmek
e87dec82be ukify: show .sbom sections as text
There are draft proposals to embed SBOM metadata in the .sbom section of PE
binaries [1], in the coSWID XML format. Some details of how this is actually
implemented might change, but it seems very likely that both section name and
it being text will stay. Let's show the section as text to make such binaries
easier to inspect. ([1] recommends using 'objcopy -j .sbom' which isn't
particularly readable.)  Once there's more standarization of the actual
format, we can add pretty-printing and/or syntax highlighting.

[1] https://uefi.org/blog/firmware-sbom-proposal
[2] https://www.ietf.org/archive/id/draft-ietf-sacm-coswid-21.html
2023-11-13 10:59:30 +01:00
Zbigniew Jędrzejewski-Szmek
51faf83696 ukify: print a more readable synopsis in --help
The details of formatting are copied from mkosi. This results in the following:

   usage:
     ukify build [--linux=LINUX] [--initrd=INITRD] [options…]
     ukify genkey [options…]
     ukify inspect FILE… [options…]

  Build and sign Unified Kernel Images

  options:
    --version             show program's version number and exit
    ...

I put "[options…]" at the end, because that's what one would generally do
with long options like "--cmdline" and others.
2023-11-13 10:59:30 +01:00
Mike Yuan
6f510ec8d6
Merge pull request #29990 from Flowdalic/memory-zswap-current
cgroup: add support for memory.zswap.current
2023-11-13 16:40:18 +08:00
Florian Schmaus
7bf87a6477 systemctl-show: merge subsequent swap printf() blocks 2023-11-12 21:12:02 +01:00
Mike Yuan
9ac2f3c4d2 conf-parser: pin seen config files
Follow-up for 93f1da45566d064f4f053b37bbac2813631f58b1

Addresses 93f1da4556 (r132152321)
2023-11-13 05:11:26 +09:00
Florian Schmaus
26caa66867 cgroup: add support for memory.zswap.current 2023-11-12 21:10:40 +01:00
Yu Watanabe
49a6f7c849
Merge pull request #29976 from YHNdnzj/session-by-leader-pidref
logind: switch sessions_by_leader to PidRef
2023-11-13 05:09:47 +09:00
Yu Watanabe
7fd93e5acc
Merge pull request #29968 from bluca/executor_selinux_lazy_load
executor: lazily load SELinux
2023-11-13 05:06:44 +09:00
Luca Boccassi
049ef475d5
Merge pull request #29989 from yuwata/conf-parser-arg-type
conf-parser: fix argument type
2023-11-12 17:30:44 +00:00
Yu Watanabe
5996cc348c conf-parser: fix argument type of ConfigPerfItemLookup
Prompted by #29972.
2023-11-13 00:46:39 +09:00
Yu Watanabe
62c9beaa2c conf-parser: inline variable declaration 2023-11-13 00:46:34 +09:00
Jeremy Fleischman
121cb88292 Fix some typos in RESOLVED-VPNS.md 2023-11-12 12:55:29 +00:00
Mike Yuan
214bed77e8
Merge pull request #29941 from Flowdalic/cgroup-memory-swap-peak
cgroup: add support for memory.swap.peak and memory.swap.current
2023-11-12 16:21:44 +08:00
Luca Boccassi
22f62b8917 test: sort files in generate-sym-test.py
The test binaries are different depending on the filesystem, due to os.walk().
Sort the input before iterating on it to make it stable.
2023-11-12 12:54:23 +09:00
Mike Yuan
8494f562c8
logind: switch sessions_by_leader to PidRef 2023-11-11 22:31:00 +08:00
Luca Boccassi
0b511787fd selinux: change fd check into assertion 2023-11-11 12:33:19 +00:00
Luca Boccassi
894288340f executor: lazily load SELinux
Loading the SELinux DB on every invocation can be slow and
takes 2ms-10ms, so do not initialize it unconditionally, but
wait for the first use. On a mkosi Fedora rawhide image, this
cuts the number of loads in half.
2023-11-11 12:33:19 +00:00
Luca Boccassi
0617da2edb selinux: support lazy initialization
Loading the SELinux DB is slow, so support lazy initialization so
that it is done when needed.
2023-11-11 12:33:19 +00:00
Luca Boccassi
2c6a231b47 selinux: avoid probing memory status if debug logs are not enabled
Given we are optimizing the selinux paths, avoid doing these operations
unless the result is actually used
2023-11-11 12:29:52 +00:00
Florian Schmaus
37533c9432 cgroup: add support for memory.swap.current
In systemctl-show we only show current swap if ever swapped or non-zero. This
reduces the noise on swapless systems, that would otherwise always show a swap
value that never has the chance to become non-zero. It further reduces the
noise for services that never swapped.
2023-11-11 12:16:29 +01:00
Florian Schmaus
991506ae5d cgroup: de-duplicate uni_get_memory_* code 2023-11-11 12:14:07 +01:00
Florian Schmaus
aac3384e56 cgroup: add support for memory.swap.peak 2023-11-11 12:14:07 +01:00
Mike Yuan
1c2beeb04f
core/unit: remove unneeded comparison for hashmap_remove_value
hashmap_remove_value returns NULL if the value in the hashmap doesn't
match with the one provided by the caller.
2023-11-11 17:21:10 +08:00
Mike Yuan
4c8d5f0217
pidref: introduce hash ops that doesn't come with destructor 2023-11-11 17:21:10 +08:00
Mike Yuan
2c302e8919
cgroup-util: introduce cg_pidref_get_unit 2023-11-11 17:21:10 +08:00
Yu Watanabe
620788da17 TODO: fix typo 2023-11-11 17:58:14 +09:00
Yu Watanabe
49549a458c
Merge pull request #29929 from poettering/tty-reset-fixes
pid1: various fixes around TTY resets
2023-11-11 12:44:31 +09:00
Yu Watanabe
7fad66b1a7
Merge pull request #29958 from mrc0mmand/journal-line_max
journal: recalculate line_max when stdout stream state changes
2023-11-11 12:39:57 +09:00
cvlc12
f712b11df6 Update kernel-install man page, Ukify is the default UKI_GENERATOR
Ukify is the default generator, and will be used if UKI_GENERATOR is unset. See https://github.com/systemd/systemd/pull/28687
2023-11-11 12:25:37 +09:00
Luca Boccassi
459f51fe6b
Merge pull request #29982 from poettering/repart-message-tweaks
repart: minor log message tweaks
2023-11-10 23:16:13 +00:00
Clayton Craft
0f781d2aa5 boot: load device tree even if no original config exists
Firmware may not have loaded a devicetree, for example if the device
shipped with windows and exclusively supports ACPI.
We should always load the specified devicetree regardless of firmware
state to enable booting on platforms where Linux only supports DT.

Note: in _cleanup, the orig. config is NULL in this case, and passing
NULL to InstallConfigurationTable is permitted by the EFI spec.
See: https://uefi.org/specs/UEFI/2.10/07_Services_Boot_Services.html

Fixes #24059

Co-authored-by: Daniel Thompson <daniel.thompson@linaro.org>
2023-11-10 22:04:50 +00:00
Luca Boccassi
efe4303b5d
Merge pull request #29981 from yuwata/network-dhcp6-pd-without-address
network: fix DHCPv6-PD without addressing
2023-11-10 22:04:25 +00:00
Lennart Poettering
dc7e34b369 repart: downgrade pcrlock pickup log message
This is not relevant in most cases, hence don't mention this all the
time.
2023-11-10 22:53:49 +01:00
Lennart Poettering
acdf6bcfdb repart: say on which device we apply things
So far we never mention the device in our output. Let's fix that.
2023-11-10 22:53:49 +01:00
Lennart Poettering
a053f801f8 repart: when we copy in blocks, indicate we are doing from an offset
At first I thought when using --copy-from= that it was copying in my
whole disk into a partition instead of just a partition into a
partition.

Let's make the log message clearer and say that we copy starting from an
offset.
2023-11-10 22:53:49 +01:00
Lennart Poettering
b7786df093 repart: mention how long it took to copy in data blocks
This is quite interesting information, show it.
2023-11-10 22:53:49 +01:00
Lennart Poettering
561c1529be execute: add comment explaining what stdio_as_fds does 2023-11-10 21:38:26 +01:00
Lennart Poettering
c34eaeb5eb execute: use right fd to fix tty size 2023-11-10 21:38:26 +01:00
Lennart Poettering
29ed1f0203 execute: make clear what reset_terminal_fd()'s 2nd param is about 2023-11-10 21:38:26 +01:00
Lennart Poettering
bb2dbe7c6a exec-invoke: only reset tty if we are told to
We have a setting for this, honour it also if we are invoked with
stdin passed in as fd.

Fixes: #29714
2023-11-10 21:38:26 +01:00
Lennart Poettering
d2b9e75524 execute: add new helper exec_context_apply_tty_size()
This combines exec_context_determine_tty_size() and
terminal_set_size_fd() since we always use one after the other.

Also make exec_context_determine_tty_size() return void, since it cannot
fail.
2023-11-10 21:38:26 +01:00
Yu Watanabe
1805e2cb05 test-network: add test case for issue #29979 2023-11-11 03:57:59 +09:00
Yu Watanabe
fc4aa64c2d network/dhcp6: skip to check existence of DHCPv6 address when UseAddress=no
Follow-up for 1536b7b2d00819615bf8eba194de7ccd20c3689f and
5f950e56211a90b21e8096ebf27c9c2b8afbd231.

Fixes #29979.
2023-11-11 03:30:34 +09:00
Yu Watanabe
f5e1781a9e network/dhcp6: use link_check_address_ready() at one more place 2023-11-11 03:30:34 +09:00
Yu Watanabe
706cd85937 network/dhcp-pd: use correct flag when DHCPv4 6rd is enabled
Previously, Link.dhcp6_configured flag was unconditionally used even if
the route is configured based on the DHCPv4 protocol.

Follow-up for a27588d4e7f780243a1828e2af56562f9d779412 and
e49bad0179cb670edeac12ef062887af0ac4c8c5.
2023-11-11 03:30:34 +09:00
Lennart Poettering
f3066d635a update TODO 2023-11-10 18:55:22 +01:00
Frantisek Sumsal
17ee59c9c9 fuzz: pass -Dc_args=/-Dcpp_args= to fuzzer targets
Prompted by #29972, because right now it's practically impossible to pass
-fno-sanitize=function to the fuzzer targets without some extensive
sed'ing.

This splits both c_args and cpp_args to separate arguments for
tools/meson-build.sh, because the other way would be to use `eval`, so
the space-separated but quoted strings passed to these options are not
split where they shouldn't, and I'd rather avoid using `eval` if
possible.

Also, this switches the positional arguments we pass to `meson setup`,
as they were in incorrect order (docs say it should be buildir followed
by sourcedir); meson is apparently clever enough to figure this out and
switch the arguments around if necessary, so it didn't complain.
2023-11-10 17:22:08 +00:00
Luca Boccassi
be0916f77c
Merge pull request #29955 from poettering/repart-seal-key
repart: add --tpm2-seal-key= support, matching the recently added support cryptenroll has
2023-11-10 16:52:00 +00:00
Luca Boccassi
d8beda5023
Merge pull request #29947 from poettering/srk-beefup
tpm2: make SRK easily accessible for use with systemd-cryptenroll --tpm2-device-key=
2023-11-10 16:47:46 +00:00
zeroskyx
49a2fe1388
hwdb: Add accelerometer data for Librem11 (#29974) 2023-11-10 22:32:05 +09:00