From 53d8e1c7141617e8656420afb44f9536e7cf0519 Mon Sep 17 00:00:00 2001 From: Mark Salyzyn Date: Mon, 8 Dec 2014 15:06:52 -0800 Subject: [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 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 | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'fs/pstore/Kconfig') diff --git a/fs/pstore/Kconfig b/fs/pstore/Kconfig index ca71db69da07..da12fd4e3d47 100644 --- a/fs/pstore/Kconfig +++ b/fs/pstore/Kconfig @@ -19,6 +19,16 @@ config PSTORE_CONSOLE When the option is enabled, pstore will log all kernel messages, even if no oops or panic happened. +config PSTORE_PMSG + bool "Log user space messages" + depends on PSTORE + help + When the option is enabled, pstore will export a character + interface /dev/pmsg0 to log user space messages. On reboot + data can be retrieved from /sys/fs/pstore/pmsg-ramoops-[ID]. + + If unsure, say N. + config PSTORE_FTRACE bool "Persistent function tracer" depends on PSTORE -- cgit v1.2.3