linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Pasha Tatashin <pasha.tatashin@soleen.com>
To: Randy Dunlap <rdunlap@infradead.org>
Cc: akpm@linux-foundation.org, corbet@lwn.net, linux-mm@kvack.org,
	 linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org,
	 rick.p.edgecombe@intel.com
Subject: Re: [PATCH v2 2/3] doc/vm: add information about page_table_check warn_on behavior
Date: Sat, 22 Jul 2023 23:37:10 -0400	[thread overview]
Message-ID: <CA+CK2bCoxzp_e7oBTqUYaL36e6WGnc7AxG0M+2SC8SZrrAd3Tw@mail.gmail.com> (raw)
In-Reply-To: <52c883a3-5951-b298-cae4-a46fa0619411@infradead.org>

On Sat, Jul 22, 2023 at 7:59 PM Randy Dunlap <rdunlap@infradead.org> wrote:
>
> Hi--
>
> On 7/22/23 16:15, Pasha Tatashin wrote:
> > The default behavior of page table check was changed from panicking
> > kernel to printing a warning.
> >
> > Add a note how to still panic the kernel when error is detected.
> >
> > Signed-off-by: Pasha Tatashin<pasha.tatashin@soleen.com>
> > ---
> >   Documentation/mm/page_table_check.rst | 5 +++--
> >   1 file changed, 3 insertions(+), 2 deletions(-)
> >
> > diff --git a/Documentation/mm/page_table_check.rst b/Documentation/mm/page_table_check.rst
> > index c12838ce6b8d..f534c80ee9c9 100644
> > --- a/Documentation/mm/page_table_check.rst
> > +++ b/Documentation/mm/page_table_check.rst
> > @@ -14,13 +14,14 @@ Page table check performs extra verifications at the time when new pages become
> >   accessible from the userspace by getting their page table entries (PTEs PMDs
> >   etc.) added into the table.
> >
> > -In case of detected corruption, the kernel is crashed. There is a small
> > +In case of detected corruption, a warning is printed. There is a small
> >   performance and memory overhead associated with the page table check. Therefore,
> >   it is disabled by default, but can be optionally enabled on systems where the
> >   extra hardening outweighs the performance costs. Also, because page table check
> >   is synchronous, it can help with debugging double map memory corruption issues,
> >   by crashing kernel at the time wrong mapping occurs instead of later which is
> > -often the case with memory corruptions bugs.
> > +often the case with memory corruptions bugs. In order to crash kernel sysctl
> > +panic_on_warn should be set to 1.
>
> Better as:
>    In order to crash the kernel, the sysctl panic_on_warn should be set
> to 1.

Will update in the next version.

Thanks,
Pasha

>


  reply	other threads:[~2023-07-23  3:37 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-22 23:15 [PATCH v2 0/3] page table check warn instead of panic Pasha Tatashin
2023-07-22 23:15 ` [PATCH v2 1/3] mm/page_table_check: Do WARN_ON instead of BUG_ON Pasha Tatashin
2023-07-23  1:56   ` Matthew Wilcox
2023-07-23  3:35     ` Pasha Tatashin
2023-07-22 23:15 ` [PATCH v2 2/3] doc/vm: add information about page_table_check warn_on behavior Pasha Tatashin
2023-07-22 23:59   ` Randy Dunlap
2023-07-23  3:37     ` Pasha Tatashin [this message]
2023-07-22 23:15 ` [PATCH v2 3/3] mm/page_table_check: Check writable zero page in page table check Pasha Tatashin

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=CA+CK2bCoxzp_e7oBTqUYaL36e6WGnc7AxG0M+2SC8SZrrAd3Tw@mail.gmail.com \
    --to=pasha.tatashin@soleen.com \
    --cc=akpm@linux-foundation.org \
    --cc=corbet@lwn.net \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=rdunlap@infradead.org \
    --cc=rick.p.edgecombe@intel.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