Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp5991765imu; Wed, 30 Jan 2019 07:03:35 -0800 (PST) X-Google-Smtp-Source: ALg8bN49syTkcnWK090JhAtWpDTV/VuhU6PzcX1PgHv4EE7TcN01wdApUTpC4fcY/4Qd/bjCSd59 X-Received: by 2002:a62:1d4c:: with SMTP id d73mr31181787pfd.90.1548860615809; Wed, 30 Jan 2019 07:03:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548860615; cv=none; d=google.com; s=arc-20160816; b=0luiuN6y/FYzGnZkSEstR+7KJJLRdHkWadLXqkR+htariT7i8BeyzC8yv8nfnziKR/ OY8Ono4Bldox3JBVs2o1h3xlwNWhAYdRaubefWd6vGkqyaYyvQh6QWXNUPN17FdTXAj2 oc87yTFubWl3+AgSNFawsGMPfH0aN8QhQ+vlrvSjS/MxMKP9w0ZVo8kptUt9C9VLdza7 b8vF09JaK7YOhmosDhnS5ZcaUOS2mJ84Kq/W2/dw/2krBLnmhZs8PGAwtgB+z7UTMVo6 Mn54aOi5BgY4letln21guK9IoxtIsAZomj9VBHKf5P9eUMegBhgLODonjFLlIH7vvJUr NWTg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=sB/R9A+G+1Bml2j6jV9rxRkbOGpZb2kYG6xIswMoOV4=; b=zYcptKH3wU28qF0okF9RzyOJgnuVz0Ip6FGd5lJRQ1G7KAJtecRWMKMFzBniJhb3HG BUsxCQfXwNkb4mCWg6AeA50U8qpgKKhk2GIok56kru33txQXjK6yGpaDbGyciVZcUuoR 6Fkx+s6i6QlradxRiiPbtqigDezBjtXN2YzOh/pMf4ok1RWgsn4ScYPpvQoqGVtZLuUb 6pPRuZnByD97ovpA+0Mq2205ShHEwqNxCgPDg4jiXqDuwhbvi86yGrP+GfkT3B7OzzeA iyaanX4nqYVzWEWkqz3U8fVhrBcuIjUba+B2s4NAowgarLbMPp3oz7e8Cc2AOupLNtME LlAQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=HlDxTZ5t; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p20si1687095pfk.125.2019.01.30.07.03.15; Wed, 30 Jan 2019 07:03:35 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=HlDxTZ5t; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731232AbfA3PCv (ORCPT + 99 others); Wed, 30 Jan 2019 10:02:51 -0500 Received: from mail-wr1-f66.google.com ([209.85.221.66]:45741 "EHLO mail-wr1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727162AbfA3PCv (ORCPT ); Wed, 30 Jan 2019 10:02:51 -0500 Received: by mail-wr1-f66.google.com with SMTP id t6so26363956wrr.12 for ; Wed, 30 Jan 2019 07:02:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=sB/R9A+G+1Bml2j6jV9rxRkbOGpZb2kYG6xIswMoOV4=; b=HlDxTZ5t3ywYhp9mzWTd4LZa+loyIRRQw/8Ev6pWD6Azy4v+ahkp4Kk0ibJmpz9FoH YdaG8Aobh3NqGxssUTKARnBwch4MaiA96hcYKIFqno+/1bh237kAuDIdIoKprhTLnp7D 9LH3AaAYt8gyzXc7y6ryD8gB5gOjV6bQbZ+DybDNorFlrP8wto1FGrYUzOXwNH9mMtet tpcxPsI3Bq3IREviG5R20PzQSD4TymiCBq2ts+rrNhRNQsQzPuo0LDf8siJxtmVwF56G YYZqFnxuzq128CLk3UpvgyPlV/+ognoN/iu8gwmm28Zv5TsSPLQFC7EMGQVr1CxW2LwN ljQA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=sB/R9A+G+1Bml2j6jV9rxRkbOGpZb2kYG6xIswMoOV4=; b=bmgg8OtMTouArUdnUR21CoRKTHiPwnwtqGbIVhyDgXMu8opGjbBzaRH9B+FYot71TF RQzYcDYa5s92aHlkG78gWciJgRPUvpaaijQTn92GRCqT1qbFki7YSiMTzIaiQlTy0XPD RqrFhTLdJUG/bU3kH9Su1arELbHzRL4K8CfSdXzGmARJZBJAawFojgEV2Iny3LgSYZpU RwE+nTRN/iWjTvABOq/6lMsqnAMbAY4uVLY4TwguaRTAqk5CuemMPQPGsK2vUsCZ9Xc2 UQkZnenSo7LcffBheUQdQCIvYdShvqyiAzJo1jSfWrzCUQHbOW4nO6WVFMJSQ1N0DH6I RAvQ== X-Gm-Message-State: AJcUukcG3UigkYxMshSIcc1iAxb4yAU7xyCytJBTyBQCQdqZiAlmw9cM hZr/IN56d+TrxaAY75XIt3R1jWCfaIMW423F9IQ8LlE3 X-Received: by 2002:adf:9d08:: with SMTP id k8mr32264971wre.203.1548860568662; Wed, 30 Jan 2019 07:02:48 -0800 (PST) MIME-Version: 1.0 References: <20190128084959.13060-1-vincent.whitchurch@axis.com> <20190128100545.b62193aa8f49e1de8d6ea8b7@linux-foundation.org> <20190130144851.GK11489@garbanzo.do-not-panic.com> In-Reply-To: <20190130144851.GK11489@garbanzo.do-not-panic.com> From: Richard Weinberger Date: Wed, 30 Jan 2019 16:02:36 +0100 Message-ID: Subject: Re: [PATCH v2] sysctl: Add panic-fatal-signals To: Luis Chamberlain Cc: Andrew Morton , Vincent Whitchurch , Kees Cook , LKML , Vincent Whitchurch Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jan 30, 2019 at 3:49 PM Luis Chamberlain wrote: > > On Mon, Jan 28, 2019 at 10:05:45AM -0800, Andrew Morton wrote: > > On Mon, 28 Jan 2019 09:49:59 +0100 Vincent Whitchurch wrote: > > > --- a/init/Kconfig > > > +++ b/init/Kconfig > > > @@ -1242,6 +1242,20 @@ config SYSCTL_SYSCALL > > > > > > If unsure say N here. > > > > > > +config SYSCTL_PANIC_FATAL_SIGNALS > > > + bool "panic-fatal-signals sysctl" if EXPERT > > > + depends on PROC_SYSCTL > > > + help > > > + If you say Y here, a kernel.panic-fatal-signals sysctl will be > > > + offered. If this sysctl is turned on, the kernel will panic if any > > > + userspace process receives a fatal signal which would trigger a core > > > + dump. > > > + > > > + When used together with kernel core dumps, this can be useful for > > > + debugging some system-wide problems, primarily on embedded systems. > > > + > > > + If unsure, say N. > > > > I suggest that the Kconfig help and the forthcoming documentation > > should clearly explain the dangers of enabling this! > > And so, should default to n. > > Luis Hmm, why can't this be a core dump helper? Such as: #!/bin/sh # Usage: # echo "|/root/crash.sh %p %e %s" > /proc/sys/kernel/core_pattern PID="$1" COMM="$2" SIGNAL="$3" echo "$COMM ($PID) died by signal $SIGNAL, killing kernel" > /dev/kmsg echo c > /proc/sysrq-trigger -- Thanks, //richard