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

50557 Commits

Author SHA1 Message Date
Luca Boccassi
81e01cf809 coredump: update and shorten package metadata keys
Follow-up for a7ea0a460b
2021-04-07 14:04:04 +01:00
Luca Boccassi
289784a798 coredump: use path_equal_filename helper 2021-04-07 14:03:49 +01:00
Luca Boccassi
727e63e33e basic: add path_equal_filename helper 2021-04-07 14:03:49 +01:00
Luca Boccassi
b7ddd44497 coredumpctl: fetch JSON object by key instead of iterating
Follow-up for d1b5a0c691
2021-04-07 14:03:49 +01:00
Luca Boccassi
1f2abb791e coredump: fetch JSON object by key instead of iterating
Follow-up for c546154a44
2021-04-07 14:03:48 +01:00
Luca Boccassi
671769c932 coredump: rename COREDUMP_PKGMETA_ fields to COREDUMP_PACKAGE_
Follow-up for c546154a44
2021-04-07 14:02:38 +01:00
Luca Boccassi
f216e74841 coredump: use JSON helpers instead of creating objects manually
Follow-up for 95f7180773
2021-04-07 14:02:38 +01:00
Luca Boccassi
9b7205f5dd coredump: fix style nits
Follow-up for 95f7180773
2021-04-07 14:02:38 +01:00
Luca Boccassi
26c22c84e0 coredump: use set_put_strdup()
Follow-up for 95f7180773
2021-04-07 14:02:38 +01:00
Luca Boccassi
2c173dbf1b coredump: fix typo
Follow-up for 95f7180773
2021-04-07 14:02:38 +01:00
Zbigniew Jędrzejewski-Szmek
462035d599 sd-device: small modernization 2021-04-07 14:36:37 +02:00
Zbigniew Jędrzejewski-Szmek
9b4aba104e shared/base-filesystem: modernization 2021-04-07 14:36:25 +02:00
Morten Linderud
29d898cc7b man/systemd-cryptenroll: Fix sd-boot manvolnum from 8 to 7
Off-by-one error in the documentation index. The volume number for
systemd-boot/sd-boot is 7.

Signed-off-by: Morten Linderud <morten@linderud.pw>
2021-04-07 13:57:33 +02:00
Luca Boccassi
65d09d575c Bump test-random-util timeout
It is using log_trace, which we enabled in the CI, so now it's
slower and it is timing out. Bump the timeout from 30s to 120s.
2021-04-07 09:32:42 +02:00
Zbigniew Jędrzejewski-Szmek
3e3ab11b9e
Merge pull request #19135 from bluca/coredump_decode
coredump: parse build-id and .note.package
2021-04-07 07:41:16 +02:00
Luca Boccassi
a7ea0a460b Add markdown doc about coredump package metadata 2021-04-06 23:12:51 +01:00
Luca Boccassi
d1b5a0c691 coredumpctl: parse and print package metadata 2021-04-06 23:12:51 +01:00
Luca Boccassi
c546154a44 coredump: parse and append package metadata to journal message
Append 'package' and 'packageVersion' to the journal as discrete fields
COREDUMP_PKGMETA_PACKAGE and COREDUMP_PKGMETA_PACKAGEVERSION respectively,
and the full json blurb as COREDUMP_PKGMETA_JSON.
2021-04-06 23:12:51 +01:00
Luca Boccassi
95f7180773 coredump: parse .note.package ELF section
Parse the .note.package ELF section for each ELF object
contained in a core file, if present.
2021-04-06 22:53:54 +01:00
Luca Boccassi
965e095546 coredump: parse build-id out of core file
Parse the build-id of each ELF object contained in the core file
using the elfutils' libdwfl interface.
Add it to the journal.
2021-04-06 22:52:48 +01:00
Luca Boccassi
ee579e6454
Merge pull request #19215 from braewoods/main
hwdb: 60-keyboard:: Add quirks for 2 new HP laptops
2021-04-06 18:52:11 +01:00
Lennart Poettering
1b30720c1b tpm2-util: properly load tpm2 libraries befre unsealing
We forgot a call to dlopen_tpm2() in the unseal codepaths. As long as
automatic TPM2 device discovery was used that didn't matter, since in
that codepaths we'd have another call dlopen_tpm2(). But with an
explicitly configured TPM2 device things should work too, hence add the
missing call.

Fixes: #19206
2021-04-06 18:43:24 +02:00
Lennart Poettering
ff2cf6f8fe recovery-key: add some extra asserts
Let's ensure our key sizes calculations are correct.

This doesn't actually change anything, just adds more safety checks.
Inspired by #19203, but not a fix.
2021-04-06 18:42:30 +02:00
KoyamaSohei
da846b3031 resolve: copy rd flag from the query to response 2021-04-06 17:00:29 +02:00
Sibo Dong
f34173a048 bash-completion: localize words and cword variables
The words and cword variables are not localized in all Bash completion
scripts that call _init_completion.

cur, prev, words, and cword (and split if using the -s flag) are all
variables that should be localized in Bash completion scripts before
calling _init_completion (even if they don't otherwise appear in the
calling script). This is done for cur and prev, but not for words and
cword. Letting words and cword remain unlocalized may clobber variables
the user is using for other purposes, which is bad.

This issue can be resolved by declaring words and cword as local
variables.

Resolves #19188.
2021-04-06 16:15:13 +02:00
Luca Boccassi
7c20dd4b6e sysusers/firstboot: temporarily disable LoadCredential
Single-param LoadCredential= in units causes systemd v247/v248 to
assert when parsing. Disable it for now, until the fix is merged
in the stable trees, released and available (eg: in Debian
for the CI)

See: https://github.com/systemd/systemd/issues/19178
2021-04-06 12:02:42 +02:00
Lennart Poettering
f3e58b55de update 2021-04-06 11:48:37 +02:00
James Buren
5f6e4dc4f4 hwdb: 60-keyboard:: Add HP ProBook 455 G5 hotkey quirks
This enables all of the known hotkeys that were not working out of the
box on my test unit.
2021-04-06 02:18:26 -05:00
James Buren
98fa828f60 hwdb: 60-keyboard:: Add HP mt44 Mobile Thin Client hotkey quirks
This enables all of the known hotkeys that were not working out of the
box on my test unit.
2021-04-06 01:32:37 -05:00
Gibeom Gwon
fd11201b93 qrcode-util: set case-sensitive for generating QR codes
Until now, string treated case-insensitive, always converted to
uppercase. This can cause confusion such as user enter uppercased
recovery key.
2021-04-06 08:08:01 +02:00
Anita Zhang
afbcd90552 test-firewall-util: skip if iptables nat table does not exist 2021-04-06 08:01:27 +02:00
Zbigniew Jędrzejewski-Szmek
9d5ae3a121
Merge pull request #19126 from anitazha/oomdimprovements
systemd-oomd post-test week improvements
2021-04-06 07:59:59 +02:00
Frantisek Sumsal
34fde9f898 test: check if the unit file fuzzer corpora is up to date
This follows a similar pattern we already have in place for
networkd-related directives.
2021-04-05 14:41:05 +01:00
Anita Zhang
685b0985f0 oomd: threshold swap kill candidates to usages of more than 5%
In some instances, particularly with swap on zram, swap used will be high
while there is still a lot of memory available. FB OOMD handles this by
thresholding kills to X% of total swap usage. Let's do the same thing here.

Anecdotally with these thresholds and my laptop which is exclusively swap
on zram I can sit at 0K / 4G swap free with most of memory free and
systemd-oomd doesn't kill anything.

Partially addresses aggressive kill behavior from
https://bugzilla.redhat.com/show_bug.cgi?id=1941170
2021-04-05 02:04:49 -07:00
Anita Zhang
cb13961ada oomd: don't get pressure candidates on every interval
Only start collecting candidates for a memory pressure kill when we're
hitting the limit (but before the duration hitting that limit is
exceeded). This brings CPU util from ~1% to 0.3%.

Addresses CPU util from
https://bugzilla.redhat.com/show_bug.cgi?id=1941340
and
https://bugzilla.redhat.com/show_bug.cgi?id=1944646
2021-04-05 02:01:32 -07:00
Frantisek Sumsal
080a602771 fuzzer: add a test case for #19178 2021-04-03 10:38:06 +01:00
Luca Boccassi
1270e56526
Merge pull request #19179 from anitazha/buildandtest
test-oomd-util: fix running in mkosi
2021-04-02 17:56:13 +01:00
Viktor Mihajlovski
a496a238e8 udev: fix slot based network names on s390
The s390 PCI driver assigns the hotplug slot name from the
function_id attribute of the PCI device using a 8 char hexadecimal
format to match the underlying firmware/hypervisor notation.

Further, there's always a one-to-one mapping between a PCI
function and a hotplug slot, as individual functions can
hot plugged even for multi-function devices.

As the generic matching code will always try to parse the slot
name in /sys/bus/pci/slots as a positive decimal number, either
a wrong value might be produced for ID_NET_NAME_SLOT if
the slot name consists of decimal numbers only, or none at all
if a character in the range from 'a' to 'f' is encountered.

Additionally, the generic code assumes that two interfaces
share a hotplug slot, if they differ only in the function part
of the PCI address. E.g., for an interface with the PCI address
dddd:bb:aa.f, it will match the device to the first slot with
an address dddd:bb:aa. As more than one slot may have this address
for the s390 PCI driver, the wrong slot may be selected.

To resolve this we're adding a new naming schema version with the
flag NAMING_SLOT_FUNCTION_ID, which enables the correct matching
of hotplug slots if the device has an attribute named function_id.
The ID_NET_NAME_SLOT property will only be produced if there's
a file /sys/bus/pci/slots/<slotname> where <slotname> matches
the value of /sys/bus/pci/devices/.../function_id in 8 char
hex notation.

Fixes #19016
See also #19078
2021-04-02 18:08:23 +02:00
Zbigniew Jędrzejewski-Szmek
bd6ea22920
Merge pull request #18717 from yuwata/sd-device-monitor-introduce-more-filters
sd-device-monitor: introduce two new filters and use them in dissect-image.c
2021-04-02 15:53:16 +02:00
Carlo Teubner
6d3831cee5 docs: use current spelling "macOS" not "OS X" etc. 2021-04-02 10:53:26 +01:00
Yu Watanabe
0a8f9bc6bb dissect-image: move parent device check into device_is_partition()
Checking parent for enumerated devices is mostly redundant. Just for
safety.
2021-04-02 15:10:09 +09:00
Yu Watanabe
11368b694e dissect-image: also check devtype in device_is_partition()
This should be mostly redundant. Just for safety.
2021-04-02 15:10:09 +09:00
Yu Watanabe
210e1cd6e6 dissect-image: filter out enumerated or triggered devices without "partition" sysattr
This also adds more filters for device enumerator and monitor.
These newly added filters should be mostly redundant. But this hides
spurious error in sd_device_get_sysattr_value(). See,
https://github.com/systemd/systemd/pull/18684#discussion_r579700977
2021-04-02 15:10:09 +09:00
Yu Watanabe
def366933c test: add tests for filters of sd-device-monitor 2021-04-02 15:10:09 +09:00
Yu Watanabe
b8a0edbb2a sd-device-monitor: introduce sd_device_monitor_filter_add_match_parent() 2021-04-02 15:10:09 +09:00
Yu Watanabe
bcfe746ba7 sd-device-enumerator: also move match_parent() to device-util.[ch] 2021-04-02 15:10:09 +09:00
Yu Watanabe
d9b030b673 sd-device-monitor: introduce sd_device_monitor_filter_add_match_sysattr() 2021-04-02 15:10:09 +09:00
Yu Watanabe
ac790e8bfc sd-device-enumerator: move match_sysattr() to device-util.[ch]
It will be used by sd-device-monitor in later commits.
2021-04-02 15:10:07 +09:00
Yu Watanabe
112e6dd106 sd-device-monitor: split passes_filter() into two parts 2021-04-02 15:09:03 +09:00
Anita Zhang
080ca0d830 test-oomd-util: fix running in mkosi
When this test is run in mkosi, the previously tested cgroup that we write
xattrs into and the root cgroup are the same.

Since the root cgroup is a live cgroup anyways (vs. the test cgroups which are
remade each time) let's generate the expected preference values from reading
the xattrs instead of assuming it will be NONE.
2021-04-01 21:23:24 -07:00