linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christian Borntraeger <borntraeger@de.ibm.com>
To: Qian Cai <cai@lca.pw>, Grzegorz Halat <ghalat@redhat.com>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Linux-MM <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,
	Andrew Morton <akpm@linux-foundation.org>,
	Iurii Zaikin <yzaikin@google.com>,
	Kees Cook <keescook@chromium.org>,
	Luis Chamberlain <mcgrof@kernel.org>,
	Jonathan Corbet <corbet@lwn.net>,
	Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp>
Subject: Re: [PATCH 1/1] mm: sysctl: add panic_on_inconsistent_mm sysctl
Date: Mon, 3 Feb 2020 15:08:30 +0100	[thread overview]
Message-ID: <34467005-1742-47a0-cd2b-05567584b91e@de.ibm.com> (raw)
In-Reply-To: <84C253EB-B348-4B62-B863-F192FBA8C202@lca.pw>



On 29.01.20 19:39, Qian Cai wrote:
> 
> 
>> On Jan 29, 2020, at 1:08 PM, Grzegorz Halat <ghalat@redhat.com> wrote:
>>
>> 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.
>>
>> 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 of
>> a new sysctl.
>>
>> Add a new sysctl - panic_on_inconsistent_mm. 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).
>>
>> 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.
> 
> It is annoying that I have to repeat my feedback, but I don’t know why
> admins want to enable this by allowing normal users to crash the systems
> more easily through recoverable MM bugs where I am sure we have plenty.
> How does that improve the security?

There are cases where data corruption is a no-go, while "one node going down" 
is acceptable.
And then there is also the case for payed service providers that often need
a dump at the time of the problem to understand rare issues.

So I DO see value in such a thing. We should just piggy-back on panic_on_warn
I guess.


  reply	other threads:[~2020-02-03 14:08 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-29 18:08 [PATCH 1/1] mm: sysctl: add panic_on_inconsistent_mm sysctl Grzegorz Halat
2020-01-29 18:39 ` Qian Cai
2020-02-03 14:08   ` Christian Borntraeger [this message]
2020-02-03 15:06     ` Qian Cai
2020-02-05 22:23       ` Kees Cook
2020-01-29 19:06 ` Qian Cai
2020-01-30 14:44 ` Vlastimil Babka
2020-01-30 19:28   ` Kees Cook
2020-02-03 12:19     ` Vlastimil Babka

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=34467005-1742-47a0-cd2b-05567584b91e@de.ibm.com \
    --to=borntraeger@de.ibm.com \
    --cc=akpm@linux-foundation.org \
    --cc=atomlin@redhat.com \
    --cc=cai@lca.pw \
    --cc=corbet@lwn.net \
    --cc=ghalat@redhat.com \
    --cc=keescook@chromium.org \
    --cc=khlebnikov@yandex-team.ru \
    --cc=kirill@shutemov.name \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mcgrof@kernel.org \
    --cc=oleksandr@redhat.com \
    --cc=penguin-kernel@i-love.sakura.ne.jp \
    --cc=ssaner@redhat.com \
    --cc=vbendel@redhat.com \
    --cc=yzaikin@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).