Commit Graph
57095 Commits
Author SHA1 Message Date
Evgeny Vereshchagin fb53316fde meson: pass skip-deps on to the fuzzers as well
they should be tested without optional dependecines as well. CIFuzz
kind of covers that but let's just make sure local builds are fine as
well.
2022-02-22 17:50:14 +00:00
Zbigniew Jędrzejewski-Szmek cab4ed0f4a Merge pull request #22592 from yuwata/test-oomd-util-fixlets
test: test-oomd-util fixlets
2022-02-22 18:25:45 +01:00
Luca Boccassi aff3a9e1fa watchdog: add setting to configure pretimeout governor 2022-02-22 17:19:54 +00:00
Curtis Klein 56b96db700 watchdog: check pretimeout governor
Check and log the default pretimeout governor configured in the kernel.
The pretimeout will not work unless at least one governor is available
and configured. This requires loading a kernel module manually.
2022-02-22 17:19:54 +00:00
Curtis Klein 5717062e93 watchdog: Add watchdog pretimeout support
Add support for managing and configuring watchdog pretimeout values if
the watchdog hardware supports it. The ping interval is adjusted to
account for a pretimeout so that it will still ping at half the timeout
interval before a pretimeout event would be triggered. By default the
pretimeout defaults to 0s or disabled.

The RuntimeWatchdogPreSec config option is added to allow the pretimeout
to be specified (similar to RuntimeWatchdogSec). The
RuntimeWatchdogPreUSec dbus property is added to override the pretimeout
value at runtime (similar to RuntimeWatchdogUSec). Setting the
pretimeout to 0s will disable the pretimeout.
2022-02-22 17:19:54 +00:00
Frantisek Sumsal b491d74064 ci: fix clang-13 installation
For some reason Ubuntu Focal repositories now have `llvm-13` virtual
package which can't be installed, but successfully fools our check,
resulting in no clang/llvm being installed...

```
$ apt show llvm-13
Package: llvm-13
State: not a real package (virtual)
N: Can't select candidate version from package llvm-13 as it has no candidate
N: Can't select versions from package 'llvm-13' as it is purely virtual
N: No packages found

$ apt install --dry-run llvm-13
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package llvm-13 is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'llvm-13' has no installation candidate
```
2022-02-22 17:57:25 +01:00
Zbigniew Jędrzejewski-Szmek 09d0758b22 Merge pull request #22574 from yuwata/network-dhcp-pd-fixes
network: dhcp-pd: fix two issues
2022-02-22 17:53:00 +01:00
Lennart Poettering 92148fb777 clang-format: we actually typically use 16ch continuation indentation
We use 8 for blocks, and 16 for continuation in most cases afaics, hence
say so in .clang-format too
2022-02-22 17:32:50 +01:00
Yu Watanabe be99883e13 test: fix file descriptor leak in test-psi-util
Fixes an issue reported in #22576.
2022-02-23 00:58:16 +09:00
Yu Watanabe 1da5325d19 test: fix file descriptor leak in test-tmpfiles.c
Also fixes a typo in assertion.

Fixes an issure reported in #22576.
2022-02-23 00:58:16 +09:00
Yu Watanabe 19962747ca test: fix file descriptor leak in test-fs-util
Fixes an issue reported in #22576.
2022-02-23 00:58:13 +09:00
Evgeny Vereshchagin ca57d11652 ci: build systemd without optional dependencies
to catch issues like https://github.com/systemd/systemd/pull/22585#issuecomment-1047640155
2022-02-22 15:46:15 +00:00
Jan Janssen 3f9973bf36 boot: Handle shift and logo keys too
Some firmware supports sending input events for shift and logo keys.
Previously, we would suppress these with EFI_NOT_READY unless
some other key was pressed alongside, but it is really the job of the
caller to decide how to handle these.

Note that for keys that already have a printable shift representation
the reported input event will not have the shift key bits set
(Shift+a is reported as A). Should some firmware turn out to violate the
spec here we can always remove that part.
2022-02-22 16:34:55 +01:00
Jan Janssen 1cb5d7857b boot: Properly check status code of console_key_read
In some cases there was a unlikely possibility that we would look
at an uninitialized key value.
Also, returning in case of unexpected input error cases should prevent
infinite looping.
2022-02-22 16:34:52 +01:00
Lennart Poettering bd4f672e4c Merge pull request #22584 from poettering/systemctl-verb-renamed
systemctl: rename "verb" entrypoint functions systematically to verb_xyz()
2022-02-22 16:16:58 +01:00
Lennart Poettering c04c7c10c0 analyze: fix build on non-seccomp builds
Follow-up for #22585

See: https://github.com/systemd/systemd/pull/22585#issuecomment-1047658990
2022-02-22 16:15:52 +01:00
Lennart Poettering 623461c130 systemctl: rework daemon_reload() functions
Let's split out the inner parts of verb_daemon_reload() as a function
daemon_reload() and then stop using the former outside of the verbs
logic, and instead call the latter whenever we need to reload the daemon
as auxiliary opeation.

This should make our logic more systematic as we don't have to provide
fake or misleading argc/argv to verb_daemon_reload() anymore.
2022-02-22 14:15:08 +01:00
Lennart Poettering 32baf64d5a systemctl: systematically rename verb entrypoints verb_xyz()
Let's clean up our function naming a bit, and always name the
verb_xyz(), where the xyz maps to the command line verb as closely as
possible.

No actual code changes, just an attempt to make the systemctl sources a
bit more systematic, and less surprising.
2022-02-22 14:15:07 +01:00
Yu Watanabe 282696ce52 test: fix file descriptor leak in test-oomd-util
Fixes an issue reported in #22576.
2022-02-22 21:50:52 +09:00
Yu Watanabe 8306912b0e test: fix memory and fd leak in test-dhcp6-client
Fixes an issue reported in #22576.
2022-02-22 21:50:43 +09:00
Yu Watanabe 2e37084fc9 test: drop timeout handlers
Fixes file descriptor leak reported in #22576.
2022-02-22 21:50:32 +09:00
Yu Watanabe 62d4b3b36e test: fix file descriptor leak in test-catalog
Fixes an issue reported in #22576.
2022-02-22 21:50:29 +09:00
Yu Watanabe 07b7337aff network: dhcp-pd: allow to assign the same subnet prefix to multiple interfaces
There is no reason networkd refuses that. Especially, when multiple
downstream interfaces are connected to the same network, it is natural to
assign the same subnet prefix to them.

Prompted by #22571.
2022-02-22 20:39:32 +09:00
Yu Watanabe 38488babe7 network: dhcp-pd: fix prefix length of address assigned to upstream interface
This effectively revert ab0c82d9f7.

I have no idea why I did that...

Fixes #22559.
2022-02-22 20:39:28 +09:00
Yu Watanabe a6d6a51d83 test-oomd-util: fix conditional jump on uninitialised value
Fixes #22577.
2022-02-22 20:24:22 +09:00
Yu Watanabe d9fe39b24a test-oomd-util: style fixlets 2022-02-22 20:21:57 +09:00
Evgeny Vereshchagin 678ba02033 meson: allow skipping optional dependencies
mostly to make sure that systemd is buildable without some dependencies
but other than that it should make it easier to build it with MSan without
having to compile all the dependencies with MSan.
2022-02-22 11:17:21 +00:00
Franck Bui c972880640 core: really skip automatic restart when a JOB_STOP job is pending
It's not clear why we rescheduled a service auto restart while a stop job for
the unit was pending. The comment claims that the unit shouldn't be restarted
but the code did reschedule an auto restart meanwhile.

In practice that was rarely an issue because the service waited for the next
auto restart to be rescheduled, letting the queued stop job to be proceed and
service_stop() to be called preventing the next restart to complete.

However when RestartSec=0, the timer expired right away making PID1 to
reschedule the unit again, making the timer expired right away... and so
on. This busy loop prevented PID1 to handle any queued jobs (and hence giving
no chance to the start rate limiting to trigger), which made the busy loop last
forever.

This patch breaks this loop by skipping the reschedule of the unit auto restart
and hence not depending on the value of u->restart_usec anymore.

Fixes: #13667
2022-02-22 11:45:12 +01:00
Ludwig Nussel 6d7127d6dd systemctl: improve error messages related to halt failures 2022-02-22 11:36:29 +01:00
Zbigniew Jędrzejewski-Szmek 22049270c0 Merge pull request #22585 from poettering/analyze-split-up
analyze: split out each verb into its own .c/.h pair
2022-02-22 11:02:57 +01:00
Lan Tian 70920214b6 hwdb: Force release calculator key on all HP OMEN laptops 2022-02-22 10:40:51 +01:00
prumian d9ab110ddc hwdb: add CST Laser Trackball (#22583)
Set the default to 800DPI as this is what user manual suggests.
2022-02-22 07:47:39 +01:00
Lennart Poettering 0e48986961 env-util: drop unsetenv_erase()
Follow-up for: e99ca14741

Found by @grigorig: https://github.com/systemd/systemd/commit/e99ca1474145f7fad38bb0255d344f4ad7717ef5#r67071855
2022-02-21 23:08:34 +00:00
Lennart Poettering dc4864dd68 analyze: modernize pretty_boot_time() a bit
Use simple strextend() backed by dynamic memory instead of format string
logic with fixed buffer.
2022-02-21 17:22:23 +01:00
Lennart Poettering ef38bedbf9 analyze: systematically name verb entry point functions verb_xyz()
Some of the functions so far were named do_xyz(), others dump_xyz() and
even others test_xyz(). let's instead name them exactly like the verb
exposed in the command line, just prefixed with verb_
2022-02-21 17:22:23 +01:00
Lennart Poettering e82116e56b analyze: move "condition" verb into analyze-condition.[ch] 2022-02-21 17:22:23 +01:00
Lennart Poettering f2562398ea analyze: split out "verify" verb into own .c/.h file
This renames the old analyze-verify.[ch] pair →
analyze-verify-util.[ch], because it's used by the test logic as well,
and by keeping it separate from the verify verb logic we don't have to
import the arg_xyz variables.
2022-02-21 17:22:23 +01:00
Lennart Poettering 2acfc25225 analyze: move inspect-elf verb entrypoint into analyze-elf.[ch], too
like for the other verbs, let's move the whole entry point for the verb,
too.
2022-02-21 17:22:23 +01:00
Lennart Poettering 57a22a3f97 analyze: fully move "security" verb to analyze-security.[ch]
let's move the verb entropy point too, like for the other verbs now.
2022-02-21 17:22:23 +01:00
Lennart Poettering f24f8e3789 analyze: split out "time" verb 2022-02-21 17:22:23 +01:00
Lennart Poettering ef215fa752 analyze: split out critical chain 2022-02-21 17:22:23 +01:00
Lennart Poettering 0c2d69df7f analyze: split out "unit-files" verb 2022-02-21 17:22:23 +01:00
Lennart Poettering 36258fbe74 analyze: split out "unit-paths" verb 2022-02-21 17:22:23 +01:00
Lennart Poettering faaa6ea076 analyze: split out log control verb 2022-02-21 17:22:23 +01:00
Lennart Poettering c649b343b4 analyze: split out cat-config verb 2022-02-21 17:22:23 +01:00
Lennart Poettering ba474dada8 analyze: split out "plot" verb 2022-02-21 17:22:23 +01:00
Lennart Poettering 113dd9cbc4 analyze: split out "blame" verb + time helpers 2022-02-21 17:22:23 +01:00
Lennart Poettering 6488e8443b analyze: split out "capability" verb 2022-02-21 17:22:23 +01:00
Lennart Poettering 73cb64c44d analyze: split out "exit-status" verb 2022-02-21 17:22:23 +01:00
Lennart Poettering ab86ccbab0 analyze: highlight the range of deprecated verbs in comments a bit better 2022-02-21 17:22:23 +01:00