lkml.org 
[lkml]   [2022]   [Jun]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH V4 13/20] rv/reactor: Add the panic reactor
    On Thu, 16 Jun 2022 10:44:55 +0200
    Daniel Bristot de Oliveira <bristot@kernel.org> wrote:

    > Sample reactor that panics the system when an exception is found. This
    > is useful both to capture a vmcore, or to fail-safe a critical system.
    >
    > Cc: Wim Van Sebroeck <wim@linux-watchdog.org>
    > Cc: Guenter Roeck <linux@roeck-us.net>
    > Cc: Jonathan Corbet <corbet@lwn.net>
    > Cc: Steven Rostedt <rostedt@goodmis.org>
    > Cc: Ingo Molnar <mingo@redhat.com>
    > Cc: Thomas Gleixner <tglx@linutronix.de>
    > Cc: Peter Zijlstra <peterz@infradead.org>
    > Cc: Will Deacon <will@kernel.org>
    > Cc: Catalin Marinas <catalin.marinas@arm.com>
    > Cc: Marco Elver <elver@google.com>
    > Cc: Dmitry Vyukov <dvyukov@google.com>
    > Cc: "Paul E. McKenney" <paulmck@kernel.org>
    > Cc: Shuah Khan <skhan@linuxfoundation.org>
    > Cc: Gabriele Paoloni <gpaoloni@redhat.com>
    > Cc: Juri Lelli <juri.lelli@redhat.com>
    > Cc: Clark Williams <williams@redhat.com>
    > Cc: linux-doc@vger.kernel.org
    > Cc: linux-kernel@vger.kernel.org
    > Cc: linux-trace-devel@vger.kernel.org
    > Signed-off-by: Daniel Bristot de Oliveira <bristot@kernel.org>
    > ---
    > kernel/trace/rv/Kconfig | 8 ++++++
    > kernel/trace/rv/Makefile | 1 +
    > kernel/trace/rv/reactor_panic.c | 44 +++++++++++++++++++++++++++++++++
    > 3 files changed, 53 insertions(+)
    > create mode 100644 kernel/trace/rv/reactor_panic.c
    >
    > diff --git a/kernel/trace/rv/Kconfig b/kernel/trace/rv/Kconfig
    > index be8e3dab0a52..91a17b13a080 100644
    > --- a/kernel/trace/rv/Kconfig
    > +++ b/kernel/trace/rv/Kconfig
    > @@ -60,4 +60,12 @@ config RV_REACT_PRINTK
    > Enables the printk reactor. The printk reactor emmits a printk()
    > message if an exception is found.
    >
    > +config RV_REACT_PANIC
    > + bool "Panic reactor"
    > + depends on RV_REACTORS
    > + default y if RV_REACTORS

    Just put default y if it already depends on RV_REACTORS.

    -- Steve

    > + help
    > + Enables the panic reactor. The panic reactor emmits a printk()
    > + message if an exception is found and panic()s the system.
    > +
    > endif # RV
    > diff --git a/kernel/trace/rv/Makefile b/kernel/trace/rv/Makefile

    \
     
     \ /
      Last update: 2022-06-28 21:09    [W:3.948 / U:1.680 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site