* [PATCH 1/1] Drivers: hv: vmbus: Only notify Hyper-V for die events that are oops
@ 2020-08-06 16:22 Michael Kelley
2020-08-07 9:06 ` Vitaly Kuznetsov
0 siblings, 1 reply; 3+ messages in thread
From: Michael Kelley @ 2020-08-06 16:22 UTC (permalink / raw)
To: linux-kernel, vkuznets, kys, sthemmin, wei.liu, linux-hyperv; +Cc: mikelley
Hyper-V currently may be notified of a panic for any die event. But
this results in false panic notifications for various user space traps
that are die events. Fix this by ignoring die events that aren't oops.
Fixes: 510f7aef65bb ("Drivers: hv: vmbus: prefer 'die' notification chain to 'panic'")
Signed-off-by: Michael Kelley <mikelley@microsoft.com>
---
drivers/hv/vmbus_drv.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/hv/vmbus_drv.c b/drivers/hv/vmbus_drv.c
index b50081c..910b6e9 100644
--- a/drivers/hv/vmbus_drv.c
+++ b/drivers/hv/vmbus_drv.c
@@ -86,6 +86,10 @@ static int hyperv_die_event(struct notifier_block *nb, unsigned long val,
struct die_args *die = (struct die_args *)args;
struct pt_regs *regs = die->regs;
+ /* Don't notify Hyper-V if the die event is other than oops */
+ if (val != DIE_OOPS)
+ return NOTIFY_DONE;
+
/*
* Hyper-V should be notified only once about a panic. If we will be
* doing hyperv_report_panic_msg() later with kmsg data, don't do
--
1.8.3.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH 1/1] Drivers: hv: vmbus: Only notify Hyper-V for die events that are oops
2020-08-06 16:22 [PATCH 1/1] Drivers: hv: vmbus: Only notify Hyper-V for die events that are oops Michael Kelley
@ 2020-08-07 9:06 ` Vitaly Kuznetsov
2020-08-07 13:49 ` Wei Liu
0 siblings, 1 reply; 3+ messages in thread
From: Vitaly Kuznetsov @ 2020-08-07 9:06 UTC (permalink / raw)
To: Michael Kelley
Cc: mikelley, linux-kernel, kys, sthemmin, wei.liu, linux-hyperv
Michael Kelley <mikelley@microsoft.com> writes:
> Hyper-V currently may be notified of a panic for any die event. But
> this results in false panic notifications for various user space traps
> that are die events. Fix this by ignoring die events that aren't oops.
>
> Fixes: 510f7aef65bb ("Drivers: hv: vmbus: prefer 'die' notification chain to 'panic'")
> Signed-off-by: Michael Kelley <mikelley@microsoft.com>
> ---
> drivers/hv/vmbus_drv.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/drivers/hv/vmbus_drv.c b/drivers/hv/vmbus_drv.c
> index b50081c..910b6e9 100644
> --- a/drivers/hv/vmbus_drv.c
> +++ b/drivers/hv/vmbus_drv.c
> @@ -86,6 +86,10 @@ static int hyperv_die_event(struct notifier_block *nb, unsigned long val,
> struct die_args *die = (struct die_args *)args;
> struct pt_regs *regs = die->regs;
>
> + /* Don't notify Hyper-V if the die event is other than oops */
> + if (val != DIE_OOPS)
> + return NOTIFY_DONE;
> +
Looking at die_val enum, DIE_PANIC also sounds like something we would
want to report but it doesn't get emitted anywhere and honestly I don't
quite understand how is was supposed to be different from DIE_OOPS.
Reviewed-by: Vitaly Kuznetsov <vkuznets@redhat.com>
> /*
> * Hyper-V should be notified only once about a panic. If we will be
> * doing hyperv_report_panic_msg() later with kmsg data, don't do
--
Vitaly
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH 1/1] Drivers: hv: vmbus: Only notify Hyper-V for die events that are oops
2020-08-07 9:06 ` Vitaly Kuznetsov
@ 2020-08-07 13:49 ` Wei Liu
0 siblings, 0 replies; 3+ messages in thread
From: Wei Liu @ 2020-08-07 13:49 UTC (permalink / raw)
To: Vitaly Kuznetsov
Cc: Michael Kelley, linux-kernel, kys, sthemmin, wei.liu, linux-hyperv
On Fri, Aug 07, 2020 at 11:06:47AM +0200, Vitaly Kuznetsov wrote:
> Michael Kelley <mikelley@microsoft.com> writes:
>
> > Hyper-V currently may be notified of a panic for any die event. But
> > this results in false panic notifications for various user space traps
> > that are die events. Fix this by ignoring die events that aren't oops.
> >
> > Fixes: 510f7aef65bb ("Drivers: hv: vmbus: prefer 'die' notification chain to 'panic'")
> > Signed-off-by: Michael Kelley <mikelley@microsoft.com>
> > ---
> > drivers/hv/vmbus_drv.c | 4 ++++
> > 1 file changed, 4 insertions(+)
> >
> > diff --git a/drivers/hv/vmbus_drv.c b/drivers/hv/vmbus_drv.c
> > index b50081c..910b6e9 100644
> > --- a/drivers/hv/vmbus_drv.c
> > +++ b/drivers/hv/vmbus_drv.c
> > @@ -86,6 +86,10 @@ static int hyperv_die_event(struct notifier_block *nb, unsigned long val,
> > struct die_args *die = (struct die_args *)args;
> > struct pt_regs *regs = die->regs;
> >
> > + /* Don't notify Hyper-V if the die event is other than oops */
> > + if (val != DIE_OOPS)
> > + return NOTIFY_DONE;
> > +
>
> Looking at die_val enum, DIE_PANIC also sounds like something we would
> want to report but it doesn't get emitted anywhere and honestly I don't
> quite understand how is was supposed to be different from DIE_OOPS.
>
> Reviewed-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Applied to hyperv-fixes.
Wei.
>
> > /*
> > * Hyper-V should be notified only once about a panic. If we will be
> > * doing hyperv_report_panic_msg() later with kmsg data, don't do
>
> --
> Vitaly
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-08-07 13:49 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-06 16:22 [PATCH 1/1] Drivers: hv: vmbus: Only notify Hyper-V for die events that are oops Michael Kelley
2020-08-07 9:06 ` Vitaly Kuznetsov
2020-08-07 13:49 ` Wei Liu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).