Bug#923559: systemd-udevd: writes to kernel log
Am 05.03.19 um 12:43 schrieb Michael Biebl: > Am 03.03.19 um 23:27 schrieb Thorsten Glaser: >> Could you please, at least, forward the attached patch upstream, >> if you’re not willing to maintain it downstream? > > Sure. To do that, can you please provide a git formatted patch against > the upstream sources. > You probably want to add a bit more context to the commit message, so > upstream has a better idea what this patch is actually for. I would also kindly ask you to subscribe to the upstream pull request. If upstream has follow-up questions, it's best if you answer those directly. -- Why is it that all of the instruments seeking intelligent life in the universe are pointed away from Earth? signature.asc Description: OpenPGP digital signature
Bug#923559: systemd-udevd: writes to kernel log
Am 03.03.19 um 23:27 schrieb Thorsten Glaser: > Could you please, at least, forward the attached patch upstream, > if you’re not willing to maintain it downstream? Sure. To do that, can you please provide a git formatted patch against the upstream sources. You probably want to add a bit more context to the commit message, so upstream has a better idea what this patch is actually for. -- Why is it that all of the instruments seeking intelligent life in the universe are pointed away from Earth? signature.asc Description: OpenPGP digital signature
Bug#923559: systemd-udevd: writes to kernel log
tags 923559 + patch thanks On Sat, 2 Mar 2019, Michael Biebl wrote: > The only other option you have is to disable logging in udevd completely. How about the attached patch? I’ve verified it, as since recently (re)starting udev always produces an uninteresting/tautologic warning: Mar 3 23:20:49 tglase vmunix: [8820159.381621] systemd-udevd[14028]: Network interface NamePolicy= disabled on kernel command line, ignoring. Mar 3 23:20:54 tglase sudo: tglase : TTY=pts/3 ; PWD=/var/cache/pbuilder/result-dpo ; USER=root ; COMMAND=/usr/bin/dpkg -i udev_241-1.1_x32.deb Mar 3 23:20:54 tglase sudo: pam_unix(sudo:session): session opened for user root by tglase(uid=0) Mar 3 23:21:00 tglase systemd-udevd[14168]: Network interface NamePolicy= disabled on kernel command line, ignoring. (Before this I hacked /var/lib/dpkg/status to set all versions from 241-1 to 241-1.1 so this dpkg command could succeed.) > >>> This is expected behaviour. udevd uses the journal for logging and falls > >>> back to log to the kernel ring buffer if the journal is not available. > > > > Make it fall back to syslog first, then, please. > We won't develop and maintain a downstream patch for that and I'm pretty > sure upstream is not interested in that either since they have a > perfectly working solution for that. Could you please, at least, forward the attached patch upstream, if you’re not willing to maintain it downstream? It turns out that the fix was really trivial. (I think it goes without saying that it’s better if I don’t interact directly with upstream.) Thanks, //mirabilos -- [17:15:07] Lukas Degener: Kleines Asterix-Latinum für Softwaretechniker: veni, vidi, fixi(t) ;-)diff -Nru systemd-241/debian/changelog systemd-241/debian/changelog --- systemd-241/debian/changelog2019-02-22 00:10:15.0 +0100 +++ systemd-241/debian/changelog2019-03-03 23:00:57.0 +0100 @@ -1,3 +1,10 @@ +systemd (241-1.1) unstable; urgency=medium + + * Non-maintainer upload. + * Add patch to prefer syslog over kmsg for auto logging. (Closes: #923559) + + -- Thorsten Glaser Sun, 03 Mar 2019 23:00:57 +0100 + systemd (241-1) unstable; urgency=medium [ Adam Borowski ] diff -Nru systemd-241/debian/patches/debian/Use-syslog-for-AUTO-logging-before-klog.patch systemd-241/debian/patches/debian/Use-syslog-for-AUTO-logging-before-klog.patch --- systemd-241/debian/patches/debian/Use-syslog-for-AUTO-logging-before-klog.patch 1970-01-01 01:00:00.0 +0100 +++ systemd-241/debian/patches/debian/Use-syslog-for-AUTO-logging-before-klog.patch 2019-03-03 23:00:54.0 +0100 @@ -0,0 +1,32 @@ +# DP: make LOG_TARGET_AUTO fall back to syslog before kernel message buffer +# DP: fixes #923559 + +--- a/src/basic/log.c b/src/basic/log.c +@@ -257,6 +257,7 @@ int log_open(void) { + + if (!prohibit_ipc && + IN_SET(log_target, LOG_TARGET_SYSLOG_OR_KMSG, ++ LOG_TARGET_AUTO, +LOG_TARGET_SYSLOG)) { + r = log_open_syslog(); + if (r >= 0) { +@@ -603,6 +604,7 @@ int log_dispatch_internal( + } + + if (IN_SET(log_target, LOG_TARGET_SYSLOG_OR_KMSG, ++ LOG_TARGET_AUTO, +LOG_TARGET_SYSLOG)) { + + k = write_to_syslog(level, error, file, line, func, buffer); +--- a/src/basic/log.h b/src/basic/log.h +@@ -30,7 +30,7 @@ typedef enum LogTarget{ + LOG_TARGET_JOURNAL_OR_KMSG, + LOG_TARGET_SYSLOG, + LOG_TARGET_SYSLOG_OR_KMSG, +-LOG_TARGET_AUTO, /* console if stderr is tty, JOURNAL_OR_KMSG otherwise */ ++LOG_TARGET_AUTO, /* console if stderr is tty, journal or syslog or kmsg otherwise */ + LOG_TARGET_NULL, + _LOG_TARGET_MAX, + _LOG_TARGET_INVALID = -1 diff -Nru systemd-241/debian/patches/series systemd-241/debian/patches/series --- systemd-241/debian/patches/series 2019-02-22 00:10:15.0 +0100 +++ systemd-241/debian/patches/series 2019-03-03 22:58:11.0 +0100 @@ -21,3 +21,4 @@ debian/Add-env-variable-for-machine-ID-path.patch debian/Revert-udev-rules-Permission-changes-for-dev-dri-renderD.patch debian/Drop-seccomp-system-call-filter-for-udev.patch +debian/Use-syslog-for-AUTO-logging-before-klog.patch
Bug#923559: closed by Michael Biebl (Re: Bug#923559: systemd-udevd: writes to kernel log)
Control: tags -1 + wontfix Am 02.03.19 um 00:27 schrieb Thorsten Glaser: > reopen 923559 > thanks > > Debian Bug Tracking System dixit: > >> If this explanation is unsatisfactory and you have not received a >> better one in a separate message then please contact Michael Biebl >> by >> replying to this email. > > This is unsatisfactory. The only other option you have is to disable logging in udevd completely. >>> This is expected behaviour. udevd uses the journal for logging and falls >>> back to log to the kernel ring buffer if the journal is not available. > > Make it fall back to syslog first, then, please. Sorry, this not going to happen. We won't develop and maintain a downstream patch for that and I'm pretty sure upstream is not interested in that either since they have a perfectly working solution for that. So I'm closing the bug report as wontfix. -- Why is it that all of the instruments seeking intelligent life in the universe are pointed away from Earth? signature.asc Description: OpenPGP digital signature
Bug#923559: closed by Michael Biebl (Re: Bug#923559: systemd-udevd: writes to kernel log)
reopen 923559 thanks Debian Bug Tracking System dixit: >If this explanation is unsatisfactory and you have not received a >better one in a separate message then please contact Michael Biebl > by >replying to this email. This is unsatisfactory. >>This is expected behaviour. udevd uses the journal for logging and falls >>back to log to the kernel ring buffer if the journal is not available. Make it fall back to syslog first, then, please. Thanks, //m.
Bug#923559: systemd-udevd: writes to kernel log
Package: udev Version: 241-1 Severity: normal Mar 1 23:09:44 tglase-nb vmunix: [ 125.926361] systemd-udevd[2636]: link_config: autonegotiation is unset or enabled, the speed and duplex are not writable. I expect this instead: Mar 1 23:09:44 tglase-nb systemd-udevd[2636]: link_config: autonegotiation is unset or enabled, the speed and duplex are not writable. I expect that the kernel log contains *only* messages originating from the kernel. -- Package-specific info: -- System Information: Debian Release: buster/sid APT prefers buildd-unstable APT policy: (500, 'buildd-unstable'), (500, 'unstable'), (1, 'experimental') Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 4.19.0-3-amd64 (SMP w/2 CPU cores) Locale: LANG=C, LC_CTYPE=C.UTF-8 (charmap=UTF-8), LANGUAGE=C (charmap=UTF-8) Shell: /bin/sh linked to /bin/lksh Init: sysvinit (via /sbin/init) Versions of packages udev depends on: ii adduser 3.118 ii libacl1 2.2.52-5 ii libblkid12.33.1-0.1 ii libc62.28-8 ii libkmod2 26-1 ii libselinux1 2.8-1+b1 ii libudev1 241-1 ii lsb-base 10.2018112800 ii util-linux 2.33.1-0.1 udev recommends no packages. udev suggests no packages. Versions of packages udev is related to: pn systemd -- debconf information excluded P: /devices/LNXSYSTM:00 L: 0 E: DEVPATH=/devices/LNXSYSTM:00 E: SUBSYSTEM=acpi E: MODALIAS=acpi:LNXSYSTM: E: USEC_INITIALIZED=12497732 E: ID_VENDOR_FROM_DATABASE=The Linux Foundation E: net.ifnames=0 P: /devices/LNXSYSTM:00/LNXCPU:00 L: 0 E: DEVPATH=/devices/LNXSYSTM:00/LNXCPU:00 E: SUBSYSTEM=acpi E: MODALIAS=acpi:LNXCPU: E: USEC_INITIALIZED=12500139 E: ID_VENDOR_FROM_DATABASE=The Linux Foundation E: net.ifnames=0 P: /devices/LNXSYSTM:00/LNXCPU:01 L: 0 E: DEVPATH=/devices/LNXSYSTM:00/LNXCPU:01 E: SUBSYSTEM=acpi E: MODALIAS=acpi:LNXCPU: E: USEC_INITIALIZED=12501822 E: ID_VENDOR_FROM_DATABASE=The Linux Foundation E: net.ifnames=0 P: /devices/LNXSYSTM:00/LNXPWRBN:00 L: 0 E: DEVPATH=/devices/LNXSYSTM:00/LNXPWRBN:00 E: SUBSYSTEM=acpi E: DRIVER=button E: MODALIAS=acpi:LNXPWRBN: E: USEC_INITIALIZED=12506453 E: ID_VENDOR_FROM_DATABASE=The Linux Foundation E: net.ifnames=0 P: /devices/LNXSYSTM:00/LNXPWRBN:00/input/input6 L: 0 E: DEVPATH=/devices/LNXSYSTM:00/LNXPWRBN:00/input/input6 E: SUBSYSTEM=input E: PRODUCT=19/0/1/0 E: NAME="Power Button" E: PHYS="LNXPWRBN/button/input0" E: PROP=0 E: EV=3 E: KEY=10 0 E: MODALIAS=input:b0019vp0001e-e0,1,k74,ramlsfw E: USEC_INITIALIZED=12912701 E: ID_INPUT=1 E: ID_INPUT_KEY=1 E: ID_PATH=acpi-LNXPWRBN:00 E: ID_PATH_TAG=acpi-LNXPWRBN_00 E: net.ifnames=0 P: /devices/LNXSYSTM:00/LNXPWRBN:00/input/input6/event5 N: input/event5 L: 0 E: DEVPATH=/devices/LNXSYSTM:00/LNXPWRBN:00/input/input6/event5 E: SUBSYSTEM=input E: DEVNAME=/dev/input/event5 E: MAJOR=13 E: MINOR=69 E: USEC_INITIALIZED=13017835 E: ID_INPUT=1 E: ID_INPUT_KEY=1 E: ID_PATH=acpi-LNXPWRBN:00 E: ID_PATH_TAG=acpi-LNXPWRBN_00 E: XKBMODEL=pc105 E: XKBLAYOUT=us E: XKBOPTIONS=terminate:ctrl_alt_bksp E: BACKSPACE=guess E: KMAP=/etc/console-setup/KBDmir2U.map.gz E: net.ifnames=0 E: LIBINPUT_DEVICE_GROUP=19/0/1:LNXPWRBN/button E: TAGS=:power-switch: P: /devices/LNXSYSTM:00/LNXSYBUS:00 L: 0 E: DEVPATH=/devices/LNXSYSTM:00/LNXSYBUS:00 E: SUBSYSTEM=acpi E: MODALIAS=acpi:LNXSYBUS: E: USEC_INITIALIZED=12504786 E: ID_VENDOR_FROM_DATABASE=The Linux Foundation E: net.ifnames=0 P: /devices/LNXSYSTM:00/LNXSYBUS:00/IBM0069:00 L: 0 E: DEVPATH=/devices/LNXSYSTM:00/LNXSYBUS:00/IBM0069:00 E: SUBSYSTEM=acpi E: MODALIAS= E: USEC_INITIALIZED=12512386 E: net.ifnames=0 P: /devices/LNXSYSTM:00/LNXSYBUS:00/IBM0079:00 L: 0 E: DEVPATH=/devices/LNXSYSTM:00/LNXSYBUS:00/IBM0079:00 E: SUBSYSTEM=acpi E: MODALIAS=acpi:IBM0079:PNP0C15:LNXDOCK: E: USEC_INITIALIZED=12510684 E: ID_VENDOR_FROM_DATABASE=IBM Brasil E: net.ifnames=0 P: /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00 L: 0 E: DEVPATH=/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00 E: SUBSYSTEM=acpi E: MODALIAS=acpi:PNP0A08:PNP0A03: E: USEC_INITIALIZED=12509429 E: ID_VENDOR_FROM_DATABASE=The Linux Foundation E: net.ifnames=0 P: /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/LNXVIDEO:00 L: 0 E: DEVPATH=/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/LNXVIDEO:00 E: SUBSYSTEM=acpi E: DRIVER=video E: MODALIAS=acpi:LNXVIDEO: E: USEC_INITIALIZED=12520479 E: ID_VENDOR_FROM_DATABASE=The Linux Foundation E: net.ifnames=0 P: /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/LNXVIDEO:00/device:01 L: 0 E: DEVPATH=/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/LNXVIDEO:00/device:01 E: SUBSYSTEM=acpi E: USEC_INITIALIZED=12522408 E: net.ifnames=0 P: /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/LNXVIDEO:00/device:02 L: 0 E: DEVPATH=/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/LNXVIDEO:00/device:02 E: SUBSYSTEM=acpi E: USEC_INITIALIZED=12522988 E: net.ifnames=0 P: /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/LNXVIDEO:00/device:03 L: 0 E: DEVPATH=/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/LNXVIDEO:00/device:03 E: SUBSYSTEM=acpi E: