linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Dmitry Vyukov <dvyukov@google.com>
To: Marco Elver <elver@google.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Alexander Potapenko <glider@google.com>,
	 Jann Horn <jannh@google.com>,
	Aleksandr Nogikh <nogikh@google.com>,
	 Taras Madan <tarasmadan@google.com>,
	linux-kernel@vger.kernel.org, linux-mm@kvack.org,
	 kasan-dev@googlegroups.com
Subject: Re: [PATCH v2 5/5] kfence: add note to documentation about skipping covered allocations
Date: Tue, 21 Sep 2021 12:51:21 +0200	[thread overview]
Message-ID: <CACT4Y+aUUNFvVsA86D280e4JqaQ4UdesMnG-+DVc=9v59_ZsJA@mail.gmail.com> (raw)
In-Reply-To: <20210921101014.1938382-5-elver@google.com>

On Tue, 21 Sept 2021 at 12:10, Marco Elver <elver@google.com> wrote:
>
> Add a note briefly mentioning the new policy about "skipping currently
> covered allocations if pool close to full." Since this has a notable
> impact on KFENCE's bug-detection ability on systems with large uptimes,
> it is worth pointing out the feature.
>
> Signed-off-by: Marco Elver <elver@google.com>

Reviewed-by: Dmitry Vyukov <dvyukov@google.com>

> ---
> v2:
> * Rewrite.
> ---
>  Documentation/dev-tools/kfence.rst | 11 +++++++++++
>  1 file changed, 11 insertions(+)
>
> diff --git a/Documentation/dev-tools/kfence.rst b/Documentation/dev-tools/kfence.rst
> index 0fbe3308bf37..d45f952986ae 100644
> --- a/Documentation/dev-tools/kfence.rst
> +++ b/Documentation/dev-tools/kfence.rst
> @@ -269,6 +269,17 @@ tail of KFENCE's freelist, so that the least recently freed objects are reused
>  first, and the chances of detecting use-after-frees of recently freed objects
>  is increased.
>
> +If pool utilization reaches 75% (default) or above, to reduce the risk of the
> +pool eventually being fully occupied by allocated objects yet ensure diverse
> +coverage of allocations, KFENCE limits currently covered allocations of the
> +same source from further filling up the pool. The "source" of an allocation is
> +based on its partial allocation stack trace. A side-effect is that this also
> +limits frequent long-lived allocations (e.g. pagecache) of the same source
> +filling up the pool permanently, which is the most common risk for the pool
> +becoming full and the sampled allocation rate dropping to zero. The threshold
> +at which to start limiting currently covered allocations can be configured via
> +the boot parameter ``kfence.skip_covered_thresh`` (pool usage%).
> +
>  Interface
>  ---------
>
> --
> 2.33.0.464.g1972c5931b-goog
>


  reply	other threads:[~2021-09-21 10:51 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-21 10:10 [PATCH v2 1/5] stacktrace: move filter_irq_stacks() to kernel/stacktrace.c Marco Elver
2021-09-21 10:10 ` [PATCH v2 2/5] kfence: count unexpectedly skipped allocations Marco Elver
2021-09-21 10:48   ` Dmitry Vyukov
2021-09-21 10:10 ` [PATCH v2 3/5] kfence: move saving stack trace of allocations into __kfence_alloc() Marco Elver
2021-09-21 10:50   ` Dmitry Vyukov
2021-09-21 10:10 ` [PATCH v2 4/5] kfence: limit currently covered allocations when pool nearly full Marco Elver
2021-09-21 11:05   ` Dmitry Vyukov
2021-09-21 11:35     ` Marco Elver
2021-09-21 10:10 ` [PATCH v2 5/5] kfence: add note to documentation about skipping covered allocations Marco Elver
2021-09-21 10:51   ` Dmitry Vyukov [this message]
2021-09-21 10:47 ` [PATCH v2 1/5] stacktrace: move filter_irq_stacks() to kernel/stacktrace.c Dmitry Vyukov

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='CACT4Y+aUUNFvVsA86D280e4JqaQ4UdesMnG-+DVc=9v59_ZsJA@mail.gmail.com' \
    --to=dvyukov@google.com \
    --cc=akpm@linux-foundation.org \
    --cc=elver@google.com \
    --cc=glider@google.com \
    --cc=jannh@google.com \
    --cc=kasan-dev@googlegroups.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=nogikh@google.com \
    --cc=tarasmadan@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