[PATCH v4 4/5] pstore: add pmsg
authorMark Salyzyn <salyzyn@google.com>
Mon, 8 Dec 2014 23:06:52 +0000 (15:06 -0800)
committerMark Salyzyn <salyzyn@google.com>
Wed, 14 Jan 2015 00:22:01 +0000 (16:22 -0800)
commit53d8e1c7141617e8656420afb44f9536e7cf0519
tree0861bb3d9f3783f7b5e8130b23869f53a6a56611
parent2d416e95a31472d2654e964369f99d2fc352852f
[PATCH v4 4/5] pstore: add pmsg

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 <salyzyn@android.com>
v2: switch from snprintf to scnprintf
v3: split out prz_ok checking into PATCH 3/5
    replace pmsg_lseek with noop_llseek
    use pr_fmt() macro
    make write atomic and use a vmalloc'd bounce buffer
v4: use mutex_lock instead of spin_lock.

Change-Id: I82a2a9a989d7583c5fcb65ff520027dc3a034a4c
fs/pstore/Kconfig
fs/pstore/Makefile
fs/pstore/inode.c
fs/pstore/internal.h
fs/pstore/platform.c
fs/pstore/pmsg.c [new file with mode: 0644]
fs/pstore/ram.c
include/linux/pstore.h
include/linux/pstore_ram.h