lkml.org 
[lkml]   [2020]   [May]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v3 0/6] allow ramoops to collect all kmesg_dump events
On Tue 2020-05-12 11:45:54, Kees Cook wrote:
> Here are the problems I see being solved by this:
>
> - lifting kmsg dump reason filtering out of the individual pstore
> backends and making it part of the "infrastructure", so that
> there is a central place to set expectations. Right now there
> is a mix of explicit and implicit kmsg dump handling:
>
> - arch/powerpc/kernel/nvram_64.c has a hard-coded list

It handles restart, halt, poweroff the same way. I wonder if anyone
would want to distinguish them.

> - drivers/firmware/efi/efi-pstore.c doesn't expect anything but
> OOPS and PANIC.
> - drivers/mtd/mtdoops.c tries to filter using its own dump_oops
> and doesn't expect anything but OOPS and PANIC.
> - fs/pstore/ram.c: has a hard-coded list and uses its own
> dump_oops.
> - drivers/mtd/mtdpstore.c (under development[3]) expected only
> OOPS and PANIC and had its own dump_oops.

The others handle only panic or oops.

What about splitting the reason into two variables? One for severity
and other for shutdown behavior. I mean:

+ 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.

Best Regards,
Petr

\
 
 \ /
  Last update: 2020-05-13 09:35    [W:0.657 / U:0.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site