24 Oct, 2016

1 commit


03 Jun, 2016

1 commit

  • Like zlib compression in pstore, this patch added lzo and lz4
    compression support so that users can have more options and better
    compression ratio.

    The original code treats the compressed data together with the
    uncompressed ECC correction notice by using zlib decompress. The
    ECC correction notice is missing in the decompression process. The
    treatment also makes lzo and lz4 not working. So I treat them
    separately by using pstore_decompress() to treat the compressed
    data, and memcpy() to treat the uncompressed ECC correction notice.

    Signed-off-by: Geliang Tang
    Signed-off-by: Kees Cook

    Geliang Tang
     

22 Oct, 2015

1 commit

  • pstore doesn't support unregistering yet. It was marked as TODO.
    This patch adds some code to fix it:
    1) Add functions to unregister kmsg/console/ftrace/pmsg.
    2) Add a function to free compression buffer.
    3) Unmap the memory and free it.
    4) Add a function to unregister pstore filesystem.

    Signed-off-by: Geliang Tang
    Acked-by: Kees Cook
    [Removed __exit annotation from ramoops_remove(). Reported by Arnd Bergmann]
    Signed-off-by: Tony Luck

    Geliang Tang
     

17 Jan, 2015

1 commit

  • A secured user-space accessible pstore object. Writes
    to /dev/pmsg0 are appended to the buffer, on reboot
    the persistent contents are available in
    /sys/fs/pstore/pmsg-ramoops-[ID].

    One possible use is syslogd, or other daemon, can
    write messages, then on reboot provides a means to
    triage user-space activities leading up to a panic
    as a companion to the pstore dmesg or console logs.

    Signed-off-by: Mark Salyzyn
    Acked-by: Kees Cook
    Signed-off-by: Tony Luck

    Mark Salyzyn
     

20 Aug, 2013

1 commit


07 Sep, 2012

1 commit

  • With this patch we no longer reuse function tracer infrastructure, now
    we register our own tracer back-end via a debugfs knob.

    It's a bit more code, but that is the only downside. On the bright side we
    have:

    - Ability to make persistent_ram module removable (when needed, we can
    move ftrace_ops struct into a module). Note that persistent_ram is still
    not removable for other reasons, but with this patch it's just one
    thing less to worry about;

    - Pstore part is more isolated from the generic function tracer. We tried
    it already by registering our own tracer in available_tracers, but that
    way we're loosing ability to see the traces while we record them to
    pstore. This solution is somewhere in the middle: we only register
    "internal ftracer" back-end, but not the "front-end";

    - When there is only pstore tracing enabled, the kernel will only write
    to the pstore buffer, omitting function tracer buffer (which, of course,
    still can be enabled via 'echo function > current_tracer').

    Suggested-by: Steven Rostedt
    Signed-off-by: Anton Vorontsov

    Anton Vorontsov
     

18 Jul, 2012

1 commit

  • With this support kernel can save function call chain log into a
    persistent ram buffer that can be decoded and dumped after reboot
    through pstore filesystem. It can be used to determine what function
    was last called before a reset or panic.

    We store the log in a binary format and then decode it at read time.

    p.s.
    Mostly the code comes from trace_persistent.c driver found in the
    Android git tree, written by Colin Cross
    (according to sign-off history). I reworked the driver a little bit,
    and ported it to pstore.

    Signed-off-by: Anton Vorontsov
    Signed-off-by: Greg Kroah-Hartman

    Anton Vorontsov
     

14 Jun, 2012

1 commit

  • Pstore doesn't support logging kernel messages in run-time, it only
    dumps dmesg when kernel oopses/panics. This makes pstore useless for
    debugging hangs caused by HW issues or improper use of HW (e.g.
    weird device inserted -> driver tried to write a reserved bits ->
    SoC hanged. In that case we don't get any messages in the pstore.

    Therefore, let's add a runtime logging support: PSTORE_TYPE_CONSOLE.

    Signed-off-by: Anton Vorontsov
    Acked-by: Kees Cook
    Acked-by: Colin Cross
    Signed-off-by: Greg Kroah-Hartman

    Anton Vorontsov
     

17 May, 2012

1 commit

  • This is a first step for adding ECC support for pstore RAM backend: we
    will use the persistent_ram routines, kindly provided by Google.

    Basically, persistent_ram is a set of helper routines to deal with the
    [optionally] ECC-protected persistent ram regions.

    A bit of Makefile, Kconfig and header files adjustments were needed
    because of the move.

    Signed-off-by: Anton Vorontsov
    Acked-by: Kees Cook
    Signed-off-by: Greg Kroah-Hartman

    Anton Vorontsov
     

16 May, 2012

1 commit

  • Since ramoops was converted to pstore, it has nothing to do with character
    devices nowadays. Instead, today it is just a RAM backend for pstore.

    The patch just moves things around. There are a few changes were needed
    because of the move:

    1. Kconfig and Makefiles fixups, of course.

    2. In pstore/ram.c we have to play a bit with MODULE_PARAM_PREFIX, this
    is needed to keep user experience the same as with ramoops driver
    (i.e. so that ramoops.foo kernel command line arguments would still
    work).

    Signed-off-by: Anton Vorontsov
    Acked-by: Marco Stornelli
    Acked-by: Kees Cook
    Signed-off-by: Greg Kroah-Hartman

    Anton Vorontsov
     

31 Mar, 2011

1 commit


29 Dec, 2010

1 commit

  • Some platforms have a small amount of non-volatile storage that
    can be used to store information useful to diagnose the cause of
    a system crash. This is the generic part of a file system interface
    that presents information from the crash as a series of files in
    /dev/pstore. Once the information has been seen, the underlying
    storage is freed by deleting the files.

    Signed-off-by: Tony Luck

    Tony Luck