From: Alexander Potapenko <glider@google.com>
To: Tianchen Ding <dtcccc@linux.alibaba.com>
Cc: Marco Elver <elver@google.com>,
Dmitry Vyukov <dvyukov@google.com>,
Andrew Morton <akpm@linux-foundation.org>,
kasan-dev <kasan-dev@googlegroups.com>,
Linux Memory Management List <linux-mm@kvack.org>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [RFC PATCH 0/2] Alloc kfence_pool after system startup
Date: Thu, 3 Mar 2022 10:05:10 +0100 [thread overview]
Message-ID: <CAG_fn=Wd5GMFojbvdZkysBQ5Auy5YYRdmZfjSVMq8gpDMRZ_3w@mail.gmail.com> (raw)
In-Reply-To: <20220303031505.28495-1-dtcccc@linux.alibaba.com>
[-- Attachment #1: Type: text/plain, Size: 2419 bytes --]
On Thu, Mar 3, 2022 at 4:15 AM Tianchen Ding <dtcccc@linux.alibaba.com>
wrote:
> KFENCE aims at production environments, but it does not allow enabling
> after system startup because kfence_pool only alloc pages from memblock.
> Consider the following production scene:
> At first, for performance considerations, production machines do not
> enable KFENCE.
>
What are the performance considerations you have in mind? Are you running
KFENCE with a very aggressive sampling rate?
However, after running for a while, the kernel is suspected to have
> memory errors. (e.g., a sibling machine crashed.)
>
I have doubts regarding this setup. It might be faster (although one can
tune KFENCE to have nearly zero performance impact), but is harder to
maintain.
It will also catch fewer errors than if you just had KFENCE on from the
very beginning:
- sibling machines may behave differently, and a certain bug may only
occur once - in that case the secondary instances won't notice it, even
with KFENCE;
- KFENCE also catches non-lethal corruptions (e.g. OOB reads), which may
stay under radar for a very long time.
> So other production machines need to enable KFENCE, but it's hard for
> them to reboot.
>
> The 1st patch allows re-enabling KFENCE if the pool is already
> allocated from memblock.
>
> The 2nd patch applies the main part.
>
> Tianchen Ding (2):
> kfence: Allow re-enabling KFENCE after system startup
> kfence: Alloc kfence_pool after system startup
>
> mm/kfence/core.c | 106 ++++++++++++++++++++++++++++++++++++++---------
> 1 file changed, 87 insertions(+), 19 deletions(-)
>
> --
> 2.27.0
>
>
--
Alexander Potapenko
Software Engineer
Google Germany GmbH
Erika-Mann-Straße, 33
80636 München
Geschäftsführer: Paul Manicle, Liana Sebastian
Registergericht und -nummer: Hamburg, HRB 86891
Sitz der Gesellschaft: Hamburg
Diese E-Mail ist vertraulich. Falls Sie diese fälschlicherweise erhalten
haben sollten, leiten Sie diese bitte nicht an jemand anderes weiter,
löschen Sie alle Kopien und Anhänge davon und lassen Sie mich bitte wissen,
dass die E-Mail an die falsche Person gesendet wurde.
This e-mail is confidential. If you received this communication by mistake,
please don't forward it to anyone else, please erase all copies and
attachments, and please let me know that it has gone to the wrong person.
[-- Attachment #2: Type: text/html, Size: 3252 bytes --]
next prev parent reply other threads:[~2022-03-03 9:05 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-03 3:15 Tianchen Ding
2022-03-03 3:15 ` [RFC PATCH 1/2] kfence: Allow re-enabling KFENCE " Tianchen Ding
2022-03-04 18:13 ` Marco Elver
2022-03-05 5:26 ` Tianchen Ding
2022-03-05 6:06 ` Tianchen Ding
2022-03-05 9:36 ` Marco Elver
2022-03-03 3:15 ` [RFC PATCH 2/2] kfence: Alloc kfence_pool " Tianchen Ding
2022-03-04 18:14 ` Marco Elver
2022-03-03 9:05 ` Alexander Potapenko [this message]
2022-03-03 9:30 ` [RFC PATCH 0/2] " Marco Elver
2022-03-04 2:24 ` Tianchen Ding
2022-03-04 18:14 ` Marco Elver
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='CAG_fn=Wd5GMFojbvdZkysBQ5Auy5YYRdmZfjSVMq8gpDMRZ_3w@mail.gmail.com' \
--to=glider@google.com \
--cc=akpm@linux-foundation.org \
--cc=dtcccc@linux.alibaba.com \
--cc=dvyukov@google.com \
--cc=elver@google.com \
--cc=kasan-dev@googlegroups.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
/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