Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp3470898ybl; Mon, 27 Jan 2020 04:46:10 -0800 (PST) X-Google-Smtp-Source: APXvYqy5MDOKfDlaDEexmhhlZB2EKd2vZzkkTcI6yv90gPeVDLTyovBavcajB1YF+HmKnnr4VZ/2 X-Received: by 2002:a54:4f8d:: with SMTP id g13mr6867562oiy.43.1580129170547; Mon, 27 Jan 2020 04:46:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1580129170; cv=none; d=google.com; s=arc-20160816; b=c+rG/4MDyyXyJ4KdHHp1sffbVogNcuqvwMdK2eP+/YJvol0x41J4OMUxogAM2nJWZR nypFgVle+qeeY+ffOXW68dhh8EBO7aCnMkKTVV0Fzka+v1Wmaoa5yQxjye+SmfWoGEzt 4pxq6FSc6YyG2K5Z034wO7ytZU2YjLnU02Bxs3UvkZrbkkAKU0Rgcn1g4H3llcb32q3C 6F1zdq34ekFLs63EKWZXG+ad5gnQvUOZ2xgi5HZsgE067CTopRy/n+DJyR12yXcQt4ie sm52f4I21m47OAeFJL7dfZOPzf1NPDipbjtmGHWTFjdVk7cRKbL0IBr9yozHqin+XyMm XDRA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:in-reply-to:cc:references:message-id :date:subject:mime-version:from:content-transfer-encoding :dkim-signature; bh=dxtnBJy7TtO0FNdFepHqKbYItxPWi4rmxJBvGTynpb4=; b=B3E4a9lHz7TMGQ13jVqn0x45CEAVLnFY22uq0tZFKg8huuDvoGgqZbHrrN4/B6nGVl W/XZEAS6r8o3OO77BeNDCc+ZPbp5oYa8hhZ6KSWBfYKDmjajJS8ERWFUpIq17tAVKm0O f82aO/qNchI+TZ7DvDAb1qnsMHfFmFgS44MH7QdU8quZyPo0fY0h67TftO0c+qAdD5BZ fYZ42GmbTqx16Q+ahJV0QhbB9j6DaSCVWtIwOeVQfKGhIsw76Cihdtmy5tJmzRBSSXSR 29F8lxouSrAgIfDxGzhFLD0SSNZ8XqwOISawammGZokp74KGi9AAWzA08YO5LeT3AI2z iQhQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lca.pw header.s=google header.b="R/Z2JAzO"; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y65si3792895oia.162.2020.01.27.04.45.58; Mon, 27 Jan 2020 04:46:10 -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=@lca.pw header.s=google header.b="R/Z2JAzO"; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730555AbgA0M0Y (ORCPT + 99 others); Mon, 27 Jan 2020 07:26:24 -0500 Received: from mail-qv1-f65.google.com ([209.85.219.65]:33303 "EHLO mail-qv1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729465AbgA0M0Y (ORCPT ); Mon, 27 Jan 2020 07:26:24 -0500 Received: by mail-qv1-f65.google.com with SMTP id z3so4356466qvn.0 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=ltAz0vcdXHL3Xn3taarSrlobwCPpx+DOFtKeiZUBaRMZdyhpCeNbiYY0mko4hvYfa7 OJaeDBlyammZNKFbLgHwHyQwwCtYofzeejn2s6QD80/wNGp5qL9rq2ktvUZPw4CXqBvv MeA9R+kIhpnsEH+MP+80u6E2PVF9isX/a19ocprn+C6Q/aYdGIBI1V+Z1pXBHa3Tlmyl VG291hpoLCUUkwHD6d4Fkd0SZrqkWyqigbVLXeMN7Bmasklphwaf2StbD7W6fZN23Mqn nuKSOfjUAhI6Hh6cKkr1G4HTykeiBHTp0+7m6N49vCceShZcjfCxrqLCNI6QEiyU74C6 fsHQ== X-Gm-Message-State: APjAAAXnuZ2Kfr9CN7ttT8hCRyJriVp5ZjkWSj8HLbvZFt2Z7OBE1LCg 3JUy0XtX6MoZMlxrs9NClD5IxQ== 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) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > 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.=