Re: [RFC PATCH v1] panic: Flush unsafe consoles before panic reboot
From: John Ogness
Date: Thu Nov 05 2026 - 14:14:49 EST
On 2026-11-05, Petr Mladek <pmladek@xxxxxxxx> wrote:
>> And maybe users want safe drivers (such as 8250) to enter "hope and
>> pray mode" on kernel ending sites, which is something even legacy
>> consoles could not always do.
>
> I think that I finally understand your concern. You would like to
> add a per-console flag for "debugging" or "safe" mode. But
> it might be weird when:
>
> + netconsole is in the "debugging" mode by default.
>
> + other serial consoles are in the "safe" mode by default.
Yes. Although I would not call it "debugging" and "safe".
> I see two solutions:
>
> 1. Keep all NBCON consoles consistent and allow unsafe takeover
> on more locations, independently whether they have safe
> or unsafe write_atomic().
>
> 2. Allow the unsafe takeover on more locations only for netconsole.
> And later allow to set both per-console policies: "debugging"
> vs. "safe". And accept that netconsole has different default
> policy.
>
> I personally prefer the 2nd solution. Netconsole has always been
> a bit special. And maybe someone would implement the safe write_atomic
> in the future which will make it more normal, ...
I agree. I am preparing a patch that should allow exactly that and
hopefully make my idea with the policies clear.
John