1
0
mirror of https://github.com/systemd/systemd synced 2026-03-11 07:34:58 +01:00

Compare commits

..

3 Commits

Author SHA1 Message Date
Frantisek Sumsal
a174da59c2 coredump: omit coredump info when -q is used with the debug verb
Skip printing the coredump info table when using the `debug` verb in
combination with the `-q/--quiet` option. Useful when trying to gather
coredump info non-interactively via scripted gdb commands.

Fixes: systemd/systemd#18935
2021-03-10 17:35:21 +01:00
Frantisek Sumsal
5acfe54e98 test: fix permissions of the ASan udev workaround
otherwise udev complains about the file being world-writable:
systemd-udevd[228]: Configuration file /etc/udev/rules.d/00-set-LD_PRELOAD.rules is marked world-writable. Please remove world writability permission bits. Proceeding anyway.

Fixes: systemd/systemd-centos-ci#354
2021-03-11 00:28:13 +09:00
Zbigniew Jędrzejewski-Szmek
451ba55fec Revert "udev: do not execute hwdb builtin import twice or thrice"
This reverts commit 876c75fe870846b09b54423a6b719d80bc879b27.

The patch seems to cause usb devices to get some attributes set from the parent
PCI device. 'hwdb' builtin has support for breaking iteration upwards on usb
devices. But when '--subsystem=foo' is specified, iteration is continued. I'm
sure it *could* be figured out, but it seems hard to get all the combinations
correct. So let's revert to functional status quo ante, even if does the lookup
more than once unnecessarily.

Fixes #18125.
2021-03-10 15:26:45 +01:00
4 changed files with 8 additions and 7 deletions

View File

@ -10,9 +10,8 @@ SUBSYSTEM=="virtio-ports", KERNEL=="vport*", ATTR{name}=="?*", SYMLINK+="virtio-
SUBSYSTEM=="rtc", ATTR{hctosys}=="1", SYMLINK+="rtc" SUBSYSTEM=="rtc", ATTR{hctosys}=="1", SYMLINK+="rtc"
SUBSYSTEM=="rtc", KERNEL=="rtc0", SYMLINK+="rtc", OPTIONS+="link_priority=-100" SUBSYSTEM=="rtc", KERNEL=="rtc0", SYMLINK+="rtc", OPTIONS+="link_priority=-100"
SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", IMPORT{builtin}="usb_id", IMPORT{builtin}="hwdb --subsystem=usb", GOTO="default_hwdb_imported" SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", IMPORT{builtin}="usb_id", IMPORT{builtin}="hwdb --subsystem=usb"
ENV{MODALIAS}!="", IMPORT{builtin}="hwdb --subsystem=$env{SUBSYSTEM}" ENV{MODALIAS}!="", IMPORT{builtin}="hwdb --subsystem=$env{SUBSYSTEM}"
LABEL="default_hwdb_imported"
ACTION!="add", GOTO="default_end" ACTION!="add", GOTO="default_end"

View File

@ -4,9 +4,8 @@ ACTION=="remove", GOTO="serial_end"
SUBSYSTEM!="tty", GOTO="serial_end" SUBSYSTEM!="tty", GOTO="serial_end"
SUBSYSTEMS=="pci", ENV{ID_BUS}="pci", ENV{ID_VENDOR_ID}="$attr{vendor}", ENV{ID_MODEL_ID}="$attr{device}" SUBSYSTEMS=="pci", ENV{ID_BUS}="pci", ENV{ID_VENDOR_ID}="$attr{vendor}", ENV{ID_MODEL_ID}="$attr{device}"
# We already ran the hwdb builtin for devices with MODALIAS in 50-default.rules. SUBSYSTEMS=="pci", IMPORT{builtin}="hwdb --subsystem=pci"
# Let's cover the remaining case here, where we walk up the tree to find a node with $MODALIAS. SUBSYSTEMS=="usb", IMPORT{builtin}="usb_id", IMPORT{builtin}="hwdb --subsystem=usb"
ENV{MODALIAS}=="", SUBSYSTEMS=="pci", IMPORT{builtin}="hwdb --subsystem=pci"
# /dev/serial/by-path/, /dev/serial/by-id/ for USB devices # /dev/serial/by-path/, /dev/serial/by-id/ for USB devices
KERNEL!="ttyUSB[0-9]*|ttyACM[0-9]*", GOTO="serial_end" KERNEL!="ttyUSB[0-9]*|ttyACM[0-9]*", GOTO="serial_end"

View File

@ -1078,8 +1078,10 @@ static int run_debug(int argc, char **argv, void *userdata) {
if (r < 0) if (r < 0)
return r; return r;
print_info(stdout, j, false); if (!arg_quiet) {
fputs("\n", stdout); print_info(stdout, j, false);
fputs("\n", stdout);
}
r = sd_journal_get_data(j, "COREDUMP_EXE", (const void**) &data, &len); r = sd_journal_get_data(j, "COREDUMP_EXE", (const void**) &data, &len);
if (r < 0) if (r < 0)

View File

@ -744,6 +744,7 @@ mkdir -p /etc/udev/rules.d
cat > /etc/udev/rules.d/00-set-LD_PRELOAD.rules << INNER_EOF cat > /etc/udev/rules.d/00-set-LD_PRELOAD.rules << INNER_EOF
SUBSYSTEM=="block", ENV{LD_PRELOAD}="$ASAN_RT_PATH" SUBSYSTEM=="block", ENV{LD_PRELOAD}="$ASAN_RT_PATH"
INNER_EOF INNER_EOF
chmod 0644 /etc/udev/rules.d/00-set-LD_PRELOAD.rules
# The 'mount' utility doesn't behave well under libasan, causing unexpected # The 'mount' utility doesn't behave well under libasan, causing unexpected
# fails during boot and subsequent test results check: # fails during boot and subsequent test results check: