WeiXiong Liao 78c08247b9 mtd: Support kmsg dumper based on pstore/blk
This introduces mtdpstore, which is similar to mtdoops but more
powerful. It uses pstore/blk, and aims to store panic and oops logs to
a flash partition, where pstore can later read back and present as files
in the mounted pstore filesystem.

To make mtdpstore work, the "blkdev" of pstore/blk should be set
as MTD device name or MTD device number. For more details, see
Documentation/admin-guide/pstore-blk.rst

This solves a number of issues:
- Work duplication: both of pstore and mtdoops do the same job storing
  panic/oops log. They have very similar logic, registering to kmsg
  dumper and storing logs to several chunks one by one.
- Layer violations: drivers should provides methods instead of polices.
  MTD should provide read/write/erase operations, and allow a higher
  level drivers to provide the chunk management, kmsg dump
  configuration, etc.
- Missing features: pstore provides many additional features, including
  presenting the logs as files, logging dump time and count, and
  supporting other frontends like pmsg, console, etc.

Signed-off-by: WeiXiong Liao <liaoweixiong@allwinnertech.com>
Link: https://lore.kernel.org/lkml/20200511233229.27745-11-keescook@chromium.org/
Link: https://lore.kernel.org/r/1589266715-4168-1-git-send-email-liaoweixiong@allwinnertech.com
Signed-off-by: Kees Cook <keescook@chromium.org>
2020-05-31 19:49:01 -07:00
..
2020-04-10 09:52:15 -07:00
2020-03-23 07:59:38 +01:00
2020-04-10 17:20:06 -07:00
2020-04-03 15:05:35 -07:00
2020-04-10 11:32:22 +02:00
2020-04-10 12:27:06 -07:00
2020-04-11 09:46:12 -07:00
2020-04-04 18:07:59 -07:00
2020-04-08 21:25:49 -07:00
2020-04-01 18:18:18 -07:00
2020-03-20 13:45:25 +01:00
2020-03-30 11:43:51 -07:00
2020-03-19 23:04:32 -05:00
2020-04-08 21:03:40 -07:00
2020-04-03 15:05:35 -07:00
2020-04-08 10:51:53 -07:00
2020-03-31 16:13:09 -07:00
2020-04-08 10:51:53 -07:00
2020-04-03 14:25:02 -07:00
2020-04-08 21:03:40 -07:00
2020-04-10 10:06:54 -07:00
2020-04-02 17:32:52 -07:00
2020-04-08 11:00:00 -07:00
2020-03-31 10:05:01 -07:00
2020-04-03 14:25:02 -07:00
2020-03-30 14:58:26 -07:00
2020-04-07 19:48:52 -07:00
2020-04-10 12:21:11 -07:00
2020-04-10 12:21:11 -07:00
2020-04-02 15:50:04 -07:00
2020-04-10 15:36:21 -07:00
2020-04-10 12:21:11 -07:00
2020-04-03 15:05:35 -07:00
2020-03-23 08:04:08 +01:00
2020-04-05 11:12:59 -07:00
2020-04-02 17:03:53 -07:00
2020-04-02 10:41:40 -04:00
2020-04-02 10:41:40 -04:00
2020-04-07 20:24:34 -07:00
2020-03-19 07:41:03 +01:00
2020-04-08 10:51:53 -07:00
2020-04-10 17:20:06 -07:00
2020-04-03 13:12:26 -07:00
2020-04-08 10:51:53 -07:00
2020-04-08 10:51:53 -07:00