ramoops: use pstore interface
Subsystems (2)
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.
Signed-off-by Kees Cook <[email protected]>
---
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
@@ -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
@@ -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