[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CA+CK2bAPv5u1ih5y9t5FUnTyximtFCtDYXJCpuyjOyHNOkRdqw@mail.gmail.com>
Date: Wed, 13 May 2020 10:35:16 -0400
From: Pavel Tatashin <pasha.tatashin@...een.com>
To: Kees Cook <keescook@...omium.org>
Cc: Petr Mladek <pmladek@...e.com>, Anton Vorontsov <anton@...msg.org>,
Colin Cross <ccross@...roid.com>,
Tony Luck <tony.luck@...el.com>,
Jonathan Corbet <corbet@....net>,
Rob Herring <robh+dt@...nel.org>,
Benson Leung <bleung@...omium.org>,
Enric Balletbo i Serra <enric.balletbo@...labora.com>,
Sergey Senozhatsky <sergey.senozhatsky@...il.com>,
Steven Rostedt <rostedt@...dmis.org>,
James Morris <jmorris@...ei.org>,
Sasha Levin <sashal@...nel.org>,
Linux Doc Mailing List <linux-doc@...r.kernel.org>,
LKML <linux-kernel@...r.kernel.org>, devicetree@...r.kernel.org
Subject: Re: [PATCH v3 0/6] allow ramoops to collect all kmesg_dump events
> > + reason: panic, oops, emergency, shutdown (ordered by severity)
> > + handling: restart, halt, poweroff
> >
> > Or we might just replace KMSG_DUMP_RESTART, KMSG_DUMP_HALT,
> > KMSG_DUMP_POWEROFF with a single KMSG_DUMP_SHUTDOWN.
> >
> > Then the max reason variable would make sense.
>
> That would work for me, yeah. Pavel, is that enough granularity for you?
>
Yes, I like the second approach: where we combine all shutdown type
events into a single type.
max_reason will have 4 levels:
KMSG_DUMP_PANIC,
KMSG_DUMP_OOPS,
KMSG_DUMP_EMERG,
KMSG_DUMP_SHUTDOWN,
If needed it is possible to determine from dmesg logs what kind of
shutdown was taken, because there is a message logged right before
every kmsg_dump() for these events:
249 if (!cmd)
250 pr_emerg("Restarting system\n");
251 else
252 pr_emerg("Restarting system with command '%s'\n", cmd);
253 kmsg_dump(KMSG_DUMP_RESTART);
276 pr_emerg("System halted\n");
277 kmsg_dump(KMSG_DUMP_HALT);
294 pr_emerg("Power down\n");
295 kmsg_dump(KMSG_DUMP_POWEROFF);
Kees, I will submit a new series with these changes soon.
Thank you,
Pasha
Powered by blists - more mailing lists