• WeiXiong Liao's avatar
    pstore/blk: Introduce backend for block devices · 17639f67
    WeiXiong Liao authored
    pstore/blk is similar to pstore/ram, but uses a block device as the
    storage rather than persistent ram.
    
    The pstore/blk backend solves two common use-cases that used to preclude
    using pstore/ram:
    - not all devices have a battery that could be used to persist
      regular RAM across power failures.
    - most embedded intelligent equipment have no persistent ram, which
      increases costs, instead preferring cheaper solutions, like block
      devices.
    
    pstore/blk provides separate configurations for the end user and for the
    block drivers. User configuration determines how pstore/blk operates, such
    as record sizes, max kmsg dump reasons, etc. These can be set by Kconfig
    and/or module parameters, but module parameter have priority over Kconfig.
    Driver configuration covers all the details about the target block device,
    such as total size of the device and how to perform read/write operations.
    These are provided by block drivers, calling pstore_register_blkdev(),
    including an optional panic_write callback used to bypass regular IO
    APIs in an effort to avoid potentially destabilized kernel code during
    a panic.
    Signed-off-by: default avatarWeiXiong Liao <liaoweixiong@allwinnertech.com>
    Link: https://lore.kernel.org/lkml/20200511233229.27745-3-keescook@chromium.org/Co-developed-by: default avatarKees Cook <keescook@chromium.org>
    Signed-off-by: default avatarKees Cook <keescook@chromium.org>
    17639f67
Kconfig 6.85 KB