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=-5.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no 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 B3E0AC4346E for ; Fri, 25 Sep 2020 03:06:17 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 5F4A621481 for ; Fri, 25 Sep 2020 03:06:17 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="UcD7ReOr" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727001AbgIYDGQ (ORCPT ); Thu, 24 Sep 2020 23:06:16 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:28807 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726704AbgIYDGP (ORCPT ); Thu, 24 Sep 2020 23:06:15 -0400 Dkim-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1601003174; 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=pPyth/CR2dpYigKRz2XXFwV37AHeH6IZ34wEhpd6C0I=; b=UcD7ReOrhUshmqSIGC716n6ndzBHB+t9fYNqbYZD+E8Vf+HDKr7XgiVPnT8rV3hfXYvexE AB8M3xiFgEJfq0sr0a36aD6TjuOojsAw18s15/QIdBChR4gNRf7qJrsfECAXm9DlVVp61a AkVdMg/fTEkzc3w7Tu2Vs/FUEplCyaA= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-15-lzcnFl1kPHmEFve_DDKvEA-1; Thu, 24 Sep 2020 23:06:09 -0400 X-MC-Unique: lzcnFl1kPHmEFve_DDKvEA-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id A1D131091062; Fri, 25 Sep 2020 03:06:07 +0000 (UTC) Received: from dhcp-128-65.nay.redhat.com (ovpn-12-229.pek2.redhat.com [10.72.12.229]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 8F1B319C78; Fri, 25 Sep 2020 03:06:01 +0000 (UTC) Date: Fri, 25 Sep 2020 11:05:58 +0800 From: Dave Young To: boris.ostrovsky@oracle.com Cc: Michael Kelley , "Eric W. Biederman" , Konrad Rzeszutek Wilk , Andrew Morton , "bhe@redhat.com" , "linux-kernel@vger.kernel.org" , "kexec@lists.infradead.org" , Eric DeVolder , Tianyu Lan , Wei Liu , Masami Hiramatsu , HATAYAMA Daisuke Subject: Re: [PATCH] Only allow to set crash_kexec_post_notifiers on boot time Message-ID: <20200925030558.GA3446@dhcp-128-65.nay.redhat.com> References: <20200918032546.GA4180@dhcp-128-65.nay.redhat.com> <20200918174743.0994c59f058451948837dcb6@linux-foundation.org> <20200921201811.GB3437@char.us.oracle.com> <87v9g6fuub.fsf@x220.int.ebiederm.org> <20200923024329.GB3642@dhcp-128-65.nay.redhat.com> <20200923154825.GC7635@char.us.oracle.com> <874knndtvo.fsf@x220.int.ebiederm.org> <4f964490-7464-0071-db38-4b16d665503e@oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4f964490-7464-0071-db38-4b16d665503e@oracle.com> X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On 09/24/20 at 01:16pm, boris.ostrovsky@oracle.com wrote: > > On 9/24/20 12:43 PM, Michael Kelley wrote: > > From: Eric W. Biederman Sent: Thursday, September 24, 2020 9:26 AM > >> Michael Kelley writes: > >> > >>>>> Added Hyper-V people and people who created the param, it is below > >>>>> commit, I also want to remove it if possible, let's see how people > >>>>> think, but the least way should be to disable the auto setting in both systemd > >>>>> and kernel: > >>> Hyper-V uses a notifier to inform the host system that a Linux VM has > >>> panic'ed. Informing the host is particularly important in a public cloud > >>> such as Azure so that the cloud software can alert the customer, and can > >>> track cloud-wide reliability statistics. Whether a kdump is taken is controlled > >>> entirely by the customer and how he configures the VM, and we want > >>> the host to be informed either way. > >> Why? > >> > >> Why does the host care? > >> Especially if the VM continues executing into a kdump kernel? > > The host itself doesn't care. But the host is a convenient out-of-band > > channel for recording that a panic has occurred and to collect basic data > > about the panic. This out-of-band channel is then used to notify the end > > customer that his VM has panic'ed. Sure, the customer should be running > > his own monitoring software, but customers don't always do what they > > should. Equally important, the out-of-band channel allows the cloud > > infrastructure software to notice trends, such as that the rate of Linux > > panics has increased, and that perhaps there is a cloud problem that > > should be investigated. > > > In many cases (especially in cloud environment) your dump device is remote (e.g. iscsi) and kdump sometimes (often?) gets stuck because of connectivity issues (which could be cause of the panic in the first place). So it is quite desirable to inform the infrastructure that the VM is on its way out without waiting for kdump to complete. That can probably be done in kdump kernel if it is really needed. Say informing host that panic happened and a kdump kernel is runnning. But I think to set crash_kexec_post_notifiers by default is still bad. > > > > > >> Further like I have mentioned everytime something like this has come up > >> a call on the kexec on panic code path should be a direct call (That can > >> be audited) not something hidden in a notifier call chain (which can not). > >> > > We btw already have a direct call from panic() to kmsg_dump() which is indirectly controlled by crash_kexec_post_notifiers, and it would also be preferable to be able to call it before kdump as well. Right, that is the same thing we are talking about. Thanks Dave From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kLe3s-0007kb-8Y for kexec@lists.infradead.org; Fri, 25 Sep 2020 03:06:17 +0000 Date: Fri, 25 Sep 2020 11:05:58 +0800 From: Dave Young Subject: Re: [PATCH] Only allow to set crash_kexec_post_notifiers on boot time Message-ID: <20200925030558.GA3446@dhcp-128-65.nay.redhat.com> References: <20200918032546.GA4180@dhcp-128-65.nay.redhat.com> <20200918174743.0994c59f058451948837dcb6@linux-foundation.org> <20200921201811.GB3437@char.us.oracle.com> <87v9g6fuub.fsf@x220.int.ebiederm.org> <20200923024329.GB3642@dhcp-128-65.nay.redhat.com> <20200923154825.GC7635@char.us.oracle.com> <874knndtvo.fsf@x220.int.ebiederm.org> <4f964490-7464-0071-db38-4b16d665503e@oracle.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <4f964490-7464-0071-db38-4b16d665503e@oracle.com> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "kexec" Errors-To: kexec-bounces+dwmw2=infradead.org@lists.infradead.org To: boris.ostrovsky@oracle.com Cc: Wei Liu , Tianyu Lan , "bhe@redhat.com" , Konrad Rzeszutek Wilk , "kexec@lists.infradead.org" , "linux-kernel@vger.kernel.org" , Michael Kelley , HATAYAMA Daisuke , "Eric W. Biederman" , Masami Hiramatsu , Andrew Morton , Eric DeVolder Hi, On 09/24/20 at 01:16pm, boris.ostrovsky@oracle.com wrote: > > On 9/24/20 12:43 PM, Michael Kelley wrote: > > From: Eric W. Biederman Sent: Thursday, September 24, 2020 9:26 AM > >> Michael Kelley writes: > >> > >>>>> Added Hyper-V people and people who created the param, it is below > >>>>> commit, I also want to remove it if possible, let's see how people > >>>>> think, but the least way should be to disable the auto setting in both systemd > >>>>> and kernel: > >>> Hyper-V uses a notifier to inform the host system that a Linux VM has > >>> panic'ed. Informing the host is particularly important in a public cloud > >>> such as Azure so that the cloud software can alert the customer, and can > >>> track cloud-wide reliability statistics. Whether a kdump is taken is controlled > >>> entirely by the customer and how he configures the VM, and we want > >>> the host to be informed either way. > >> Why? > >> > >> Why does the host care? > >> Especially if the VM continues executing into a kdump kernel? > > The host itself doesn't care. But the host is a convenient out-of-band > > channel for recording that a panic has occurred and to collect basic data > > about the panic. This out-of-band channel is then used to notify the end > > customer that his VM has panic'ed. Sure, the customer should be running > > his own monitoring software, but customers don't always do what they > > should. Equally important, the out-of-band channel allows the cloud > > infrastructure software to notice trends, such as that the rate of Linux > > panics has increased, and that perhaps there is a cloud problem that > > should be investigated. > > > In many cases (especially in cloud environment) your dump device is remote (e.g. iscsi) and kdump sometimes (often?) gets stuck because of connectivity issues (which could be cause of the panic in the first place). So it is quite desirable to inform the infrastructure that the VM is on its way out without waiting for kdump to complete. That can probably be done in kdump kernel if it is really needed. Say informing host that panic happened and a kdump kernel is runnning. But I think to set crash_kexec_post_notifiers by default is still bad. > > > > > >> Further like I have mentioned everytime something like this has come up > >> a call on the kexec on panic code path should be a direct call (That can > >> be audited) not something hidden in a notifier call chain (which can not). > >> > > We btw already have a direct call from panic() to kmsg_dump() which is indirectly controlled by crash_kexec_post_notifiers, and it would also be preferable to be able to call it before kdump as well. Right, that is the same thing we are talking about. Thanks Dave _______________________________________________ kexec mailing list kexec@lists.infradead.org http://lists.infradead.org/mailman/listinfo/kexec