Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp891305pxk; Thu, 17 Sep 2020 20:29:50 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzz+1vwkavKsxerktUKGz5DlF9xsaJSnRDV2mAHzMj/2xlAsWx1VlWuQDSxUueAhjudn4cx X-Received: by 2002:a17:906:6b95:: with SMTP id l21mr33042778ejr.317.1600399790494; Thu, 17 Sep 2020 20:29:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600399790; cv=none; d=google.com; s=arc-20160816; b=cvoD7Kl0EdimobVRvaKlsNof4X27ho5Qt49LygrpgEXJ43wj8zWOcI+fgJXYWdtMCJ W/5MNxkKdShIcoLwliqkq5SB6yJjb6uWqf3cYiPn4Ov7iFIREbAGV799Gr4/nU/XG8EA A3tyxRrPBgsRq509kyZUs+sXaQsuP5h+Rc/dBS1F4SFykX5RrJMSlKg9yQvpLGJNUK3u jGh1HWmMhwEB95aUxRnlHRe4pGcdw6xAkcECjNgXCmIaxLUzi0jfsbtCqBfHIPHMsDCa oRPson7WteBrCs9meRiY8uivO3K+mYC1KWyvo+lIm/75ONI8Kpd/i+BHHGau+OkLM7l/ L/fg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-disposition:mime-version:message-id :subject:to:from:date:dkim-signature; bh=c4VwO85A9+mp2WVd9k1jCoZ5nINLwE7TYvBJh3ITwsc=; b=UgmTc+tu3rjodVnTNv7RW7JdnDG0BaP86JWxHnhgd2UPlV5wId7j1LKDGP/yYFw1SS Awt1eySmWOPVEyZTGUac7YuVTtPO7EkIqZ0BgrJyNCnJytqGso/yQ94OW3MKGzrhf9Rq 7dnZq8PH4KRgM+icv81ccmWkcXuMBj/uHtx/fHcOnMCbZAumXhZvyzf5GROOWBJ4Gfdz Q/DiCwcrrAHDNqK1f3oZ5hz4Fjj382awol8wC4uIidGXUnVd4Z3TtBDkfKy/0Ne9HuRW JCItS2pBmTK39uryjhEHDsA/Ubbi4bQzjWEgGu8mHZwGCgcKOUfWx1vGXIsY1+jPpPj8 v9jA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Mj5qhOHs; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g16si1158744edv.344.2020.09.17.20.29.27; Thu, 17 Sep 2020 20:29:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Mj5qhOHs; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726383AbgIRDZ6 (ORCPT + 99 others); Thu, 17 Sep 2020 23:25:58 -0400 Received: from us-smtp-1.mimecast.com ([207.211.31.81]:40595 "EHLO us-smtp-delivery-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726139AbgIRDZ6 (ORCPT ); Thu, 17 Sep 2020 23:25:58 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1600399557; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type; bh=c4VwO85A9+mp2WVd9k1jCoZ5nINLwE7TYvBJh3ITwsc=; b=Mj5qhOHsdC7TlnuAKUfy3jcDwziSw2zexpI747L4HsPOefBIYYlX7pws4DqOZR9V4LYt1D y43BPPyJjleBCDq+gYbr/M5GC0abCb69cEHBPamliDb70Q7vRutUDyRgJG6Xbm+AJLGdqv 0rXXXmmq/1ePN8go9Ju1Tf1O9yI6Yhg= 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-449-amqInmCUM3OsoF9jT9LLFg-1; Thu, 17 Sep 2020 23:25:53 -0400 X-MC-Unique: amqInmCUM3OsoF9jT9LLFg-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 01900188C12D; Fri, 18 Sep 2020 03:25:52 +0000 (UTC) Received: from dhcp-128-65.nay.redhat.com (ovpn-13-81.pek2.redhat.com [10.72.13.81]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 970EF78806; Fri, 18 Sep 2020 03:25:49 +0000 (UTC) Date: Fri, 18 Sep 2020 11:25:46 +0800 From: Dave Young To: Andrew Morton , bhe@redhat.com, Eric Biederman , linux-kernel@vger.kernel.org, kexec@lists.infradead.org Subject: [PATCH] Only allow to set crash_kexec_post_notifiers on boot time Message-ID: <20200918032546.GA4180@dhcp-128-65.nay.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org crash_kexec_post_notifiers enables running various panic notifier before kdump kernel booting. This increases risks of kdump failure. It is well documented in kernel-parameters.txt. We do not suggest people to enable it together with kdump unless he/she is really sure. This is also not suggested to be enabled by default when users are not aware in distributions. But unfortunately it is enabled by default in systemd, see below discussions in a systemd report, we can not convince systemd to change it: https://github.com/systemd/systemd/issues/16661 Actually we have got reports about kdump kernel hangs in both s390x and powerpcle cases caused by the systemd change, also some x86 cases could also be caused by the same (although that is in Hyper-V code instead of systemd, that need to be addressed separately). Thus to avoid the auto enablement here just disable the param writable permission in sysfs. Signed-off-by: Dave Young --- kernel/panic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/panic.c b/kernel/panic.c index aef8872ba843..bea44fc4eb3b 100644 --- a/kernel/panic.c +++ b/kernel/panic.c @@ -695,7 +695,7 @@ core_param(panic, panic_timeout, int, 0644); core_param(panic_print, panic_print, ulong, 0644); core_param(pause_on_oops, pause_on_oops, int, 0644); core_param(panic_on_warn, panic_on_warn, int, 0644); -core_param(crash_kexec_post_notifiers, crash_kexec_post_notifiers, bool, 0644); +core_param(crash_kexec_post_notifiers, crash_kexec_post_notifiers, bool, 0444); static int __init oops_setup(char *s) { -- 2.26.2