From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 723ACC433DF for ; Fri, 7 Aug 2020 09:06:55 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 424822177B for ; Fri, 7 Aug 2020 09:06:55 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="FCC2Jg2H" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727768AbgHGJGy (ORCPT ); Fri, 7 Aug 2020 05:06:54 -0400 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:42227 "EHLO us-smtp-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726788AbgHGJGx (ORCPT ); Fri, 7 Aug 2020 05:06:53 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1596791211; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=YAgJEBejyPWGx6tEh8JOWO70ZKvKRe9vL7QVxREaPEs=; b=FCC2Jg2Hew9Po2OnKynhY4kFDT1U4ScPYdPnqb0XR8xbuCEnISH1poage58pHbuZQS/0EL wY/OBKrfCS+rNK+XPDeLF+Lx15srWsr2w1/Q5l3ARyaLilOu/6Ozp1q8JjcS1wywK+oqMo lgxcG3nalWpW6vRUaNlgsQyYpk1AKGk= Received: from mail-ed1-f69.google.com (mail-ed1-f69.google.com [209.85.208.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-263-3gLpA6-1P02nVDVV8AkXYw-1; Fri, 07 Aug 2020 05:06:49 -0400 X-MC-Unique: 3gLpA6-1P02nVDVV8AkXYw-1 Received: by mail-ed1-f69.google.com with SMTP id z11so482637edj.3 for ; Fri, 07 Aug 2020 02:06:49 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:mime-version; bh=YAgJEBejyPWGx6tEh8JOWO70ZKvKRe9vL7QVxREaPEs=; b=TuMwpuKshiyhqi0FEGAWmRFDrfqhwH5T6s/VX+HsxWzFDCoMJcySMq6Rggk6vXWBIl 0HxH1QM2ElV9NgHsOmacbzkcgBTnwtggFKyXuMWxy4MLMt7ROJDvejm7RRXdbk9X32jD lPwFAdAtC7hJf48CUfbYhjqqLljGGbRcII/Fr7edmQH9Wsyr0Z/u/ZFQaQ4vjU+pojgQ rENAnDBvgSJytLkQYhVTgXJNBXX7HRah4iK4l1TwLXEsFABoFluUo8r5U8/Jq73QCuy/ wrvFRiXJ9md2vi5smWop0WrL585S6C6P1LytRIHVQ9CwVCaZjskC+zYTPqfkg/G0B7eC q0mA== X-Gm-Message-State: AOAM531XvWJ9pwJe/TuoA4ist+1TTDjNny6jyJVXbebjdVssldjXAkci UGY1NCPcCzk9YcRuw+dHG3NUAi4Fvy29bOLAgOYVwU58SXMJotOK5Y8SOA1jHcyWbnjjg3Wrgg6 7dpqL0zzPts3NlA3lIRCDz6SV X-Received: by 2002:a17:906:d187:: with SMTP id c7mr8598725ejz.196.1596791208726; Fri, 07 Aug 2020 02:06:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw0gp4D1eeThNc0MfUqIzH9zOKg9l29PiJCQKRH1FdTYArhPiiYmHs1iPWe8+PWuyye41OG4g== X-Received: by 2002:a17:906:d187:: with SMTP id c7mr8598712ejz.196.1596791208530; Fri, 07 Aug 2020 02:06:48 -0700 (PDT) Received: from vitty.brq.redhat.com (g-server-2.ign.cz. [91.219.240.2]) by smtp.gmail.com with ESMTPSA id dr21sm705148ejc.112.2020.08.07.02.06.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 07 Aug 2020 02:06:47 -0700 (PDT) From: Vitaly Kuznetsov To: Michael Kelley Cc: mikelley@microsoft.com, linux-kernel@vger.kernel.org, kys@microsoft.com, sthemmin@microsoft.com, wei.liu@kernel.org, linux-hyperv@vger.kernel.org Subject: Re: [PATCH 1/1] Drivers: hv: vmbus: Only notify Hyper-V for die events that are oops In-Reply-To: <1596730935-11564-1-git-send-email-mikelley@microsoft.com> References: <1596730935-11564-1-git-send-email-mikelley@microsoft.com> Date: Fri, 07 Aug 2020 11:06:47 +0200 Message-ID: <87o8nmome0.fsf@vitty.brq.redhat.com> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Michael Kelley 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 > --- > 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 > /* > * 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