]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
5 years agoMerge pull request #19237 from yuwata/udev-builtin-net-id-follow-ups-for-19017
Zbigniew Jędrzejewski-Szmek [Thu, 8 Apr 2021 12:37:02 +0000 (14:37 +0200)] 
Merge pull request #19237 from yuwata/udev-builtin-net-id-follow-ups-for-19017

udev: fix several issues around hotplug slot detection

5 years agoin-addr-util: suppress LGTM warning about htobe32 19243/head
Luca Boccassi [Wed, 7 Apr 2021 22:08:34 +0000 (23:08 +0100)] 
in-addr-util: suppress LGTM warning about htobe32

We are not calling it directly, it's coming from a standard library
macro, so just suppress it.

5 years agoerrno-util: suppress LGTM warning about strerror
Luca Boccassi [Wed, 7 Apr 2021 22:06:24 +0000 (23:06 +0100)] 
errno-util: suppress LGTM warning about strerror

5 years agoscsi_id: modernize and use extract_many_words instead of strsep
Luca Boccassi [Wed, 7 Apr 2021 21:58:12 +0000 (22:58 +0100)] 
scsi_id: modernize and use extract_many_words instead of strsep

Also use standard error loggin/return pattern.

Only cursory tested, by checking that with a simple config file
the array is the same before/after. Not tested with actual scsi
rules and devices, due to missing hardware.

5 years agotest-extract-word: add a couple more corner cases
Luca Boccassi [Wed, 7 Apr 2021 21:52:32 +0000 (22:52 +0100)] 
test-extract-word: add a couple more corner cases

5 years agotimedated: use format_timestamp instead of ctime
Luca Boccassi [Sat, 3 Apr 2021 13:46:46 +0000 (14:46 +0100)] 
timedated: use format_timestamp instead of ctime

Some static analyzers (lgtm) warn against using non-re-entrant functions,
even though at the moment this code is not multi-threaded, just switch to
format_timestamp.

5 years agomeson: re-enable -Wmaybe-uninitialized on -O[02] with recent gcc versions 19226/head
Zbigniew Jędrzejewski-Szmek [Wed, 31 Mar 2021 15:05:49 +0000 (17:05 +0200)] 
meson: re-enable -Wmaybe-uninitialized on -O[02] with recent gcc versions

The warning was disabled in 8794164fed5f0142c34358613f92f4f761af4edd to avoid
false positives. But it is useful in finding errors, even if it sometimes
results in untrue warnings (c.f. 77fac974feda46a1bc3c).

After #19168, #19169, and #19175, there are no warnings with
-Dbuildtype=debug-optimized/-O2 and gcc-11.0.1-0.3.fc34.x86_64. Warnings
are reenabled for -O[23]

-O0 is good for development, and -O2 is the default optimization level for
Fedora package builds. -Os, -O3, -O1, and -Og still generate some warnings. In
fact, with -Os the number of warnings seems completely hopeless. Dozens and
dozens.

5 years agohome: use goto to make it clear that variables are initialized
Zbigniew Jędrzejewski-Szmek [Thu, 8 Apr 2021 10:57:23 +0000 (12:57 +0200)] 
home: use goto to make it clear that variables are initialized

gcc-11.0.1-0.3.fc34.x86_64 with -Og was complaining that 'r' might be
unitialized. It cannot, but let's rework the code to use a goto instead of
conditionalizing on 'call' being unset, which I think is clearer and less error
prone. This silences the warning.

5 years agobasic/strbuf: use _cleanup_
Zbigniew Jędrzejewski-Szmek [Thu, 8 Apr 2021 10:54:55 +0000 (12:54 +0200)] 
basic/strbuf: use _cleanup_

5 years agotimedatectl: rework handling of conditions in print_status_info()
Zbigniew Jędrzejewski-Szmek [Wed, 7 Apr 2021 15:31:34 +0000 (17:31 +0200)] 
timedatectl: rework handling of conditions in print_status_info()

gcc-11.0.1-0.3.fc34.x86_64 was complaining that n might be unset with
--optimization=1. It was wrong, but let's rework the code to make it
obvious that it is always set.

5 years agoTEST-33-CLEAN-UNIT: fix broken test exposed by condition check fix
Zbigniew Jędrzejewski-Szmek [Wed, 7 Apr 2021 22:09:38 +0000 (00:09 +0200)] 
TEST-33-CLEAN-UNIT: fix broken test exposed by condition check fix

5 years agoTEST-22-TMPFILES: fix broken test exposed by condition check fix
Zbigniew Jędrzejewski-Szmek [Wed, 7 Apr 2021 21:32:14 +0000 (23:32 +0200)] 
TEST-22-TMPFILES: fix broken test exposed by condition check fix

5 years agotests: make inverted tests actually count
Zbigniew Jędrzejewski-Szmek [Wed, 7 Apr 2021 21:24:25 +0000 (23:24 +0200)] 
tests: make inverted tests actually count

"! test ..." does not cause the script to fail, even with set -e.
IIUC, bash treats this command as part of an expression line, as it
would if 'test ... && ...' was used. Failing expression lines do not
terminate the script.

This fixes the obvious cases by changing '! test' → 'test !'.
Then the inversion happens internally in test and bash will propagate
the failure.

5 years agoTEST-22-TMPFILES: add reproducer for bug with X 19164/head
Zbigniew Jędrzejewski-Szmek [Wed, 7 Apr 2021 20:35:19 +0000 (22:35 +0200)] 
TEST-22-TMPFILES: add reproducer for bug with X

5 years agoman: fix quickhelp listing in tmpfiles.d(5)
Zbigniew Jędrzejewski-Szmek [Wed, 7 Apr 2021 16:26:15 +0000 (18:26 +0200)] 
man: fix quickhelp listing in tmpfiles.d(5)

Unlike many other small/big letter combos, this one has the recursive
version attached to the lowercase letter.

5 years agotmpfiles: rework condition check
Zbigniew Jędrzejewski-Szmek [Wed, 7 Apr 2021 15:54:49 +0000 (17:54 +0200)] 
tmpfiles: rework condition check

(!a && b) || (a && c) is replaced by (a ? c : b).

path_startswith() != NULL is need to avoid type warning.

5 years agotmpfiles: use a entry in hashmap as ItemArray in read_config_file()
Masahiro Matsuya [Wed, 31 Mar 2021 02:44:24 +0000 (11:44 +0900)] 
tmpfiles: use a entry in hashmap as ItemArray in read_config_file()

[zjs: squash commits and use size_t as appropriate.

Bug seems to have been introduced in 811a15877825da9e53f9a2a8603da34589af6bbb.
Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1944468.]

5 years agocore: fix memleak of ipc_namespace_path
Zbigniew Jędrzejewski-Szmek [Wed, 7 Apr 2021 14:18:53 +0000 (16:18 +0200)] 
core: fix memleak of ipc_namespace_path

Fixup for a70581ffb5c13c91c76ff73ba6f5f3ff59c5a915.
Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=32991

5 years agoMerge pull request #19231 from bluca/coredump_decode
Luca Boccassi [Wed, 7 Apr 2021 21:06:26 +0000 (22:06 +0100)] 
Merge pull request #19231 from bluca/coredump_decode

coredump: follow-ups for #19135

5 years agoudev: use snprintf_ok() 19237/head
Yu Watanabe [Wed, 7 Apr 2021 13:22:22 +0000 (22:22 +0900)] 
udev: use snprintf_ok()

5 years agoudev: fix potential infinite loop
Yu Watanabe [Wed, 7 Apr 2021 13:36:12 +0000 (22:36 +0900)] 
udev: fix potential infinite loop

5 years agoudev: make dev_pci_slot() return earlier when PCI bridge is found
Yu Watanabe [Wed, 7 Apr 2021 13:26:41 +0000 (22:26 +0900)] 
udev: make dev_pci_slot() return earlier when PCI bridge is found

5 years agoudev: use uint32_t for hotplug_slot
Yu Watanabe [Wed, 7 Apr 2021 10:17:23 +0000 (19:17 +0900)] 
udev: use uint32_t for hotplug_slot

This also makes function id is parsed as uint64_t. Kernel internally
uses uint32_t for function id (see the definition of 'struct zpci_dev),
but it maybe extended in the future.

5 years agoudev: split out logic of parsing s390 PCI slots
Yu Watanabe [Wed, 7 Apr 2021 13:11:00 +0000 (22:11 +0900)] 
udev: split out logic of parsing s390 PCI slots

This also adds several debugging logs.

5 years agoudev: it is not necessary that the path is readable
Yu Watanabe [Wed, 7 Apr 2021 10:19:45 +0000 (19:19 +0900)] 
udev: it is not necessary that the path is readable

5 years agoudev: add missing initialization to fix freeing invalid address
Yu Watanabe [Wed, 7 Apr 2021 10:09:50 +0000 (19:09 +0900)] 
udev: add missing initialization to fix freeing invalid address

5 years agomkosi: work-around to make systemd build in Fedora images that lack populated /etc
Lennart Poettering [Thu, 1 Apr 2021 15:58:54 +0000 (17:58 +0200)] 
mkosi: work-around to make systemd build in Fedora images that lack populated /etc

On Fedora /usr/bin/ld is a symlink managed via the "alternatives"
system. This unfortunately means the binary is not usable in
environments where /var or /etc are unpopulated. Let's address this by
redirecting "ld" to "ld.bfd" manually if such an environment is
detected, via $PATH.

This is useful for building systemd in mkosi with UsrOnly=1 set.

5 years agoshared/format-table: use goto to make code flow clear
Zbigniew Jędrzejewski-Szmek [Wed, 7 Apr 2021 15:01:50 +0000 (17:01 +0200)] 
shared/format-table: use goto to make code flow clear

gcc 9.3.0 "cc (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0" with --optimization=1 was
not able to figure out that all cases are covered because r is either set in
the switch or type < _TABLE_DATA_TYPE_MAX.

But for a human reader this might also not be obvious: the cases are not in
exactly the same order as enum definitions, and it's a long list. By using the
goto, there should be no doubt, and we avoid checking the condition a second
time.

5 years agoshared/format-table: rework loop
Zbigniew Jędrzejewski-Szmek [Wed, 7 Apr 2021 14:55:27 +0000 (16:55 +0200)] 
shared/format-table: rework loop

Not a big difference, but I think it's a bit nicer this way.

5 years agoproc-cmdline: allow backslash escapes when parsing /proc/cmdline
Lennart Poettering [Tue, 6 Apr 2021 09:45:47 +0000 (11:45 +0200)] 
proc-cmdline: allow backslash escapes when parsing /proc/cmdline

So far when parsing /proc/cmdline we'd consider backslashes as
mechanisms for escaping whitepace or quotes. This changes things so that
they are retained as they are instead. The kernel itself doesn't allow such
escaping, and hence we shouldn't do so either (see lib/cmdline.c in the
kernel sources; it does support "" quotes btw).

This fix is useful to allow specifying backslash escapes in the "root="
cmdline option to be passed through to systemd-fstab-generator. Example:

    root=/dev/disk/by-partlabel/Root\x20Partition

Previously we'd eat up the "\" so that we'd then look for a device
/dev/disk/by-partlabel/Rootx20Partition which never shows up.

5 years agosd-bus: make sd_bus_error_set() more like sd_bus_error_setfv()
Zbigniew Jędrzejewski-Szmek [Wed, 7 Apr 2021 13:54:26 +0000 (15:54 +0200)] 
sd-bus: make sd_bus_error_set() more like sd_bus_error_setfv()

In b9c19bc384fd41c173a8e453bd157544400af059, I added an assert to _setfv() and
_setf(), but I forgot to do the same in _set(). Let's do this for completeness.

While at it, restructure _set() to use the same style as _setfv().

5 years agotree-wide: sd_bus_error_setf → set_bus_error_set
Zbigniew Jędrzejewski-Szmek [Wed, 7 Apr 2021 13:59:27 +0000 (15:59 +0200)] 
tree-wide: sd_bus_error_setf → set_bus_error_set

strdup() is more efficient than asprintf().

5 years agotree-wide: use the same comment for work-around initializations
Zbigniew Jędrzejewski-Szmek [Wed, 7 Apr 2021 12:22:30 +0000 (14:22 +0200)] 
tree-wide: use the same comment for work-around initializations

This should make it easier to remove those warnings when the compiler
gets smarter. Not sure if I got them all...

Double space before the comment start to make it easier to separate from the
preceding line.

5 years agocoredump: update and shorten package metadata keys 19231/head
Luca Boccassi [Wed, 7 Apr 2021 09:56:14 +0000 (10:56 +0100)] 
coredump: update and shorten package metadata keys

Follow-up for a7ea0a460bb3

5 years agocoredump: use path_equal_filename helper
Luca Boccassi [Wed, 7 Apr 2021 09:47:14 +0000 (10:47 +0100)] 
coredump: use path_equal_filename helper

5 years agobasic: add path_equal_filename helper
Luca Boccassi [Wed, 7 Apr 2021 09:45:33 +0000 (10:45 +0100)] 
basic: add path_equal_filename helper

5 years agocoredumpctl: fetch JSON object by key instead of iterating
Luca Boccassi [Wed, 7 Apr 2021 09:38:56 +0000 (10:38 +0100)] 
coredumpctl: fetch JSON object by key instead of iterating

Follow-up for d1b5a0c691

5 years agocoredump: fetch JSON object by key instead of iterating
Luca Boccassi [Wed, 7 Apr 2021 09:35:34 +0000 (10:35 +0100)] 
coredump: fetch JSON object by key instead of iterating

Follow-up for c546154a4448ddf9

5 years agocoredump: rename COREDUMP_PKGMETA_ fields to COREDUMP_PACKAGE_
Luca Boccassi [Wed, 7 Apr 2021 09:31:31 +0000 (10:31 +0100)] 
coredump: rename COREDUMP_PKGMETA_ fields to COREDUMP_PACKAGE_

Follow-up for c546154a4448ddf9

5 years agocoredump: use JSON helpers instead of creating objects manually
Luca Boccassi [Wed, 7 Apr 2021 09:21:48 +0000 (10:21 +0100)] 
coredump: use JSON helpers instead of creating objects manually

Follow-up for 95f71807733

5 years agocoredump: fix style nits
Luca Boccassi [Wed, 7 Apr 2021 09:16:54 +0000 (10:16 +0100)] 
coredump: fix style nits

Follow-up for 95f71807733

5 years agocoredump: use set_put_strdup()
Luca Boccassi [Wed, 7 Apr 2021 09:15:20 +0000 (10:15 +0100)] 
coredump: use set_put_strdup()

Follow-up for 95f71807733

5 years agocoredump: fix typo
Luca Boccassi [Wed, 7 Apr 2021 09:15:01 +0000 (10:15 +0100)] 
coredump: fix typo

Follow-up for 95f71807733

5 years agosd-device: small modernization
Zbigniew Jędrzejewski-Szmek [Wed, 7 Apr 2021 12:33:25 +0000 (14:33 +0200)] 
sd-device: small modernization

5 years agoshared/base-filesystem: modernization
Zbigniew Jędrzejewski-Szmek [Wed, 7 Apr 2021 11:15:28 +0000 (13:15 +0200)] 
shared/base-filesystem: modernization

5 years agoman/systemd-cryptenroll: Fix sd-boot manvolnum from 8 to 7
Morten Linderud [Wed, 7 Apr 2021 10:10:10 +0000 (12:10 +0200)] 
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>
5 years agoBump test-random-util timeout
Luca Boccassi [Tue, 6 Apr 2021 19:24:17 +0000 (20:24 +0100)] 
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.

5 years agoMerge pull request #19135 from bluca/coredump_decode
Zbigniew Jędrzejewski-Szmek [Wed, 7 Apr 2021 05:41:16 +0000 (07:41 +0200)] 
Merge pull request #19135 from bluca/coredump_decode

coredump: parse build-id and .note.package

5 years agohwdb: add database entries for node with single unit for multiple functions 19124/head
Takashi Sakamoto [Wed, 7 Apr 2021 02:49:22 +0000 (11:49 +0900)] 
hwdb: add database entries for node with single unit for multiple functions

Avid Adrenarine and Mojo has configuration ROM in which single unit exists
in root directory, however the unit has both video and audio functions.

For the case, it's better to distinguish from the case of composite node.
This commit adds database entries for them.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
5 years agohwdb: add database entries for node with multiple units
Takashi Sakamoto [Wed, 7 Apr 2021 02:49:22 +0000 (11:49 +0900)] 
hwdb: add database entries for node with multiple units

In IEEE 1394 bus, one node can include multiple units, which represent
certain functions such as video and audio. Although it's possible to
distinguish each unit, Linux FireWire character device corresponding to
the node can not have multiple group owners, therefore it's forced to
select one of the units as representative for function.

This commit adds database entries for units belongs to the same node.
The entries are aligned to inverse order of corresponding unit order
in configuration ROM to select the first unit as the representative.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
5 years agohwdb: add database entry for node with single unit with video function
Takashi Sakamoto [Wed, 7 Apr 2021 02:49:22 +0000 (11:49 +0900)] 
hwdb: add database entry for node with single unit with video function

Cool Stream shipped iSweet. This model has single unit for video function.

This commit adds database entry for it as sample of node with single unit
for video.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
5 years agohwdb: add database entries for TC Electronic PowerCore FireWire series
Takashi Sakamoto [Wed, 7 Apr 2021 02:49:22 +0000 (11:49 +0900)] 
hwdb: add database entries for TC Electronic PowerCore FireWire series

TC Electronic had PowerCore platform for products of digital audio signal
processing. This platform consists of NXP PowerQUICC II Processor with PCI
interface (XPC8245, MPC8245), Xilinx Spartan-II FPGA (XC2S50), and some
NXP 24-Bit Audio Digital Signal Processor (DSP56367). The products for
IEEE 1394 bus has additional TI OHCI 1.1, 1394a link layer controller
(TSB43AB23).

The content of configuration ROM has layout of standard of 1394 Trading
Association.

This commit adds database entries for the models. At present, no driver is
developed, thus this is just for convenience to developers.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
5 years agohwdb: add database entries for Focusrite Liquid Mix series
Takashi Sakamoto [Wed, 7 Apr 2021 02:49:22 +0000 (11:49 +0900)] 
hwdb: add database entries for Focusrite Liquid Mix series

Sintefex Audio Lda. designed Liquid Mix as OEM of Focusrite Audio
Engineering, Ltd. The models serve digital signal processing service via
asynchronous transaction in IEEE 1394 bus.

The content of configuration ROM is not standard of 1394 Trading
Association.

This commit adds an rule entry for the models. At present, no driver is
developed, thus this is just for convenience to developers.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
5 years agohwdb: add database entries for Yamaha mLAN 3rd generation
Takashi Sakamoto [Wed, 7 Apr 2021 02:49:22 +0000 (11:49 +0900)] 
hwdb: add database entries for Yamaha mLAN 3rd generation

TC Applied Technologies designed DiceII ASIC to adapt to two protocols.
One of the protocol is mLAN defined by Yamaha Corporation, and another
is own protocol. The DiceII ASIC adapted to mLAN protocol was used some
products by Yamaha and its child company, Steinberg.

The content of configuration ROM for the models has completely different
layout from the one defined by 1394 Trading Association.

This commit adds an udev rule for the models. At present, no driver is
developed, thus this is just for convenience to developers.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
5 years agohwdb: add database entries for Yamaha mLAN 2nd generation
Takashi Sakamoto [Wed, 7 Apr 2021 02:49:22 +0000 (11:49 +0900)] 
hwdb: add database entries for Yamaha mLAN 2nd generation

Yamaha Corporation designed mLAN protocol based on IEEE 1394
specification. Yamaha developed specific ICs for the purpose (mLAN-NC1
and mLAN-PH2), and shipped some products with them, as well as OEM.

The content of configuration ROM is completely different from standard
layout defined by 1394 Trading Association.

This commit adds database entries for the models. At present, two vendors
are known for models with mLAN IC. At present, no driver is developed
for the models, thus this is just for convenience to developers.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
5 years agohwdb: add database entries for RME Fireface series
Takashi Sakamoto [Wed, 7 Apr 2021 02:49:22 +0000 (11:49 +0900)] 
hwdb: add database entries for RME Fireface series

RME GmbH shipped Fireface series. The configuration ROM in the models of
series has some quirks and against standard of 1394 Trading Association.

This commit adds database entries for the models. ALSA fireface driver
supports them, but expects userspace application to control them.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
5 years agohwdb: add database entries for MOTU FireWire series
Takashi Sakamoto [Wed, 7 Apr 2021 02:49:22 +0000 (11:49 +0900)] 
hwdb: add database entries for MOTU FireWire series

Mark of the unicorn (MOTU) shipped FireWire series. The configuration ROM
in the models of series has some quirks and against standard of 1394
Trading Association.

This commit adds database entries for the models. ALSA firewire-motu driver
supports them, but expects userspace application to control them.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
5 years agohwdb: add database entries for Tascam FireWire series
Takashi Sakamoto [Wed, 7 Apr 2021 02:49:22 +0000 (11:49 +0900)] 
hwdb: add database entries for Tascam FireWire series

TEAC Corporation shipped FireWire series in its TASCAM brand. The
configuration ROM in the models of series has some quirks and against
standard of 1394 Trading Association.

This commit adds database entries for the models. ALSA firewire-tascam
driver supports them, but expects userspace application to control them.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
5 years agohwdb: add database entries for models of Digidesign Digi 00x family
Takashi Sakamoto [Wed, 7 Apr 2021 02:49:22 +0000 (11:49 +0900)] 
hwdb: add database entries for models of Digidesign Digi 00x family

Avid Audio shipped Digi 00x family in its Digidesign brand. The
configuration ROM in the models of family has some quirks and against
standard of 1394 Trading Association.

This commit adds database entries for the model. ALSA firewire-digi00x
driver supports them, but expects userspace application to control them.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
5 years agohwdb: add database entries for models based on DICE ASICs specialized by Solid State...
Takashi Sakamoto [Wed, 7 Apr 2021 02:49:22 +0000 (11:49 +0900)] 
hwdb: add database entries for models based on DICE ASICs specialized by Solid State Logic

Solid State Logic, Ltd. shipped some models based on DICE ASICs. The
content of configuration ROM has a quirk that the value of category
field is unique (0x51 or 0x52).

This commit adds database entries for the models. ALSA dice driver supports
them, but expects userspace application to control them.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
5 years agohwdb: add database entries for models based on DICE ASICs specialized by Harman Music...
Takashi Sakamoto [Wed, 7 Apr 2021 02:49:22 +0000 (11:49 +0900)] 
hwdb: add database entries for models based on DICE ASICs specialized by Harman Music Group

Harman International Industries, Inc. shipped some models based on DICE
ASICs in its Lexicon brand. The content of configuration ROM has a quirk
that the value of category field is unique (0x20).

This commit adds database entries for the models. ALSA dice driver supports
them, but expects userspace application to control them.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
5 years agohwdb: add database entries for models based on DICE ASICs specialized by Loud Technol...
Takashi Sakamoto [Wed, 7 Apr 2021 02:49:22 +0000 (11:49 +0900)] 
hwdb: add database entries for models based on DICE ASICs specialized by Loud Technologies

LOUD Audio, LLC (formerly known as LOUD Technologies, Inc.) shipped some
models based on DICE ASICs in its Mackie brand. The content of
configuration ROM has a quirk that the value of category field is unique
(0x10).

This commit adds database entries for the models. ALSA dice driver supports
them, but expects userspace application to control them.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
5 years agohwdb: add database entries for models based on DICE ASICs specialized to Weiss Engine...
Takashi Sakamoto [Wed, 7 Apr 2021 02:49:22 +0000 (11:49 +0900)] 
hwdb: add database entries for models based on DICE ASICs specialized to Weiss Engineering

Weiss Engineering Ltd. shipped some models based on DICE ASICs. The
content of configuration ROM has a quirk that the value of category
field is unique (0x00).

This commit adds database entries for the models. ALSA dice driver supports
them, but expects userspace application to control them.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
5 years agohwdb: add database entries for models based on DICE ASICs specialized to M-Audio
Takashi Sakamoto [Wed, 7 Apr 2021 02:49:22 +0000 (11:49 +0900)] 
hwdb: add database entries for models based on DICE ASICs specialized to M-Audio

M-Audio shipped some models based on DICE ASICs. The content of
configuration ROM has a quirk that the value of version field in unit
directory is different from the one in TCAT specification (0x000001).

This commit adds database entries for the models. ALSA dice driver supports
them, but expects userspace application to control them.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
5 years agohwdb: add database entries for models based on DICE ASICs with TCAT specification
Takashi Sakamoto [Wed, 7 Apr 2021 02:49:22 +0000 (11:49 +0900)] 
hwdb: add database entries for models based on DICE ASICs with TCAT specification

TC Applied Technologies designed the series of ASIC for audio and music
data transmission in several types of communication bus. It's named as
Digital Interface Communication Engine (DICE). Four ASICs are known in
the series for IEEE 1394 bus; Dice II, TCD2210 (Dice Jr.), TCD2220 (Dice
Mini), and TCD3070 (DiceIII).

The content of configuration ROM in products based on DICE ASICs is
known against specification defined by 1394 Trading Association.

This commit adds database entries for models without any customization by
vendors. In TCAT specification, The value of GUID field is split to four
parts; 24-bit OUI, 8-bit category, 10-bit product ID, and 22-bit serial
number in the order. In the specification, the value of category field is
fixed to 0x04. The root directory includes leaf entries for vendor and
model names. Although the specifier_id field in unit directory differs
depending on vendors, the version field in unit directory is fixed to
0x000001. ALSA dice driver supports them, but expects userspace
application to control them.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
5 years agohwdb: add database entries for models with OXFW970/971 ASICs
Takashi Sakamoto [Wed, 7 Apr 2021 02:49:22 +0000 (11:49 +0900)] 
hwdb: add database entries for models with OXFW970/971 ASICs

Once Oxford Semiconductor designed FW970 and FW971 ASICs as Multi-Channel
Isochronous Streaming FireWire Audio Controller. Some vendors used them
in their products for audio and music units.

The content of configuration ROM has standard layout of 1394 Trading
Association with an additional Dependent Information directory.

This commit adds database entries for the known models. ALSA oxfw
driver supports them, but expects userspace application to control them.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
5 years agohwdb: add database entries for models with Fireworks board module
Takashi Sakamoto [Wed, 7 Apr 2021 02:49:22 +0000 (11:49 +0900)] 
hwdb: add database entries for models with Fireworks board module

Echo Audio Corporation designed Fireworks board module. The module is used
by several vendors for models.

The content of configuration ROM in the models s some quirks and against
standard of 1394 Trading Association.

This commit adds database entries for the model. ALSA fireworks driver
supports them but expects userspace application to control them.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
5 years agohwdb: add database entries for models with ASICs in BeBoB solution
Takashi Sakamoto [Wed, 7 Apr 2021 02:49:22 +0000 (11:49 +0900)] 
hwdb: add database entries for models with ASICs in BeBoB solution

ArchWave AG, formerly known as BridgeCo. AG, designed DM1000, DM1100, and
DM1500 ASICs for BridgeCo. Enhancement BreakOut Box (BeBoB) solution.
They were used for many models shipped by many vendors.

The content of configuration ROM has standard layout of 1394 Trading
Association with an additional Dependent Information directory.

This commit adds database entries for the known models. ALSA bebob
driver supports them, but expects userspace application to control them.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
5 years agohwdb: allow parser to expect usage of slash sign in value of property
Takashi Sakamoto [Wed, 7 Apr 2021 02:49:22 +0000 (11:49 +0900)] 
hwdb: allow parser to expect usage of slash sign in value of property

Although in IEEE 1394 unit function list I have a plan to use slash sign
in name of property, current implementation of parser doesn't allow it.
When parsing current entries in database excluded from parser testing, we
can find usage of slash sign in name of property.

This commit adds slash sign in allow list of the parser for my
convenience.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
5 years agohwdb: add parser grammar for IEEE 1394 unit function list
Takashi Sakamoto [Wed, 7 Apr 2021 02:49:22 +0000 (11:49 +0900)] 
hwdb: add parser grammar for IEEE 1394 unit function list

In added IEEE 1394 unit function list, I use custom key to detect unit
entries in node context. Although the list is not widely used in the most
of systemd users, I would like to add parser grammar for testing, by
borrowing a bit time in builders.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
5 years agohwdb: add hardware database for unit of IEEE 1394
Takashi Sakamoto [Wed, 7 Apr 2021 02:49:22 +0000 (11:49 +0900)] 
hwdb: add hardware database for unit of IEEE 1394

Current udev rules configures group owner of firewire character device
to video group, corresponding to nodes in IEEE 1394 in below cases:

1.the node with any unit for any minor version of IIDC version 1
  specification defined by 1394 Trading Association
2.the node with any unit for specification defined by Point Grey Research
3.the node with any unit for AV/C device v1.0 defined by 1394 Trading
  Association
4.the node with any unit for vendor-unique protocol defined by 1394
  Trading Association

Nevertheless, case 3 and 4 can cover the node with any unit for audio
function as well. In the cases, it's convenient to assign audio group.

Additionally, some nodes are known to have layout different from
the specification defined by 1394 Trading Association. In the case,
it's required to add rules specific to them.

Furthermore, some nodes have no fields for vendor name and model name in
configuration ROM. In the case, it's required to add entries to hardware
database for users convenience.

For the above reasons, this commit adds rules to use information in
hardware database for known units in IEEE 1394. One database entry
corresponds to one unit. Two types of key are used to match the unit;
customized key from node context, kernel modalias of unit context.
The entry has the type of function, at least. Supplementally, it has
vendor and model names.

For your information, below statements with Python pyparsing module are
expected to parse all of the custom key and module alias in the list:

```
subsystem_prefix = pp.Literal('ieee1394:').suppress()
hex_to_int = lambda a: int(a[0], 16)

node_prefix = pp.Literal('node:').suppress()
prefixed_lower_hex = pp.Combine(pp.Literal('0x') + pp.Word(pp.srange('[a-z0-9]'), exact=6)).setParseAction(hex_to_int)
ven_in_node = pp.dictOf(pp.Literal('ven'), prefixed_lower_hex)
mo_in_node = pp.dictOf(pp.Literal('mo'), prefixed_lower_hex)
unit_in_node = pp.Group(prefixed_lower_hex + pp.Literal(':').suppress() + prefixed_lower_hex)
units_in_node = pp.Group(pp.Literal('units') + pp.ZeroOrMore(pp.Literal('*')).suppress() + unit_in_node + pp.ZeroOrMore(pp.Literal('*')).suppress())
node_parser = subsystem_prefix + node_prefix + ven_in_node + pp.Optional(mo_in_node) + units_in_node

higher_hex = pp.Word(pp.srange('[A-Z0-9]'), exact=8).setParseAction(hex_to_int)
ven_in_unit = pp.dictOf(pp.Literal('ven'), higher_hex)
mo_literal_in_unit = pp.dictOf(pp.Literal('mo'), higher_hex)
mo_in_unit = pp.dictOf(pp.Literal('mo'), higher_hex ^ pp.Literal('*'))
sp_in_unit = pp.dictOf(pp.Literal('sp'), higher_hex)
ver_in_unit = pp.dictOf(pp.Literal('ver'), higher_hex)
unit_parser = subsystem_prefix + ven_in_unit + mo_in_unit + sp_in_unit + ver_in_unit

key_parser = node_parser ^ unit_parser
```

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
5 years agoAdd markdown doc about coredump package metadata 19135/head
Luca Boccassi [Tue, 6 Apr 2021 14:48:52 +0000 (15:48 +0100)] 
Add markdown doc about coredump package metadata

5 years agocoredumpctl: parse and print package metadata
Luca Boccassi [Tue, 6 Apr 2021 17:02:41 +0000 (18:02 +0100)] 
coredumpctl: parse and print package metadata

5 years agocoredump: parse and append package metadata to journal message
Luca Boccassi [Tue, 6 Apr 2021 17:24:01 +0000 (18:24 +0100)] 
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.

5 years agocoredump: parse .note.package ELF section
Luca Boccassi [Tue, 6 Apr 2021 17:21:48 +0000 (18:21 +0100)] 
coredump: parse .note.package ELF section

Parse the .note.package ELF section for each ELF object
contained in a core file, if present.

5 years agocoredump: parse build-id out of core file
Luca Boccassi [Thu, 18 Mar 2021 11:19:09 +0000 (11:19 +0000)] 
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.

5 years agoMerge pull request #19215 from braewoods/main
Luca Boccassi [Tue, 6 Apr 2021 17:52:11 +0000 (18:52 +0100)] 
Merge pull request #19215 from braewoods/main

hwdb: 60-keyboard:: Add quirks for 2 new HP laptops

5 years agotpm2-util: properly load tpm2 libraries befre unsealing
Lennart Poettering [Tue, 6 Apr 2021 09:46:19 +0000 (11:46 +0200)] 
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
5 years agorecovery-key: add some extra asserts
Lennart Poettering [Tue, 6 Apr 2021 09:45:54 +0000 (11:45 +0200)] 
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.

5 years agoresolve: copy rd flag from the query to response
KoyamaSohei [Sat, 3 Apr 2021 16:13:37 +0000 (01:13 +0900)] 
resolve: copy rd flag from the query to response

5 years agobash-completion: localize words and cword variables
Sibo Dong [Sat, 3 Apr 2021 03:33:59 +0000 (23:33 -0400)] 
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.

5 years agosysusers/firstboot: temporarily disable LoadCredential
Luca Boccassi [Fri, 2 Apr 2021 15:30:43 +0000 (16:30 +0100)] 
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

5 years agoupdate
Lennart Poettering [Tue, 6 Apr 2021 09:45:27 +0000 (11:45 +0200)] 
update

5 years agohwdb: 60-keyboard:: Add HP ProBook 455 G5 hotkey quirks 19215/head
James Buren [Tue, 6 Apr 2021 07:18:26 +0000 (02:18 -0500)] 
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.

5 years agohwdb: 60-keyboard:: Add HP mt44 Mobile Thin Client hotkey quirks
James Buren [Tue, 6 Apr 2021 06:32:37 +0000 (01:32 -0500)] 
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.

5 years agoqrcode-util: set case-sensitive for generating QR codes
Gibeom Gwon [Mon, 5 Apr 2021 14:11:23 +0000 (23:11 +0900)] 
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.

5 years agotest-firewall-util: skip if iptables nat table does not exist
Anita Zhang [Fri, 2 Apr 2021 09:49:37 +0000 (02:49 -0700)] 
test-firewall-util: skip if iptables nat table does not exist

5 years agoMerge pull request #19126 from anitazha/oomdimprovements
Zbigniew Jędrzejewski-Szmek [Tue, 6 Apr 2021 05:59:59 +0000 (07:59 +0200)] 
Merge pull request #19126 from anitazha/oomdimprovements

systemd-oomd post-test week improvements

5 years agotest: check if the unit file fuzzer corpora is up to date
Frantisek Sumsal [Fri, 2 Apr 2021 17:51:44 +0000 (19:51 +0200)] 
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.

5 years agooomd: threshold swap kill candidates to usages of more than 5% 19126/head
Anita Zhang [Fri, 26 Mar 2021 09:37:01 +0000 (02:37 -0700)] 
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

5 years agooomd: don't get pressure candidates on every interval
Anita Zhang [Fri, 26 Mar 2021 08:53:15 +0000 (01:53 -0700)] 
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

5 years agofuzzer: add a test case for #19178
Frantisek Sumsal [Fri, 2 Apr 2021 16:07:26 +0000 (18:07 +0200)] 
fuzzer: add a test case for #19178

5 years agoMerge pull request #19179 from anitazha/buildandtest
Luca Boccassi [Fri, 2 Apr 2021 16:56:13 +0000 (17:56 +0100)] 
Merge pull request #19179 from anitazha/buildandtest

test-oomd-util: fix running in mkosi

5 years agoudev: fix slot based network names on s390
Viktor Mihajlovski [Thu, 18 Mar 2021 10:03:34 +0000 (11:03 +0100)] 
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

5 years agoMerge pull request #18717 from yuwata/sd-device-monitor-introduce-more-filters
Zbigniew Jędrzejewski-Szmek [Fri, 2 Apr 2021 13:53:16 +0000 (15:53 +0200)] 
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

5 years agodocs: use current spelling "macOS" not "OS X" etc.
Carlo Teubner [Fri, 2 Apr 2021 08:03:02 +0000 (09:03 +0100)] 
docs: use current spelling "macOS" not "OS X" etc.

5 years agodissect-image: move parent device check into device_is_partition() 18717/head
Yu Watanabe [Sun, 21 Feb 2021 02:11:28 +0000 (11:11 +0900)] 
dissect-image: move parent device check into device_is_partition()

Checking parent for enumerated devices is mostly redundant. Just for
safety.

5 years agodissect-image: also check devtype in device_is_partition()
Yu Watanabe [Sun, 21 Feb 2021 02:16:18 +0000 (11:16 +0900)] 
dissect-image: also check devtype in device_is_partition()

This should be mostly redundant. Just for safety.

5 years agodissect-image: filter out enumerated or triggered devices without "partition" sysattr
Yu Watanabe [Sun, 21 Feb 2021 02:00:19 +0000 (11:00 +0900)] 
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

5 years agotest: add tests for filters of sd-device-monitor
Yu Watanabe [Wed, 24 Feb 2021 05:05:03 +0000 (14:05 +0900)] 
test: add tests for filters of sd-device-monitor