FAILED: patch "[PATCH] x86/Hyper-V: Report crash data in die() when panic_on_oops is" failed to apply to 4.19-stable tree
[email protected]
maintainerThe patch below does not apply to the 4.19-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From f3a99e761efa616028b255b4de58e9b5b87c5545 Mon Sep 17 00:00:00 2001
From: Tianyu Lan <[email protected]>
Date: Mon, 6 Apr 2020 08:53:31 -0700
Subject: [PATCH] x86/Hyper-V: Report crash data in die() when panic_on_oops is
set
When oops happens with panic_on_oops unset, the oops thread is killed by die() and system continues to run. In such case, guest should not report crash register data to host since system still runs. Check panic_on_oops and return directly in hyperv_report_panic() when the function is called in the die() and panic_on_oops is unset. Fix it.
arch/x86/hyperv/hv_init.c +5 -1
@@ -20,6 +20,7 @@#include <linux/mm.h> #include <linux/hyperv.h> #include <linux/slab.h> +#include <linux/kernel.h> #include <linux/cpuhotplug.h> #include <linux/syscore_ops.h> #include <clocksource/hyperv_timer.h>
@@ -419,11 +420,14 @@ void hyperv_cleanup(void) }EXPORT_SYMBOL_GPL (hyperv_cleanup); -void hyperv_report_panic (struct pt_regs *regs,long err) +void hyperv_report_panic (struct pt_regs *regs,long err,bool in_die) {static bool panic_reported;u64 guest_id; +if (in_die && !panic_on_oops) +return ; +/* * We prefer to report panic on 'die' chain as we have proper * registers to report, but if we miss it (e.g. on BUG()) we need
drivers/hv/vmbus_drv.c +3 -2
@@ -31,6 +31,7 @@#include <linux/kdebug.h> #include <linux/efi.h> #include <linux/random.h> +#include <linux/kernel.h> #include <linux/syscore_ops.h> #include <clocksource/hyperv_timer.h> #include "hyperv_vmbus.h"
@@ -75,7 +76,7 @@ static int hyperv_panic_event(struct notifier_block *nb, unsigned long val,if (ms_hyperv.misc_features &HV_FEATURE_GUEST_CRASH_MSR_AVAILABLE &&hyperv_report_reg ()) { regs =current_pt_regs (); -hyperv_report_panic (regs, val); +hyperv_report_panic (regs, val, false); }return NOTIFY_DONE ; }
@@ -92,7 +93,7 @@ static int hyperv_die_event(struct notifier_block *nb, unsigned long val,* the notification here. */ if (hyperv_report_reg ()) -hyperv_report_panic (regs, val); +hyperv_report_panic (regs, val, true);return NOTIFY_DONE ; }
include/asm-generic/mshyperv.h +1 -1
@@ -163,7 +163,7 @@ static inline int cpumask_to_vpset(struct hv_vpset *vpset,return nr_bank; } -void hyperv_report_panic (struct pt_regs *regs,long err); +void hyperv_report_panic (struct pt_regs *regs,long err,bool in_die);void hyperv_report_panic_msg (phys_addr_t pa,size_t size);bool hv_is_hyperv_initialized (void );bool hv_is_hibernation_supported (void );
Sasha Levin
maintainerQuoted 25 lines · On Tue, Apr 21, 2020 at 07:13:10PM +0200, [email protected] wrote:
The patch below does not apply to the 4.19-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From
f3a99e761efa616028b255b4de58e9b5b87c5545Mon Sep 17 00:00:00 2001
From: Tianyu Lan <[email protected]>
Date: Mon, 6 Apr 2020 08:53:31 -0700
Subject: [PATCH] x86/Hyper-V: Report crash data indie()whenpanic_on_oopsis setWhen oops happens with
panic_on_oopsunset, the oops thread is killed bydie()and system continues to run. In such case, guest should not report crash register data to host since system still runs. Checkpanic_on_oopsand return directly inhyperv_report_panic()when the function is called in thedie()andpanic_on_oopsis unset. Fix it.
Quoted 5 lines
Fixes 7ed4325a44ea ("Drivers: hv: vmbus: Make panic reporting to be more useful")Signed-off-by Tianyu Lan <[email protected]>Reviewed-by Michael Kelley <[email protected]>Signed-off-by Wei Liu <[email protected]>
The additional conflicts here are due to missing suspend/resume and header movement due to missing arm64 support. Fixed and queued up.
Signature · 2 lines
Thanks, Sasha
Greg KH
maintainerQuoted 26 lines · Sasha Levin
Quoted 25 lines · On Tue, Apr 21, 2020 at 07:13:10PM +0200, [email protected] wrote:
The patch below does not apply to the 4.19-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
Quoted 1 line
From
f3a99e761efa616028b255b4de58e9b5b87c5545Mon Sep 17 00:00:00 2001From: Tianyu Lan <[email protected]>
Date: Mon, 6 Apr 2020 08:53:31 -0700
Subject: [PATCH] x86/Hyper-V: Report crash data indie()whenpanic_on_oopsis setWhen oops happens with
panic_on_oopsunset, the oops thread is killed bydie()and system continues to run. In such case, guest should not report crash register data to host since system still runs. Checkpanic_on_oopsand return directly inhyperv_report_panic()when the function is called in thedie()andpanic_on_oopsis unset. Fix it.
Quoted 8 lines
Quoted 5 lines
Fixes 7ed4325a44ea ("Drivers: hv: vmbus: Make panic reporting to be more useful")Signed-off-by Tianyu Lan <[email protected]>Reviewed-by Michael Kelley <[email protected]>Signed-off-by Wei Liu <[email protected]>The additional conflicts here are due to missing suspend/resume and header movement due to missing arm64 support. Fixed and queued up.
Thanks for all of the FAILED fixups.
greg k-h