Skip to contentSkip to conversation

ramoops: use pstore interface

PATCH Superseded Kees Cook 1 participant 1 message Dec 9, 2011

Subsystems (2)

v3 of 5 Superseded Latest is v5 →

lore
Share & tools
lore

Kees Cook

author
#0 lore raw

PATCH v3 1/1 ramoops: use pstore interface

Instead of using /dev/mem directly, use the common pstore infrastructure to handle Oops gathering and extraction.

---
changes:
- Rebased on top of -next.
- Added more documentation about which memory regions it would be used with.

I think this addresses everyone's concerns. I'd like to see this get into the merge window, if possible. Thanks!

---
 Documentation/ramoops.txt |   14 +++-
 drivers/char/Kconfig      |    1 +
 drivers/char/ramoops.c    |  198 ++++++++++++++++++++++++++++++++++----------
 3 files changed, 164 insertions(+), 49 deletions(-)
Documentation/ramoops.txt +10 -4
index 8fb1ba7..816dc2b 100644
@@ -3,7 +3,7 @@ Ramoops oops/panic logger
 
 Sergiu Iordache <[email protected]>
 
-Updated: 8 August 2011
+Updated: 17 November 2011
 
 0. Introduction
 
@@ -71,6 +71,12 @@ timestamp and a new line. The dump then continues with the actual data.
 
 4. Reading the data
 
-The dump data can be read from memory (through /dev/mem or other means).
-Getting the module parameters, which are needed in order to parse the data, can
-be done through /sys/module/ramoops/parameters/* .
+The dump data can be read from the pstore filesystem. The format for these
+files is "dmesg-ramoops-N", where N is the record number in memory. To delete
+a stored record from RAM, simply unlink the respective pstore file.
+
+5. Memory region
+
+Normally the memory region being used by ramoops is a persistent reserved
+RAM region, defined by the system's memory layout, and identified to by
+a platform driver using 'struct ramoops_platform_data' as described above.
drivers/char/Kconfig +1 -0
index 4364303..f166499 100644
@@ -603,6 +603,7 @@ source "drivers/s390/char/Kconfig"
 config RAMOOPS
 	tristate "Log panic/oops to a RAM buffer"
 	depends on HAS_IOMEM
+	depends on PSTORE
 	default n
 	help
 	  This enables panic and oops messages to be logged to a circular
drivers/char/ramoops.c +153 -45

301 lines not on this page · raw message

Signature · 1 line
1.7.0.4