LKML Archive on
 help / color / Atom feed
* Regression in v4.19.106 breaking waking up of readers of /proc/kmsg and /dev/kmsg
@ 2020-02-27 11:09 Lech Perczak
  2020-02-27 12:36 ` Greg Kroah-Hartman
  0 siblings, 1 reply; 21+ messages in thread
From: Lech Perczak @ 2020-02-27 11:09 UTC (permalink / raw)
  To: linux-kernel, Theodore Ts'o, Arnd Bergmann, Greg Kroah-Hartman
  Cc: Krzysztof Drobiński, Pawel Lenkow


After upgrading kernel on our boards from v4.19.105 to v4.19.106 we found out that syslog fails to read the messages after ones read initially after opening /proc/kmsg just after booting.
I also found out, that output of 'dmesg --follow' also doesn't react on new printks appearing for whatever reason - to read new messages, reopening /proc/kmsg or /dev/kmsg was needed.
I bisected this down to commit 15341b1dd409749fa5625e4b632013b6ba81609b ("char/random: silence a lockdep splat with printk()"), and reverting it on top of v4.19.106 restored correct behaviour.

My test scenario for bisecting was:
1. run 'dmesg --follow' as root
2. run 'echo t > /proc/sysrq-trigger'
3. If trace appears in dmesg output -> good, otherwise, bad. If trace doesn't appear in output of 'dmesg --follow', re-running it will show the trace.

I ran my tests on Debian 10.3 with configuration based directly on one from 4.19.0-8-amd64 (4.19.98-1) in Qemu.
I could reproduce the same issue on several boards with x86 and ARMv7 CPUs alike, with 100% reproducibility.

I haven't yet digged into why exactly this commit breaks notifications for readers of /proc/kmsg and /dev/kmsg, but as reverting it fixed the issue, I'm pretty sure this is the one. It is possible that the same happened in 5.4 line, bu I hadn't had a chance to test this as well yet.

For reference, here is my bisect log:
git bisect start
# bad: [f25804f389846835535db255e7ba80eeed967ed7] Linux 4.19.106
git bisect bad f25804f389846835535db255e7ba80eeed967ed7
# good: [4fccc2503536a564a4ba31a1d50439854201659f] Linux 4.19.105
git bisect good 4fccc2503536a564a4ba31a1d50439854201659f
# bad: [aec48d8d0e6e291f61d0a0741bef2f8cc0712584] clk: uniphier: Add SCSSI clock gate for each channel
git bisect bad aec48d8d0e6e291f61d0a0741bef2f8cc0712584
# bad: [5fe69d2ba08f516ace6496d40ac47fe33d3d4ec7] KVM: s390: ENOTSUPP -> EOPNOTSUPP fixups
git bisect bad 5fe69d2ba08f516ace6496d40ac47fe33d3d4ec7
# bad: [15341b1dd409749fa5625e4b632013b6ba81609b] char/random: silence a lockdep splat with printk()
git bisect bad 15341b1dd409749fa5625e4b632013b6ba81609b
# good: [b9dc4d61b5c2d8ea289087f57898426017431391] cpu/hotplug, stop_machine: Fix stop_machine vs hotplug order
git bisect good b9dc4d61b5c2d8ea289087f57898426017431391
# good: [e5c8d49b9be04080f5aab67ea36ac65a30758442] pinctrl: sh-pfc: sh7264: Fix CAN function GPIOs
git bisect good e5c8d49b9be04080f5aab67ea36ac65a30758442
# good: [67f7f0c7e9f4a6c5215e78728261b1d4ab57dcc6] powerpc/powernv/iov: Ensure the pdn for VFs always contains a valid PE number
git bisect good 67f7f0c7e9f4a6c5215e78728261b1d4ab57dcc6
# good: [4802b257d352e48a0b10886b2d1a12b366a17c48] iommu/vt-d: Fix off-by-one in PASID allocation
git bisect good 4802b257d352e48a0b10886b2d1a12b366a17c48
# first bad commit: [15341b1dd409749fa5625e4b632013b6ba81609b] char/random: silence a lockdep splat with printk()

Pozdrawiam/With kind regards,
Lech Perczak

Sr. Software Engineer
Camlin Technologies Poland Limited Sp. z o.o.

^ permalink raw reply	[flat|nested] 21+ messages in thread

end of thread, back to index

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-27 11:09 Regression in v4.19.106 breaking waking up of readers of /proc/kmsg and /dev/kmsg Lech Perczak
2020-02-27 12:36 ` Greg Kroah-Hartman
2020-02-27 12:39   ` Lech Perczak
2020-02-27 14:08     ` Lech Perczak
2020-02-28  3:13       ` Sergey Senozhatsky
2020-02-28  9:11         ` John Ogness
2020-02-28 12:02           ` Sergey Senozhatsky
2020-02-28 10:04         ` Petr Mladek
2020-02-28 10:58           ` Greg Kroah-Hartman
2020-02-28 11:32             ` Petr Mladek
2020-02-28 11:39               ` Greg Kroah-Hartman
2020-02-28 13:02               ` Petr Mladek
2020-02-28 13:41                 ` Greg Kroah-Hartman
2020-02-28 20:53                 ` Theodore Y. Ts'o
2020-02-29  3:32                   ` Sergey Senozhatsky
2020-02-29  4:08                     ` Sergey Senozhatsky
2020-02-29 23:47                     ` Steven Rostedt
2020-03-01  5:22                       ` Sergey Senozhatsky
2020-03-02  9:49                         ` Petr Mladek
2020-03-02  9:59                           ` Sergey Senozhatsky
2020-02-28 11:49           ` Sergey Senozhatsky

LKML Archive on

Archives are clonable:
	git clone --mirror lkml/git/0.git
	git clone --mirror lkml/git/1.git
	git clone --mirror lkml/git/2.git
	git clone --mirror lkml/git/3.git
	git clone --mirror lkml/git/4.git
	git clone --mirror lkml/git/5.git
	git clone --mirror lkml/git/6.git
	git clone --mirror lkml/git/7.git
	git clone --mirror lkml/git/8.git
	git clone --mirror lkml/git/9.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 lkml lkml/ \
	public-inbox-index lkml

Example config snippet for mirrors

Newsgroup available over NNTP:

AGPL code for this site: git clone