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=-0.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS 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 9619FC3F68F for ; Mon, 27 Jan 2020 12:26:25 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 59A7C21739 for ; Mon, 27 Jan 2020 12:26:25 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lca.pw header.i=@lca.pw header.b="R/Z2JAzO" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 59A7C21739 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=lca.pw Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id E0AE16B0003; Mon, 27 Jan 2020 07:26:24 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id DBB746B0006; Mon, 27 Jan 2020 07:26:24 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id C856D6B0007; Mon, 27 Jan 2020 07:26:24 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0123.hostedemail.com [216.40.44.123]) by kanga.kvack.org (Postfix) with ESMTP id B37FA6B0003 for ; Mon, 27 Jan 2020 07:26:24 -0500 (EST) Received: from smtpin20.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with SMTP id 53B6B824556B for ; Mon, 27 Jan 2020 12:26:24 +0000 (UTC) X-FDA: 76423337088.20.head66_8f2cea4e1635f X-HE-Tag: head66_8f2cea4e1635f X-Filterd-Recvd-Size: 4560 Received: from mail-qv1-f66.google.com (mail-qv1-f66.google.com [209.85.219.66]) by imf05.hostedemail.com (Postfix) with ESMTP for ; Mon, 27 Jan 2020 12:26:23 +0000 (UTC) Received: by mail-qv1-f66.google.com with SMTP id o18so4351167qvf.1 for ; Mon, 27 Jan 2020 04:26:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lca.pw; s=google; h=content-transfer-encoding:from:mime-version:subject:date:message-id :references:cc:in-reply-to:to; bh=dxtnBJy7TtO0FNdFepHqKbYItxPWi4rmxJBvGTynpb4=; b=R/Z2JAzOMlgEEe5LRPotTkZCgaKhVqLH5vuYs7i236aqhbRA8JogpS0hx8OfRD7TSV rHpzPOJYIhFVVN5xSbaezZ56PMNZ6tyPauoi3YAmWrcNysQLkte2p6PDP3W1QQh1ygyX 6G/GhNh9VpH0cgd/u8iPUswlQnA0TlkWDFKG0mH+DqkiTReloJ27oKg4HAU3q+aQ5UWT qTdjVhdnlpUGRduwxQeQO8/5EUeorqbl3SGpIIBwWiB75PrdvF3e5jR9wqLXTrBdZjkq fq/vH6Va7HxfYv6qSx5Z6/IHy9/g7kQttsjEUhFlUn7Tr06DjN7/mdBXRsDVpJPIS5HX xMrQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:content-transfer-encoding:from:mime-version :subject:date:message-id:references:cc:in-reply-to:to; bh=dxtnBJy7TtO0FNdFepHqKbYItxPWi4rmxJBvGTynpb4=; b=lCemHSNKLz7WeCanyEV0OG6L1KtCtWVUONG1EqVnYL2eB8qmAvQQnXRddRbAwSCXx8 fs0xd77W+26vjkQ58wbRnH7sF2eUEbymfPptpvnVqn1ca64QYOL54sqCq5hZuP+ZljQ0 jFqPCyWeolBDCfeesp2ddOU8wOPaVpqXhAvWS4cLUA6ftCa4MpkynUph3LRgNf3+/sY3 01nJ5rOokLn4PZWI5Mn+BF9nIiszbyy4gn0mxjJt9HN2FDAhMMVpKfO4OHttDY/18YRm 5EATBK199zWNf1SmGOrRzCfEUCEeUYUkXjXz42s4iKFUQBSo+iSHn7SVPIxDcNMUxuVG zBgw== X-Gm-Message-State: APjAAAUZ7hYPtOT9aSFSr2n48XaNsEK8pGXCQP5a58ddak5T0c3md9OV xRUl2nmX87sZS/USLJq/Mzn2lA== X-Google-Smtp-Source: APXvYqz/dWEk/aq3G1gMzh/LBHy2U0Gfx5zkulfbrjNAfHknxwhydqbp8IYmYKr8NyTj9BDw1851cQ== X-Received: by 2002:a0c:aacb:: with SMTP id g11mr16585575qvb.108.1580127983134; Mon, 27 Jan 2020 04:26:23 -0800 (PST) Received: from [192.168.1.183] (pool-71-184-117-43.bstnma.fios.verizon.net. [71.184.117.43]) by smtp.gmail.com with ESMTPSA id u13sm8615806qta.30.2020.01.27.04.26.22 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 27 Jan 2020 04:26:22 -0800 (PST) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable From: Qian Cai Mime-Version: 1.0 (1.0) Subject: Re: [PATCH 1/1] mm: sysctl: add panic_on_mm_error sysctl Date: Mon, 27 Jan 2020 07:26:21 -0500 Message-Id: References: <20200127101100.92588-1-ghalat@redhat.com> Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-fsdevel@vger.kernel.org, linux-doc@vger.kernel.org, ssaner@redhat.com, atomlin@redhat.com, oleksandr@redhat.com, vbendel@redhat.com, kirill@shutemov.name, khlebnikov@yandex-team.ru, borntraeger@de.ibm.com, Andrew Morton , Iurii Zaikin , Kees Cook , Luis Chamberlain , Jonathan Corbet In-Reply-To: <20200127101100.92588-1-ghalat@redhat.com> To: Grzegorz Halat X-Mailer: iPhone Mail (17C54) X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: > On Jan 27, 2020, at 5:11 AM, Grzegorz Halat wrote: >=20 > Memory management subsystem performs various checks at runtime, > if an inconsistency is detected then such event is being logged and kernel= > continues to run. While debugging such problems it is helpful to collect > memory dump as early as possible. Currently, there is no easy way to panic= > kernel when such error is detected. >=20 > It was proposed[1] to panic the kernel if panic_on_oops is set but this > approach was not accepted. One of alternative proposals was introduction o= f > a new sysctl. >=20 > The patch adds panic_on_mm_error sysctl. If the sysctl is set then the > kernel will be crashed when an inconsistency is detected by memory > management. This currently means panic when bad page or bad PTE > is detected(this may be extended to other places in MM). >=20 > Another use case of this sysctl may be in security-wise environments, > it may be more desired to crash machine than continue to run with > potentially damaged data structures. Well, on the other hand, this will allow a normal user to more easily crash t= he system due to a recoverable bug which could result in local DoS.=