[PATCH printk v5 07/40] um: kmsg_dump: only dump when no output console available

2022-11-16 Thread John Ogness
th a crash scenario. Restore the initial intention by dumping the kernel buffers to stdout only if a non-ttynull console is registered and enabled. Also add detailed comments so that it is clear why these rules are applied. Signed-off-by: John Ogness Reviewed-by: Petr Mladek --- arch/um/kernel/k

[PATCH printk v5 00/40] reduce console_lock scope

2022-11-16 Thread John Ogness
make the console the head of the console list. John Ogness [0] https://lore.kernel.org/lkml/20221114162932.141883-1-john.ogn...@linutronix.de [1] https://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu.git/log/?h=srcunmisafe.2022.11.09a John Ogness (38): printk: Prepare for

[PATCH printk v5 13/40] um: kmsg_dumper: use srcu console list iterator

2022-11-16 Thread John Ogness
Rather than using the console_lock to guarantee safe console list traversal, use srcu console list iteration. Signed-off-by: John Ogness Reviewed-by: Petr Mladek --- arch/um/kernel/kmsg_dump.c | 13 + 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/arch/um/kernel

[PATCH printk v4 00/39] reduce console_lock scope

2022-11-14 Thread John Ogness
se, also take the console_lock to guarantee safe access to console->seq. - In console_force_preferred_locked() use hlist_del_rcu() instead of hlist_del_init_rcu() so that there is never a window where the console can be viewed as unregistered. John Ogness [0] https://lore.kern

[PATCH printk v4 12/39] um: kmsg_dumper: use srcu console list iterator

2022-11-14 Thread John Ogness
Rather than using the console_lock to guarantee safe console list traversal, use srcu console list iteration. Signed-off-by: John Ogness Reviewed-by: Petr Mladek --- arch/um/kernel/kmsg_dump.c | 13 + 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/arch/um/kernel

[PATCH printk v4 06/39] um: kmsg_dump: only dump when no output console available

2022-11-14 Thread John Ogness
th a crash scenario. Restore the initial intention by dumping the kernel buffers to stdout only if a non-ttynull console is registered and enabled. Also add detailed comments so that it is clear why these rules are applied. Signed-off-by: John Ogness Reviewed-by: Petr Mladek --- arch/um/kernel/k

[PATCH printk v3 00/40] reduce console_lock scope

2022-11-07 Thread John Ogness
y of the enabled boot consoles - add comments and lockdep assertion to unregister_console_locked() because it is not clear from the name which lock is implied - dropped patches that caused unnecessary churn in the series John Ogness [0] https://lore.kernel.org/lkml/20221019145600.1282823-1

[PATCH printk v3 06/40] um: kmsg_dump: only dump when no output console available

2022-11-07 Thread John Ogness
th a crash scenario. Restore the initial intention by dumping the kernel buffers to stdout only if a non-ttynull console is registered and enabled. Also add detailed comments so that it is clear why these rules are applied. Signed-off-by: John Ogness --- arch/um/kernel/kmsg_dump.c | 15

[PATCH printk v3 11/40] um: kmsg_dumper: use srcu console list iterator

2022-11-07 Thread John Ogness
Rather than using the console_lock to guarantee safe console list traversal, use srcu console list iteration. Signed-off-by: John Ogness --- arch/um/kernel/kmsg_dump.c | 11 --- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/arch/um/kernel/kmsg_dump.c b/arch/um/kernel

[PATCH printk v3 09/40] um: kmsg_dump: use console_is_enabled()

2022-11-07 Thread John Ogness
Replace (console->flags & CON_ENABLED) usage with console_is_enabled(). Signed-off-by: John Ogness --- arch/um/kernel/kmsg_dump.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/um/kernel/kmsg_dump.c b/arch/um/kernel/kmsg_dump.c index 40abf1e9ccb1..f0233e2f8de0

[PATCH printk v2 00/38] reduce console_lock scope

2022-10-19 Thread John Ogness
er before adding to list - unregister_console: fix ENODEV return value if the console is not registered - console_stop: synchronize srcu - printk_late_init: use _safe variant of iteration - __pr_flush: use srcu instead of relying on console_lock for list iteration John Ogness [0] https:

[PATCH printk v2 20/38] um: kmsg_dumper: use srcu console list iterator

2022-10-19 Thread John Ogness
Rather than using the console_lock to guarantee safe console list traversal, use srcu console list iteration. Signed-off-by: John Ogness --- arch/um/kernel/kmsg_dump.c | 11 --- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/arch/um/kernel/kmsg_dump.c b/arch/um/kernel

[PATCH printk v2 07/38] um: kmsg_dump: use console_is_enabled()

2022-10-19 Thread John Ogness
Replace (console->flags & CON_ENABLED) usage with console_is_enabled(). Signed-off-by: John Ogness --- arch/um/kernel/kmsg_dump.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/um/kernel/kmsg_dump.c b/arch/um/kernel/kmsg_dump.c index 0224fcb36e22..3a3bb

Re: [PATCH 04/30] firmware: google: Convert regular spinlock into trylock on panic path

2022-05-10 Thread John Ogness
On 2022-05-10, Steven Rostedt wrote: >> As already mentioned in the other reply, panic() sometimes stops the >> other CPUs using NMI, for example, see kdump_nmi_shootdown_cpus(). >> >> Another situation is when the CPU using the lock ends in some >> infinite loop because something went wrong. The