Re: [RFC PATCH v1] panic: Flush unsafe consoles before panic reboot
From: Breno Leitao
Date: Wed Oct 28 2026 - 06:55:31 EST
On Fri, Oct 23, 2026 at 10:03:47AM +0206, John Ogness wrote:
> *** WARNING: Now we get into my brainstorming, which could be rough. ***
>
> Rather than a big hammer option, I see this more as a per-console
> configuration (similar to how we want to go with the console loglevels).
>
> Netconsole is a bit tricky, because it has its own format separate from
> console. This would need to be addressed for the per-console loglevels
> as well. Maybe it should be extended to something like:
>
> netconsole=[+][r][src-port]@[src-ip]/[<dev>],[tgt-port]@<tgt-ip>/[tgt-macaddr][,options]
>
> Which would allow things like:
>
> netconsole=@/,@10.10.0.2/,loglevel:3,unsafe_panic:1
This cannot be per target, given that netconsole has multiple targets
(as remote hosts/IPs), but a single registered console.
As of right now, all targets share the same remote, and would have the
same unsafe_panic priority.
> This would also allow to specify that consoles should _not_
> perform unsafe flushing:
>
> console=ttyS0,115200,unsafe_panic:0
>
> And it could be used for ordering, flusing from highest value to lowest:
>
> netconsole=@/,@10.10.0.2/,unsafe_panic:2 console=ttyS0,115200,unsafe_panic:12
>
> (First ttyS0 is unsafe-flushed, then the netconsole is unsafe-flushed.)
>
> For consoles with CON_NBCON_ATOMIC_UNSAFE, the default would be
> unsafe_panic:0. Otherwise the default would be unsafe_panic:1.
How do you plan to use 'unsafe_panic' order exactly?
Thanks,
--breno