All of lore.kernel.org
 help / color / mirror / Atom feed
* [v3 PATCH 0/3] Use nmi_panic() in panic on NMI case
@ 2016-03-03 10:57 Hidehiro Kawai
  2016-03-03 10:57 ` [v3 PATCH 1/3] panic: Change nmi_panic from macro to function Hidehiro Kawai
                   ` (2 more replies)
  0 siblings, 3 replies; 15+ messages in thread
From: Hidehiro Kawai @ 2016-03-03 10:57 UTC (permalink / raw)
  To: Andrew Morton, Thomas Mingarelli, Wim Van Sebroeck, Corey Minyard
  Cc: linux-watchdog, linux-kernel, Michal Hocko, Borislav Petkov,
	openipmi-developer, Guenter Roeck

commit 1717f2096b54 ("panic, x86: Fix re-entrance problem due to
panic on NMI") and commit 58c5661f2144 ("panic, x86: Allow CPUs to
save registers even if looping in NMI context") introduced nmi_panic()
which prevents concurrent/recursive execution of panic().  It also
saves registers for the crash dump on x86.

However, there are some cases where NMI handlers still use panic().
This patch set partially replaces them with nmi_panic() in those
cases.

Changes since v2 (https://lkml.org/lkml/2016/3/2/173):
- Make nmi_panic receive a single string instead of printf style args
  (PATCH 1/3)

Changes since v1 (https://lkml.org/lkml/2016/2/29/858):
- Replace nmi_panic() macro with a function version instead of
  exporting symbols referred by the macro (PATCH 1/3)
- Improve the patch descriptions (PATCH 2/3 and 3/3)
- Do small cleanups (PATCH 3/3)

---
Even if applying this patch set, some NMI or similar handlers (e.g.
MCE handler) remains to use panic().  This is because I can't test
them well and actual problems won't happen.  For example, the
possibility that normal panic and panic on MCE happen simultaneously
is very low.

Hidehiro Kawai (3):
      panic: Change nmi_panic from macro to function
      ipmi/watchdog: Use nmi_panic() when kernel panics in NMI handler
      hpwdt: Use nmi_panic() when kernel panics in NMI handler


 drivers/char/ipmi/ipmi_watchdog.c |    2 +-
 drivers/watchdog/hpwdt.c          |   11 +++++------
 include/linux/kernel.h            |   21 +--------------------
 kernel/panic.c                    |   20 ++++++++++++++++++++
 4 files changed, 27 insertions(+), 27 deletions(-)


-- 
Hidehiro Kawai
Hitachi, Ltd. Research & Development Group

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [v3 PATCH 1/3] panic: Change nmi_panic from macro to function
  2016-03-03 10:57 [v3 PATCH 0/3] Use nmi_panic() in panic on NMI case Hidehiro Kawai
@ 2016-03-03 10:57 ` Hidehiro Kawai
  2016-03-03 13:14   ` Borislav Petkov
                     ` (2 more replies)
  2016-03-03 10:57 ` [v3 PATCH 2/3] ipmi/watchdog: Use nmi_panic() when kernel panics in NMI handler Hidehiro Kawai
  2016-03-03 10:57 ` [v3 PATCH 3/3] hpwdt: " Hidehiro Kawai
  2 siblings, 3 replies; 15+ messages in thread
From: Hidehiro Kawai @ 2016-03-03 10:57 UTC (permalink / raw)
  To: Andrew Morton, Thomas Mingarelli, Wim Van Sebroeck, Corey Minyard
  Cc: Javi Merino, Michal Hocko, linux-watchdog,
	Steven Rostedt (Red Hat),
	Rasmus Villemoes, linux-kernel, Michal Nazarewicz, Michal Hocko,
	Vitaly Kuznetsov, HATAYAMA Daisuke, Borislav Petkov,
	Gobinda Charan Maji, Tejun Heo, Nicolas Iooss,
	openipmi-developer, Borislav Petkov, Thomas Gleixner,
	Guenter Roeck

Change nmi_panic() macro to a normal function for the portability.
Also, export it for modules.

Changes since v2:
- Make nmi_panic receive a single string instead of printf style args

Signed-off-by: Hidehiro Kawai <hidehiro.kawai.ez@hitachi.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Borislav Petkov <bp@suse.de>
Cc: Michal Nazarewicz <mina86@mina86.com>
Cc: Michal Hocko <mhocko@suse.com>
Cc: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Cc: Nicolas Iooss <nicolas.iooss_linux@m4x.org>
Cc: Javi Merino <javi.merino@arm.com>
Cc: Gobinda Charan Maji <gobinda.cemk07@gmail.com>
Cc: "Steven Rostedt (Red Hat)" <rostedt@goodmis.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Vitaly Kuznetsov <vkuznets@redhat.com>
Cc: HATAYAMA Daisuke <d.hatayama@jp.fujitsu.com>
Cc: Tejun Heo <tj@kernel.org>
---
 include/linux/kernel.h |   21 +--------------------
 kernel/panic.c         |   20 ++++++++++++++++++++
 2 files changed, 21 insertions(+), 20 deletions(-)

diff --git a/include/linux/kernel.h b/include/linux/kernel.h
index f31638c..cbe7d70 100644
--- a/include/linux/kernel.h
+++ b/include/linux/kernel.h
@@ -255,7 +255,7 @@ extern long (*panic_blink)(int state);
 __printf(1, 2)
 void panic(const char *fmt, ...)
 	__noreturn __cold;
-void nmi_panic_self_stop(struct pt_regs *);
+void nmi_panic(struct pt_regs *regs, const char *msg);
 extern void oops_enter(void);
 extern void oops_exit(void);
 void print_oops_end_marker(void);
@@ -455,25 +455,6 @@ extern atomic_t panic_cpu;
 #define PANIC_CPU_INVALID	-1
 
 /*
- * A variant of panic() called from NMI context. We return if we've already
- * panicked on this CPU. If another CPU already panicked, loop in
- * nmi_panic_self_stop() which can provide architecture dependent code such
- * as saving register state for crash dump.
- */
-#define nmi_panic(regs, fmt, ...)					\
-do {									\
-	int old_cpu, cpu;						\
-									\
-	cpu = raw_smp_processor_id();					\
-	old_cpu = atomic_cmpxchg(&panic_cpu, PANIC_CPU_INVALID, cpu);	\
-									\
-	if (old_cpu == PANIC_CPU_INVALID)				\
-		panic(fmt, ##__VA_ARGS__);				\
-	else if (old_cpu != cpu)					\
-		nmi_panic_self_stop(regs);				\
-} while (0)
-
-/*
  * Only to be used by arch init code. If the user over-wrote the default
  * CONFIG_PANIC_TIMEOUT, honor it.
  */
diff --git a/kernel/panic.c b/kernel/panic.c
index d96469d..8abfc30 100644
--- a/kernel/panic.c
+++ b/kernel/panic.c
@@ -72,6 +72,26 @@ void __weak nmi_panic_self_stop(struct pt_regs *regs)
 
 atomic_t panic_cpu = ATOMIC_INIT(PANIC_CPU_INVALID);
 
+/*
+ * A variant of panic() called from NMI context. We return if we've already
+ * panicked on this CPU. If another CPU already panicked, loop in
+ * nmi_panic_self_stop() which can provide architecture dependent code such
+ * as saving register state for crash dump.
+ */
+void nmi_panic(struct pt_regs *regs, const char *msg)
+{
+	int old_cpu, cpu;
+
+	cpu = raw_smp_processor_id();
+	old_cpu = atomic_cmpxchg(&panic_cpu, PANIC_CPU_INVALID, cpu);
+
+	if (old_cpu == PANIC_CPU_INVALID)
+		panic("%s", msg);
+	else if (old_cpu != cpu)
+		nmi_panic_self_stop(regs);
+}
+EXPORT_SYMBOL(nmi_panic);
+
 /**
  *	panic - halt the system
  *	@fmt: The text string to print

^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [v3 PATCH 2/3] ipmi/watchdog: Use nmi_panic() when kernel panics in NMI handler
  2016-03-03 10:57 [v3 PATCH 0/3] Use nmi_panic() in panic on NMI case Hidehiro Kawai
  2016-03-03 10:57 ` [v3 PATCH 1/3] panic: Change nmi_panic from macro to function Hidehiro Kawai
@ 2016-03-03 10:57 ` Hidehiro Kawai
  2016-03-03 10:57 ` [v3 PATCH 3/3] hpwdt: " Hidehiro Kawai
  2 siblings, 0 replies; 15+ messages in thread
From: Hidehiro Kawai @ 2016-03-03 10:57 UTC (permalink / raw)
  To: Andrew Morton, Thomas Mingarelli, Wim Van Sebroeck, Corey Minyard
  Cc: Corey Minyard, Michal Hocko, linux-watchdog, linux-kernel,
	Michal Hocko, Borislav Petkov, openipmi-developer, Guenter Roeck

commit 1717f2096b54 ("panic, x86: Fix re-entrance problem due to
panic on NMI") introduced nmi_panic() which prevents concurrent and
recursive execution of panic().  It also saves registers for the
crash dump on x86 by later commit 58c5661f2144 ("panic, x86: Allow
CPUs to save registers even if looping in NMI context").

ipmi_watchdog driver can call panic() from NMI handler, so replace
it with nmi_panic().

Signed-off-by: Hidehiro Kawai <hidehiro.kawai.ez@hitachi.com>
Acked-by: Corey Minyard <cminyard@mvista.com>
Acked-by: Guenter Roeck <linux@roeck-us.net>
Reviewed-by: Michal Hocko <mhocko@suse.com>
Cc: openipmi-developer@lists.sourceforge.net
---
 drivers/char/ipmi/ipmi_watchdog.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/char/ipmi/ipmi_watchdog.c b/drivers/char/ipmi/ipmi_watchdog.c
index 096f0ce..4facc75 100644
--- a/drivers/char/ipmi/ipmi_watchdog.c
+++ b/drivers/char/ipmi/ipmi_watchdog.c
@@ -1140,7 +1140,7 @@ ipmi_nmi(unsigned int val, struct pt_regs *regs)
 		   the timer.   So do so. */
 		pretimeout_since_last_heartbeat = 1;
 		if (atomic_inc_and_test(&preop_panic_excl))
-			panic(PFX "pre-timeout");
+			nmi_panic(regs, PFX "pre-timeout");
 	}
 
 	return NMI_HANDLED;

^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [v3 PATCH 3/3] hpwdt: Use nmi_panic() when kernel panics in NMI handler
  2016-03-03 10:57 [v3 PATCH 0/3] Use nmi_panic() in panic on NMI case Hidehiro Kawai
  2016-03-03 10:57 ` [v3 PATCH 1/3] panic: Change nmi_panic from macro to function Hidehiro Kawai
  2016-03-03 10:57 ` [v3 PATCH 2/3] ipmi/watchdog: Use nmi_panic() when kernel panics in NMI handler Hidehiro Kawai
@ 2016-03-03 10:57 ` Hidehiro Kawai
  2016-03-03 12:17   ` Guenter Roeck
  2016-03-07 11:07     ` 河合英宏 / KAWAI,HIDEHIRO
  2 siblings, 2 replies; 15+ messages in thread
From: Hidehiro Kawai @ 2016-03-03 10:57 UTC (permalink / raw)
  To: Andrew Morton, Thomas Mingarelli, Wim Van Sebroeck, Corey Minyard
  Cc: linux-watchdog, linux-kernel, Michal Hocko, Borislav Petkov,
	openipmi-developer, Guenter Roeck

commit 1717f2096b54 ("panic, x86: Fix re-entrance problem due to
panic on NMI") introduced nmi_panic() which prevents concurrent and
recursive execution of panic().  It also saves registers for the
crash dump on x86 by later commit 58c5661f2144 ("panic, x86: Allow
CPUs to save registers even if looping in NMI context").

hpwdt driver can call panic() from NMI handler, so replace it with
nmi_panic().  Also, do some cleanups.

Changes since V1:
- Use direct return instead of goto
- Combine the panic message string into a single line

Signed-off-by: Hidehiro Kawai <hidehiro.kawai.ez@hitachi.com>
Cc: Thomas Mingarelli <thomas.mingarelli@hpe.com>
Cc: Wim Van Sebroeck <wim@iguana.be>
Cc: Guenter Roeck <linux@roeck-us.net>
Cc: linux-watchdog@vger.kernel.org
---
 drivers/watchdog/hpwdt.c |   11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/drivers/watchdog/hpwdt.c b/drivers/watchdog/hpwdt.c
index 92443c3..a6c8797 100644
--- a/drivers/watchdog/hpwdt.c
+++ b/drivers/watchdog/hpwdt.c
@@ -483,7 +483,7 @@ static int hpwdt_pretimeout(unsigned int ulReason, struct pt_regs *regs)
 	static int die_nmi_called;
 
 	if (!hpwdt_nmi_decoding)
-		goto out;
+		return NMI_DONE;
 
 	spin_lock_irqsave(&rom_lock, rom_pl);
 	if (!die_nmi_called && !is_icru && !is_uefi)
@@ -496,11 +496,11 @@ static int hpwdt_pretimeout(unsigned int ulReason, struct pt_regs *regs)
 
 	if (!is_icru && !is_uefi) {
 		if (cmn_regs.u1.ral == 0) {
-			panic("An NMI occurred, "
-				"but unable to determine source.\n");
+			nmi_panic(regs, "An NMI occurred, but unable to determine source.\n");
+			return NMI_HANDLED;
 		}
 	}
-	panic("An NMI occurred. Depending on your system the reason "
+	nmi_panic(regs, "An NMI occurred. Depending on your system the reason "
 		"for the NMI is logged in any one of the following "
 		"resources:\n"
 		"1. Integrated Management Log (IML)\n"
@@ -508,8 +508,7 @@ static int hpwdt_pretimeout(unsigned int ulReason, struct pt_regs *regs)
 		"3. OA Forward Progress Log\n"
 		"4. iLO Event Log");
 
-out:
-	return NMI_DONE;
+	return NMI_HANDLED;
 }
 #endif /* CONFIG_HPWDT_NMI_DECODING */
 

^ permalink raw reply related	[flat|nested] 15+ messages in thread

* Re: [v3 PATCH 3/3] hpwdt: Use nmi_panic() when kernel panics in NMI handler
  2016-03-03 10:57 ` [v3 PATCH 3/3] hpwdt: " Hidehiro Kawai
@ 2016-03-03 12:17   ` Guenter Roeck
  2016-03-07 11:07     ` 河合英宏 / KAWAI,HIDEHIRO
  1 sibling, 0 replies; 15+ messages in thread
From: Guenter Roeck @ 2016-03-03 12:17 UTC (permalink / raw)
  To: Hidehiro Kawai, Andrew Morton, Thomas Mingarelli,
	Wim Van Sebroeck, Corey Minyard
  Cc: linux-watchdog, linux-kernel, Michal Hocko, Borislav Petkov,
	openipmi-developer

On 03/03/2016 02:57 AM, Hidehiro Kawai wrote:
> commit 1717f2096b54 ("panic, x86: Fix re-entrance problem due to
> panic on NMI") introduced nmi_panic() which prevents concurrent and
> recursive execution of panic().  It also saves registers for the
> crash dump on x86 by later commit 58c5661f2144 ("panic, x86: Allow
> CPUs to save registers even if looping in NMI context").
>
> hpwdt driver can call panic() from NMI handler, so replace it with
> nmi_panic().  Also, do some cleanups.
>
> Changes since V1:
> - Use direct return instead of goto
> - Combine the panic message string into a single line
>
> Signed-off-by: Hidehiro Kawai <hidehiro.kawai.ez@hitachi.com>
> Cc: Thomas Mingarelli <thomas.mingarelli@hpe.com>
> Cc: Wim Van Sebroeck <wim@iguana.be>
> Cc: Guenter Roeck <linux@roeck-us.net>

Acked-by: Guenter Roeck <linux@roeck-us.net>

> Cc: linux-watchdog@vger.kernel.org

In case you resend the series, please drop this Cc: from the commit logs.
Please see usage of Cc: in Documentation/SubmittingPatches.

Thanks,
Guenter

> ---
>   drivers/watchdog/hpwdt.c |   11 +++++------
>   1 file changed, 5 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/watchdog/hpwdt.c b/drivers/watchdog/hpwdt.c
> index 92443c3..a6c8797 100644
> --- a/drivers/watchdog/hpwdt.c
> +++ b/drivers/watchdog/hpwdt.c
> @@ -483,7 +483,7 @@ static int hpwdt_pretimeout(unsigned int ulReason, struct pt_regs *regs)
>   	static int die_nmi_called;
>
>   	if (!hpwdt_nmi_decoding)
> -		goto out;
> +		return NMI_DONE;
>
>   	spin_lock_irqsave(&rom_lock, rom_pl);
>   	if (!die_nmi_called && !is_icru && !is_uefi)
> @@ -496,11 +496,11 @@ static int hpwdt_pretimeout(unsigned int ulReason, struct pt_regs *regs)
>
>   	if (!is_icru && !is_uefi) {
>   		if (cmn_regs.u1.ral == 0) {
> -			panic("An NMI occurred, "
> -				"but unable to determine source.\n");
> +			nmi_panic(regs, "An NMI occurred, but unable to determine source.\n");
> +			return NMI_HANDLED;
>   		}
>   	}
> -	panic("An NMI occurred. Depending on your system the reason "
> +	nmi_panic(regs, "An NMI occurred. Depending on your system the reason "
>   		"for the NMI is logged in any one of the following "
>   		"resources:\n"
>   		"1. Integrated Management Log (IML)\n"
> @@ -508,8 +508,7 @@ static int hpwdt_pretimeout(unsigned int ulReason, struct pt_regs *regs)
>   		"3. OA Forward Progress Log\n"
>   		"4. iLO Event Log");
>
> -out:
> -	return NMI_DONE;
> +	return NMI_HANDLED;
>   }
>   #endif /* CONFIG_HPWDT_NMI_DECODING */
>
>
>
>

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [v3 PATCH 1/3] panic: Change nmi_panic from macro to function
  2016-03-03 10:57 ` [v3 PATCH 1/3] panic: Change nmi_panic from macro to function Hidehiro Kawai
@ 2016-03-03 13:14   ` Borislav Petkov
  2016-03-07 10:53       ` 河合英宏 / KAWAI,HIDEHIRO
  2016-03-04 17:49   ` Michal Hocko
  2016-03-04 19:27     ` Michal Nazarewicz
  2 siblings, 1 reply; 15+ messages in thread
From: Borislav Petkov @ 2016-03-03 13:14 UTC (permalink / raw)
  To: Hidehiro Kawai
  Cc: Andrew Morton, Thomas Mingarelli, Wim Van Sebroeck,
	Corey Minyard, Javi Merino, Michal Hocko, linux-watchdog,
	Steven Rostedt (Red Hat),
	Rasmus Villemoes, linux-kernel, Michal Nazarewicz, Michal Hocko,
	Vitaly Kuznetsov, HATAYAMA Daisuke, Gobinda Charan Maji,
	Tejun Heo, Nicolas Iooss, openipmi-developer, Thomas Gleixner,
	Guenter Roeck

On Thu, Mar 03, 2016 at 07:57:44PM +0900, Hidehiro Kawai wrote:
> Change nmi_panic() macro to a normal function for the portability.

portability?

> Also, export it for modules.
> 
> Changes since v2:
> - Make nmi_panic receive a single string instead of printf style args
> 
> Signed-off-by: Hidehiro Kawai <hidehiro.kawai.ez@hitachi.com>
> Cc: Andrew Morton <akpm@linux-foundation.org>
> Cc: Borislav Petkov <bp@suse.de>
> Cc: Michal Nazarewicz <mina86@mina86.com>
> Cc: Michal Hocko <mhocko@suse.com>
> Cc: Rasmus Villemoes <linux@rasmusvillemoes.dk>
> Cc: Nicolas Iooss <nicolas.iooss_linux@m4x.org>
> Cc: Javi Merino <javi.merino@arm.com>
> Cc: Gobinda Charan Maji <gobinda.cemk07@gmail.com>
> Cc: "Steven Rostedt (Red Hat)" <rostedt@goodmis.org>
> Cc: Thomas Gleixner <tglx@linutronix.de>
> Cc: Vitaly Kuznetsov <vkuznets@redhat.com>
> Cc: HATAYAMA Daisuke <d.hatayama@jp.fujitsu.com>
> Cc: Tejun Heo <tj@kernel.org>
> ---
>  include/linux/kernel.h |   21 +--------------------
>  kernel/panic.c         |   20 ++++++++++++++++++++
>  2 files changed, 21 insertions(+), 20 deletions(-)

Acked-by: Borislav Petkov <bp@suse.de>

-- 
Regards/Gruss,
    Boris.

ECO tip #101: Trim your mails when you reply.

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [v3 PATCH 1/3] panic: Change nmi_panic from macro to function
  2016-03-03 10:57 ` [v3 PATCH 1/3] panic: Change nmi_panic from macro to function Hidehiro Kawai
  2016-03-03 13:14   ` Borislav Petkov
@ 2016-03-04 17:49   ` Michal Hocko
  2016-03-04 19:27     ` Michal Nazarewicz
  2 siblings, 0 replies; 15+ messages in thread
From: Michal Hocko @ 2016-03-04 17:49 UTC (permalink / raw)
  To: Hidehiro Kawai
  Cc: Andrew Morton, Thomas Mingarelli, Wim Van Sebroeck,
	Corey Minyard, Javi Merino, linux-watchdog,
	Steven Rostedt (Red Hat),
	Rasmus Villemoes, linux-kernel, Michal Nazarewicz,
	Vitaly Kuznetsov, HATAYAMA Daisuke, Borislav Petkov,
	Gobinda Charan Maji, Tejun Heo, Nicolas Iooss,
	openipmi-developer, Borislav Petkov, Thomas Gleixner,
	Guenter Roeck

On Thu 03-03-16 19:57:44, Hidehiro Kawai wrote:
> Change nmi_panic() macro to a normal function for the portability.
> Also, export it for modules.

I guess you wanted to say
"
Change nmi_panic() from macro to a normal function so that it can be
exported to modules. At least ipmi and hpwdt watchdogs can be compiled
as a module and need to panic from the NMI context.
"
> 
> Changes since v2:
> - Make nmi_panic receive a single string instead of printf style args
> 
> Signed-off-by: Hidehiro Kawai <hidehiro.kawai.ez@hitachi.com>
> Cc: Andrew Morton <akpm@linux-foundation.org>
> Cc: Borislav Petkov <bp@suse.de>
> Cc: Michal Nazarewicz <mina86@mina86.com>
> Cc: Michal Hocko <mhocko@suse.com>
> Cc: Rasmus Villemoes <linux@rasmusvillemoes.dk>
> Cc: Nicolas Iooss <nicolas.iooss_linux@m4x.org>
> Cc: Javi Merino <javi.merino@arm.com>
> Cc: Gobinda Charan Maji <gobinda.cemk07@gmail.com>
> Cc: "Steven Rostedt (Red Hat)" <rostedt@goodmis.org>
> Cc: Thomas Gleixner <tglx@linutronix.de>
> Cc: Vitaly Kuznetsov <vkuznets@redhat.com>
> Cc: HATAYAMA Daisuke <d.hatayama@jp.fujitsu.com>
> Cc: Tejun Heo <tj@kernel.org>

For the change itself
Acked-by: Michal Hocko <mhocko@suse.com>

> ---
>  include/linux/kernel.h |   21 +--------------------
>  kernel/panic.c         |   20 ++++++++++++++++++++
>  2 files changed, 21 insertions(+), 20 deletions(-)
> 
> diff --git a/include/linux/kernel.h b/include/linux/kernel.h
> index f31638c..cbe7d70 100644
> --- a/include/linux/kernel.h
> +++ b/include/linux/kernel.h
> @@ -255,7 +255,7 @@ extern long (*panic_blink)(int state);
>  __printf(1, 2)
>  void panic(const char *fmt, ...)
>  	__noreturn __cold;
> -void nmi_panic_self_stop(struct pt_regs *);
> +void nmi_panic(struct pt_regs *regs, const char *msg);
>  extern void oops_enter(void);
>  extern void oops_exit(void);
>  void print_oops_end_marker(void);
> @@ -455,25 +455,6 @@ extern atomic_t panic_cpu;
>  #define PANIC_CPU_INVALID	-1
>  
>  /*
> - * A variant of panic() called from NMI context. We return if we've already
> - * panicked on this CPU. If another CPU already panicked, loop in
> - * nmi_panic_self_stop() which can provide architecture dependent code such
> - * as saving register state for crash dump.
> - */
> -#define nmi_panic(regs, fmt, ...)					\
> -do {									\
> -	int old_cpu, cpu;						\
> -									\
> -	cpu = raw_smp_processor_id();					\
> -	old_cpu = atomic_cmpxchg(&panic_cpu, PANIC_CPU_INVALID, cpu);	\
> -									\
> -	if (old_cpu == PANIC_CPU_INVALID)				\
> -		panic(fmt, ##__VA_ARGS__);				\
> -	else if (old_cpu != cpu)					\
> -		nmi_panic_self_stop(regs);				\
> -} while (0)
> -
> -/*
>   * Only to be used by arch init code. If the user over-wrote the default
>   * CONFIG_PANIC_TIMEOUT, honor it.
>   */
> diff --git a/kernel/panic.c b/kernel/panic.c
> index d96469d..8abfc30 100644
> --- a/kernel/panic.c
> +++ b/kernel/panic.c
> @@ -72,6 +72,26 @@ void __weak nmi_panic_self_stop(struct pt_regs *regs)
>  
>  atomic_t panic_cpu = ATOMIC_INIT(PANIC_CPU_INVALID);
>  
> +/*
> + * A variant of panic() called from NMI context. We return if we've already
> + * panicked on this CPU. If another CPU already panicked, loop in
> + * nmi_panic_self_stop() which can provide architecture dependent code such
> + * as saving register state for crash dump.
> + */
> +void nmi_panic(struct pt_regs *regs, const char *msg)
> +{
> +	int old_cpu, cpu;
> +
> +	cpu = raw_smp_processor_id();
> +	old_cpu = atomic_cmpxchg(&panic_cpu, PANIC_CPU_INVALID, cpu);
> +
> +	if (old_cpu == PANIC_CPU_INVALID)
> +		panic("%s", msg);
> +	else if (old_cpu != cpu)
> +		nmi_panic_self_stop(regs);
> +}
> +EXPORT_SYMBOL(nmi_panic);
> +
>  /**
>   *	panic - halt the system
>   *	@fmt: The text string to print
> 
> 

-- 
Michal Hocko
SUSE Labs

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [v3 PATCH 1/3] panic: Change nmi_panic from macro to function
  2016-03-03 10:57 ` [v3 PATCH 1/3] panic: Change nmi_panic from macro to function Hidehiro Kawai
@ 2016-03-04 19:27     ` Michal Nazarewicz
  2016-03-04 17:49   ` Michal Hocko
  2016-03-04 19:27     ` Michal Nazarewicz
  2 siblings, 0 replies; 15+ messages in thread
From: Michal Nazarewicz @ 2016-03-04 19:27 UTC (permalink / raw)
  To: Hidehiro Kawai, Andrew Morton, Thomas Mingarelli,
	Wim Van Sebroeck, Corey Minyard
  Cc: Javi Merino, Michal Hocko, linux-watchdog,
	Steven Rostedt (Red Hat),
	Rasmus Villemoes, linux-kernel, Michal Hocko, Vitaly Kuznetsov,
	HATAYAMA Daisuke, Borislav Petkov, Gobinda Charan Maji,
	Tejun Heo, Nicolas Iooss, openipmi-developer, Borislav Petkov,
	Thomas Gleixner, Guenter Roeck

On Thu, Mar 03 2016, Hidehiro Kawai wrote:
> Change nmi_panic() macro to a normal function for the portability.
> Also, export it for modules.
>
> Changes since v2:
> - Make nmi_panic receive a single string instead of printf style args
>
> Signed-off-by: Hidehiro Kawai <hidehiro.kawai.ez@hitachi.com>
> Cc: Andrew Morton <akpm@linux-foundation.org>
> Cc: Borislav Petkov <bp@suse.de>
> Cc: Michal Nazarewicz <mina86@mina86.com>

Code does what the commit advertises so

Acked-by: Michal Nazarewicz <mina86@mina86.com>

> Cc: Michal Hocko <mhocko@suse.com>
> Cc: Rasmus Villemoes <linux@rasmusvillemoes.dk>
> Cc: Nicolas Iooss <nicolas.iooss_linux@m4x.org>
> Cc: Javi Merino <javi.merino@arm.com>
> Cc: Gobinda Charan Maji <gobinda.cemk07@gmail.com>
> Cc: "Steven Rostedt (Red Hat)" <rostedt@goodmis.org>
> Cc: Thomas Gleixner <tglx@linutronix.de>
> Cc: Vitaly Kuznetsov <vkuznets@redhat.com>
> Cc: HATAYAMA Daisuke <d.hatayama@jp.fujitsu.com>
> Cc: Tejun Heo <tj@kernel.org>
> ---
>  include/linux/kernel.h |   21 +-------------------
>  kernel/panic.c         |   20 ++++++++++++++++++++
>  2 files changed, 21 insertions(+), 20 deletions(-)
>
> diff --git a/include/linux/kernel.h b/include/linux/kernel.h
> index f31638c..cbe7d70 100644
> --- a/include/linux/kernel.h
> +++ b/include/linux/kernel.h
> @@ -255,7 +255,7 @@ extern long (*panic_blink)(int state);
>  __printf(1, 2)
>  void panic(const char *fmt, ...)
>  	__noreturn __cold;
> -void nmi_panic_self_stop(struct pt_regs *);
> +void nmi_panic(struct pt_regs *regs, const char *msg);
>  extern void oops_enter(void);
>  extern void oops_exit(void);
>  void print_oops_end_marker(void);
> @@ -455,25 +455,6 @@ extern atomic_t panic_cpu;
>  #define PANIC_CPU_INVALID	-1
>  
>  /*
> - * A variant of panic() called from NMI context. We return if we've already
> - * panicked on this CPU. If another CPU already panicked, loop in
> - * nmi_panic_self_stop() which can provide architecture dependent code such
> - * as saving register state for crash dump.
> - */
> -#define nmi_panic(regs, fmt, ...)					\
> -do {									\
> -	int old_cpu, cpu;						\
> -									\
> -	cpu = raw_smp_processor_id();					\
> -	old_cpu = atomic_cmpxchg(&panic_cpu, PANIC_CPU_INVALID, cpu);	\
> -									\
> -	if (old_cpu == PANIC_CPU_INVALID)				\
> -		panic(fmt, ##__VA_ARGS__);				\
> -	else if (old_cpu != cpu)					\
> -		nmi_panic_self_stop(regs);				\
> -} while (0)
> -
> -/*
>   * Only to be used by arch init code. If the user over-wrote the default
>   * CONFIG_PANIC_TIMEOUT, honor it.
>   */
> diff --git a/kernel/panic.c b/kernel/panic.c
> index d96469d..8abfc30 100644
> --- a/kernel/panic.c
> +++ b/kernel/panic.c
> @@ -72,6 +72,26 @@ void __weak nmi_panic_self_stop(struct pt_regs *regs)
>  
>  atomic_t panic_cpu = ATOMIC_INIT(PANIC_CPU_INVALID);
>  
> +/*
> + * A variant of panic() called from NMI context. We return if we've already
> + * panicked on this CPU. If another CPU already panicked, loop in
> + * nmi_panic_self_stop() which can provide architecture dependent code such
> + * as saving register state for crash dump.
> + */
> +void nmi_panic(struct pt_regs *regs, const char *msg)
> +{
> +	int old_cpu, cpu;
> +
> +	cpu = raw_smp_processor_id();
> +	old_cpu = atomic_cmpxchg(&panic_cpu, PANIC_CPU_INVALID, cpu);
> +
> +	if (old_cpu == PANIC_CPU_INVALID)
> +		panic("%s", msg);
> +	else if (old_cpu != cpu)
> +		nmi_panic_self_stop(regs);
> +}
> +EXPORT_SYMBOL(nmi_panic);
> +
>  /**
>   *	panic - halt the system
>   *	@fmt: The text string to print
>
>

-- 
Best regards
ミハウ “𝓶𝓲𝓷𝓪86” ナザレヴイツ
«If at first you don’t succeed, give up skydiving»

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [v3 PATCH 1/3] panic: Change nmi_panic from macro to function
@ 2016-03-04 19:27     ` Michal Nazarewicz
  0 siblings, 0 replies; 15+ messages in thread
From: Michal Nazarewicz @ 2016-03-04 19:27 UTC (permalink / raw)
  To: Hidehiro Kawai, Andrew Morton, Thomas Mingarelli,
	Wim Van Sebroeck, Corey Minyard
  Cc: Javi Merino, Michal Hocko, linux-watchdog,
	Steven Rostedt (Red Hat),
	Rasmus Villemoes, linux-kernel, Michal Hocko, Vitaly Kuznetsov,
	HATAYAMA Daisuke, Borislav Petkov, Gobinda Charan Maji,
	Tejun Heo, Nicolas Iooss, openipmi-developer, Borislav Petkov,
	Thomas Gleixner, Guenter Roeck

On Thu, Mar 03 2016, Hidehiro Kawai wrote:
> Change nmi_panic() macro to a normal function for the portability.
> Also, export it for modules.
>
> Changes since v2:
> - Make nmi_panic receive a single string instead of printf style args
>
> Signed-off-by: Hidehiro Kawai <hidehiro.kawai.ez@hitachi.com>
> Cc: Andrew Morton <akpm@linux-foundation.org>
> Cc: Borislav Petkov <bp@suse.de>
> Cc: Michal Nazarewicz <mina86@mina86.com>

Code does what the commit advertises so

Acked-by: Michal Nazarewicz <mina86@mina86.com>

> Cc: Michal Hocko <mhocko@suse.com>
> Cc: Rasmus Villemoes <linux@rasmusvillemoes.dk>
> Cc: Nicolas Iooss <nicolas.iooss_linux@m4x.org>
> Cc: Javi Merino <javi.merino@arm.com>
> Cc: Gobinda Charan Maji <gobinda.cemk07@gmail.com>
> Cc: "Steven Rostedt (Red Hat)" <rostedt@goodmis.org>
> Cc: Thomas Gleixner <tglx@linutronix.de>
> Cc: Vitaly Kuznetsov <vkuznets@redhat.com>
> Cc: HATAYAMA Daisuke <d.hatayama@jp.fujitsu.com>
> Cc: Tejun Heo <tj@kernel.org>
> ---
>  include/linux/kernel.h |   21 +-------------------
>  kernel/panic.c         |   20 ++++++++++++++++++++
>  2 files changed, 21 insertions(+), 20 deletions(-)
>
> diff --git a/include/linux/kernel.h b/include/linux/kernel.h
> index f31638c..cbe7d70 100644
> --- a/include/linux/kernel.h
> +++ b/include/linux/kernel.h
> @@ -255,7 +255,7 @@ extern long (*panic_blink)(int state);
>  __printf(1, 2)
>  void panic(const char *fmt, ...)
>  	__noreturn __cold;
> -void nmi_panic_self_stop(struct pt_regs *);
> +void nmi_panic(struct pt_regs *regs, const char *msg);
>  extern void oops_enter(void);
>  extern void oops_exit(void);
>  void print_oops_end_marker(void);
> @@ -455,25 +455,6 @@ extern atomic_t panic_cpu;
>  #define PANIC_CPU_INVALID	-1
>  
>  /*
> - * A variant of panic() called from NMI context. We return if we've already
> - * panicked on this CPU. If another CPU already panicked, loop in
> - * nmi_panic_self_stop() which can provide architecture dependent code such
> - * as saving register state for crash dump.
> - */
> -#define nmi_panic(regs, fmt, ...)					\
> -do {									\
> -	int old_cpu, cpu;						\
> -									\
> -	cpu = raw_smp_processor_id();					\
> -	old_cpu = atomic_cmpxchg(&panic_cpu, PANIC_CPU_INVALID, cpu);	\
> -									\
> -	if (old_cpu == PANIC_CPU_INVALID)				\
> -		panic(fmt, ##__VA_ARGS__);				\
> -	else if (old_cpu != cpu)					\
> -		nmi_panic_self_stop(regs);				\
> -} while (0)
> -
> -/*
>   * Only to be used by arch init code. If the user over-wrote the default
>   * CONFIG_PANIC_TIMEOUT, honor it.
>   */
> diff --git a/kernel/panic.c b/kernel/panic.c
> index d96469d..8abfc30 100644
> --- a/kernel/panic.c
> +++ b/kernel/panic.c
> @@ -72,6 +72,26 @@ void __weak nmi_panic_self_stop(struct pt_regs *regs)
>  
>  atomic_t panic_cpu = ATOMIC_INIT(PANIC_CPU_INVALID);
>  
> +/*
> + * A variant of panic() called from NMI context. We return if we've already
> + * panicked on this CPU. If another CPU already panicked, loop in
> + * nmi_panic_self_stop() which can provide architecture dependent code such
> + * as saving register state for crash dump.
> + */
> +void nmi_panic(struct pt_regs *regs, const char *msg)
> +{
> +	int old_cpu, cpu;
> +
> +	cpu = raw_smp_processor_id();
> +	old_cpu = atomic_cmpxchg(&panic_cpu, PANIC_CPU_INVALID, cpu);
> +
> +	if (old_cpu == PANIC_CPU_INVALID)
> +		panic("%s", msg);
> +	else if (old_cpu != cpu)
> +		nmi_panic_self_stop(regs);
> +}
> +EXPORT_SYMBOL(nmi_panic);
> +
>  /**
>   *	panic - halt the system
>   *	@fmt: The text string to print
>
>

-- 
Best regards
ミハウ “𝓶𝓲𝓷𝓪86” ナザレヴイツ
«If at first you don’t succeed, give up skydiving»
--
To unsubscribe from this list: send the line "unsubscribe linux-watchdog" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 15+ messages in thread

* RE: [v3 PATCH 1/3] panic: Change nmi_panic from macro to function
  2016-03-03 13:14   ` Borislav Petkov
@ 2016-03-07 10:53       ` 河合英宏 / KAWAI,HIDEHIRO
  0 siblings, 0 replies; 15+ messages in thread
From: 河合英宏 / KAWAI,HIDEHIRO @ 2016-03-07 10:53 UTC (permalink / raw)
  To: 'Borislav Petkov'
  Cc: Andrew Morton, Thomas Mingarelli, Wim Van Sebroeck,
	Corey Minyard, Javi Merino, Michal Hocko, linux-watchdog,
	Steven Rostedt (Red Hat),
	Rasmus Villemoes, linux-kernel, Michal Nazarewicz, Michal Hocko,
	Vitaly Kuznetsov, HATAYAMA Daisuke, Gobinda Charan Maji,
	Tejun Heo, Nicolas Iooss, openipmi-developer, Thomas Gleixner,
	Guenter Roeck

> From: Borislav Petkov [mailto:bp@alien8.de]
> On Thu, Mar 03, 2016 at 07:57:44PM +0900, Hidehiro Kawai wrote:
> > Change nmi_panic() macro to a normal function for the portability.
> 
> portability?

I wanted to say encapsulating things into a function makes modules
only have to know about the function. Modules don't need to know
all things in the macro.  But I thought again, and `portability'
was not appropriate.

However, this patch set has been queued into -mm now.  So I'll
leave this if not necessary.

Regards,
Hidehiro Kawai

> > Also, export it for modules.
> >
> > Changes since v2:
> > - Make nmi_panic receive a single string instead of printf style args
> >
> > Signed-off-by: Hidehiro Kawai <hidehiro.kawai.ez@hitachi.com>
> > Cc: Andrew Morton <akpm@linux-foundation.org>
> > Cc: Borislav Petkov <bp@suse.de>
> > Cc: Michal Nazarewicz <mina86@mina86.com>
> > Cc: Michal Hocko <mhocko@suse.com>
> > Cc: Rasmus Villemoes <linux@rasmusvillemoes.dk>
> > Cc: Nicolas Iooss <nicolas.iooss_linux@m4x.org>
> > Cc: Javi Merino <javi.merino@arm.com>
> > Cc: Gobinda Charan Maji <gobinda.cemk07@gmail.com>
> > Cc: "Steven Rostedt (Red Hat)" <rostedt@goodmis.org>
> > Cc: Thomas Gleixner <tglx@linutronix.de>
> > Cc: Vitaly Kuznetsov <vkuznets@redhat.com>
> > Cc: HATAYAMA Daisuke <d.hatayama@jp.fujitsu.com>
> > Cc: Tejun Heo <tj@kernel.org>
> > ---
> >  include/linux/kernel.h |   21 +--------------------
> >  kernel/panic.c         |   20 ++++++++++++++++++++
> >  2 files changed, 21 insertions(+), 20 deletions(-)
> 
> Acked-by: Borislav Petkov <bp@suse.de>
> 
> --
> Regards/Gruss,
>     Boris.
> 
> ECO tip #101: Trim your mails when you reply.

^ permalink raw reply	[flat|nested] 15+ messages in thread

* RE: [v3 PATCH 1/3] panic: Change nmi_panic from macro to function
@ 2016-03-07 10:53       ` 河合英宏 / KAWAI,HIDEHIRO
  0 siblings, 0 replies; 15+ messages in thread
From: 河合英宏 / KAWAI,HIDEHIRO @ 2016-03-07 10:53 UTC (permalink / raw)
  To: 'Borislav Petkov'
  Cc: Andrew Morton, Thomas Mingarelli, Wim Van Sebroeck,
	Corey Minyard, Javi Merino, Michal Hocko, linux-watchdog,
	Steven Rostedt (Red Hat),
	Rasmus Villemoes, linux-kernel, Michal Nazarewicz, Michal Hocko,
	Vitaly Kuznetsov, HATAYAMA Daisuke, Gobinda Charan Maji,
	Tejun Heo, Nicolas Iooss, openipmi-developer, Thomas Gleixner,
	Guenter Roeck

> From: Borislav Petkov [mailto:bp@alien8.de]
> On Thu, Mar 03, 2016 at 07:57:44PM +0900, Hidehiro Kawai wrote:
> > Change nmi_panic() macro to a normal function for the portability.
> 
> portability?

I wanted to say encapsulating things into a function makes modules
only have to know about the function. Modules don't need to know
all things in the macro.  But I thought again, and `portability'
was not appropriate.

However, this patch set has been queued into -mm now.  So I'll
leave this if not necessary.

Regards,
Hidehiro Kawai

> > Also, export it for modules.
> >
> > Changes since v2:
> > - Make nmi_panic receive a single string instead of printf style args
> >
> > Signed-off-by: Hidehiro Kawai <hidehiro.kawai.ez@hitachi.com>
> > Cc: Andrew Morton <akpm@linux-foundation.org>
> > Cc: Borislav Petkov <bp@suse.de>
> > Cc: Michal Nazarewicz <mina86@mina86.com>
> > Cc: Michal Hocko <mhocko@suse.com>
> > Cc: Rasmus Villemoes <linux@rasmusvillemoes.dk>
> > Cc: Nicolas Iooss <nicolas.iooss_linux@m4x.org>
> > Cc: Javi Merino <javi.merino@arm.com>
> > Cc: Gobinda Charan Maji <gobinda.cemk07@gmail.com>
> > Cc: "Steven Rostedt (Red Hat)" <rostedt@goodmis.org>
> > Cc: Thomas Gleixner <tglx@linutronix.de>
> > Cc: Vitaly Kuznetsov <vkuznets@redhat.com>
> > Cc: HATAYAMA Daisuke <d.hatayama@jp.fujitsu.com>
> > Cc: Tejun Heo <tj@kernel.org>
> > ---
> >  include/linux/kernel.h |   21 +--------------------
> >  kernel/panic.c         |   20 ++++++++++++++++++++
> >  2 files changed, 21 insertions(+), 20 deletions(-)
> 
> Acked-by: Borislav Petkov <bp@suse.de>
> 
> --
> Regards/Gruss,
>     Boris.
> 
> ECO tip #101: Trim your mails when you reply.

^ permalink raw reply	[flat|nested] 15+ messages in thread

* RE: [Openipmi-developer] [v3 PATCH 3/3] hpwdt: Use nmi_panic() when kernel panics in NMI handler
  2016-03-03 10:57 ` [v3 PATCH 3/3] hpwdt: " Hidehiro Kawai
@ 2016-03-07 11:07     ` 河合英宏 / KAWAI,HIDEHIRO
  2016-03-07 11:07     ` 河合英宏 / KAWAI,HIDEHIRO
  1 sibling, 0 replies; 15+ messages in thread
From: 河合英宏 / KAWAI,HIDEHIRO @ 2016-03-07 11:07 UTC (permalink / raw)
  To: 河合英宏 / KAWAI,HIDEHIRO,
	Andrew Morton, Thomas Mingarelli, Wim Van Sebroeck,
	Corey Minyard
  Cc: linux-watchdog, linux-kernel, Michal Hocko, Borislav Petkov,
	openipmi-developer, Guenter Roeck

> From: Phil Pokorny [mailto:ppokorny@penguincomputing.com]
> 
> While you are in drivers/watchdog/hpwdt.c replacing panic() with
> nmi_panic() can you also fix a few more of the broken strings?  The
> Linux style guide specfiically says NOT to break strings that are user
> visible because it breaks "grep".  So:

Ahh, yes.  I should have fixed this as well as the former case.
But this patch set has already been queued into -mm tree, so
I'll leave this patch if the fix is not important.

Regards,
Hidehiro Kawai

> 
> -       panic("An NMI occurred. Depending on your system the reason "
> +       nmi_panic(regs, "An NMI occurred. Depending on your system the reason "
>                 "for the NMI is logged in any one of the following "
>                 "resources:\n"
>                 "1. Integrated Management Log (IML)\n"
> 
> Should probably be:
> 
> -       panic("An NMI occurred. Depending on your system the reason "
> -                "for the NMI is logged in any one of the following "
> -                "resources:\n"
> +       nmi_panic(regs, "An NMI occurred. Depending on your system the
> reason for the NMI is logged in any one of the following resources:\n"
>                 "1. Integrated Management Log (IML)\n"
> 
> So it's okay to break on "\n", but not in the middle of a line.
> 
> --
> Philip Pokorny, RHCE
> Chief Technology Officer
> PENGUIN COMPUTING, Inc
> www.penguincomputing.com
> 
> Changing the world through technical innovation

^ permalink raw reply	[flat|nested] 15+ messages in thread

* RE: [Openipmi-developer] [v3 PATCH 3/3] hpwdt: Use nmi_panic() when kernel panics in NMI handler
@ 2016-03-07 11:07     ` 河合英宏 / KAWAI,HIDEHIRO
  0 siblings, 0 replies; 15+ messages in thread
From: 河合英宏 / KAWAI,HIDEHIRO @ 2016-03-07 11:07 UTC (permalink / raw)
  To: 河合英宏 / KAWAI,HIDEHIRO,
	Andrew Morton, Thomas Mingarelli, Wim Van Sebroeck,
	Corey Minyard
  Cc: linux-watchdog, linux-kernel, Michal Hocko, Borislav Petkov,
	openipmi-developer, Guenter Roeck

> From: Phil Pokorny [mailto:ppokorny@penguincomputing.com]
> 
> While you are in drivers/watchdog/hpwdt.c replacing panic() with
> nmi_panic() can you also fix a few more of the broken strings?  The
> Linux style guide specfiically says NOT to break strings that are user
> visible because it breaks "grep".  So:

Ahh, yes.  I should have fixed this as well as the former case.
But this patch set has already been queued into -mm tree, so
I'll leave this patch if the fix is not important.

Regards,
Hidehiro Kawai

> 
> -       panic("An NMI occurred. Depending on your system the reason "
> +       nmi_panic(regs, "An NMI occurred. Depending on your system the reason "
>                 "for the NMI is logged in any one of the following "
>                 "resources:\n"
>                 "1. Integrated Management Log (IML)\n"
> 
> Should probably be:
> 
> -       panic("An NMI occurred. Depending on your system the reason "
> -                "for the NMI is logged in any one of the following "
> -                "resources:\n"
> +       nmi_panic(regs, "An NMI occurred. Depending on your system the
> reason for the NMI is logged in any one of the following resources:\n"
>                 "1. Integrated Management Log (IML)\n"
> 
> So it's okay to break on "\n", but not in the middle of a line.
> 
> --
> Philip Pokorny, RHCE
> Chief Technology Officer
> PENGUIN COMPUTING, Inc
> www.penguincomputing.com
> 
> Changing the world through technical innovation

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [v3 PATCH 1/3] panic: Change nmi_panic from macro to function
  2016-03-07 10:53       ` 河合英宏 / KAWAI,HIDEHIRO
@ 2016-03-07 11:13         ` Borislav Petkov
  -1 siblings, 0 replies; 15+ messages in thread
From: Borislav Petkov @ 2016-03-07 11:13 UTC (permalink / raw)
  To: 河合英宏 / KAWAI,HIDEHIRO
  Cc: Andrew Morton, Thomas Mingarelli, Wim Van Sebroeck,
	Corey Minyard, Javi Merino, Michal Hocko, linux-watchdog,
	Steven Rostedt (Red Hat),
	Rasmus Villemoes, linux-kernel, Michal Nazarewicz, Michal Hocko,
	Vitaly Kuznetsov, HATAYAMA Daisuke, Gobinda Charan Maji,
	Tejun Heo, Nicolas Iooss, openipmi-developer, Thomas Gleixner,
	Guenter Roeck

On Mon, Mar 07, 2016 at 10:53:51AM +0000, 河合英宏 / KAWAI,HIDEHIRO wrote:
> > From: Borislav Petkov [mailto:bp@alien8.de]
> > On Thu, Mar 03, 2016 at 07:57:44PM +0900, Hidehiro Kawai wrote:
> > > Change nmi_panic() macro to a normal function for the portability.
> > 
> > portability?
> 
> I wanted to say encapsulating things into a function makes modules
> only have to know about the function. Modules don't need to know
> all things in the macro.  But I thought again, and `portability'
> was not appropriate.
> 
> However, this patch set has been queued into -mm now.  So I'll
> leave this if not necessary.

Unless Andrew is willing to do a quick "quilt header -e" on your patch
and paste in a corrected commit message text which you give him...

:-)

-- 
Regards/Gruss,
    Boris.

ECO tip #101: Trim your mails when you reply.

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: [v3 PATCH 1/3] panic: Change nmi_panic from macro to function
@ 2016-03-07 11:13         ` Borislav Petkov
  0 siblings, 0 replies; 15+ messages in thread
From: Borislav Petkov @ 2016-03-07 11:13 UTC (permalink / raw)
  To: 河合英宏 / KAWAI,HIDEHIRO
  Cc: Andrew Morton, Thomas Mingarelli, Wim Van Sebroeck,
	Corey Minyard, Javi Merino, Michal Hocko, linux-watchdog,
	Steven Rostedt (Red Hat),
	Rasmus Villemoes, linux-kernel, Michal Nazarewicz, Michal Hocko,
	Vitaly Kuznetsov, HATAYAMA Daisuke, Gobinda Charan Maji,
	Tejun Heo, Nicolas Iooss, openipmi-developer, Thomas Gleixner,
	Guenter Roeck

On Mon, Mar 07, 2016 at 10:53:51AM +0000, 河合英宏 / KAWAI,HIDEHIRO wrote:
> > From: Borislav Petkov [mailto:bp@alien8.de]
> > On Thu, Mar 03, 2016 at 07:57:44PM +0900, Hidehiro Kawai wrote:
> > > Change nmi_panic() macro to a normal function for the portability.
> > 
> > portability?
> 
> I wanted to say encapsulating things into a function makes modules
> only have to know about the function. Modules don't need to know
> all things in the macro.  But I thought again, and `portability'
> was not appropriate.
> 
> However, this patch set has been queued into -mm now.  So I'll
> leave this if not necessary.

Unless Andrew is willing to do a quick "quilt header -e" on your patch
and paste in a corrected commit message text which you give him...

:-)

-- 
Regards/Gruss,
    Boris.

ECO tip #101: Trim your mails when you reply.
--
To unsubscribe from this list: send the line "unsubscribe linux-watchdog" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2016-03-07 11:13 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-03-03 10:57 [v3 PATCH 0/3] Use nmi_panic() in panic on NMI case Hidehiro Kawai
2016-03-03 10:57 ` [v3 PATCH 1/3] panic: Change nmi_panic from macro to function Hidehiro Kawai
2016-03-03 13:14   ` Borislav Petkov
2016-03-07 10:53     ` 河合英宏 / KAWAI,HIDEHIRO
2016-03-07 10:53       ` 河合英宏 / KAWAI,HIDEHIRO
2016-03-07 11:13       ` Borislav Petkov
2016-03-07 11:13         ` Borislav Petkov
2016-03-04 17:49   ` Michal Hocko
2016-03-04 19:27   ` Michal Nazarewicz
2016-03-04 19:27     ` Michal Nazarewicz
2016-03-03 10:57 ` [v3 PATCH 2/3] ipmi/watchdog: Use nmi_panic() when kernel panics in NMI handler Hidehiro Kawai
2016-03-03 10:57 ` [v3 PATCH 3/3] hpwdt: " Hidehiro Kawai
2016-03-03 12:17   ` Guenter Roeck
2016-03-07 11:07   ` [Openipmi-developer] " 河合英宏 / KAWAI,HIDEHIRO
2016-03-07 11:07     ` 河合英宏 / KAWAI,HIDEHIRO

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.