Re: [PATCH 4/4] mm: kfence: Only load kfence_test when kfence is enabled
From: Marco Elver
Date: Wed Aug 25 2021 - 05:59:21 EST
On Wed, 25 Aug 2021 at 11:55, Kefeng Wang <wangkefeng.wang@xxxxxxxxxx> wrote:
> On 2021/8/25 17:31, Alexander Potapenko wrote:
> > On Wed, Aug 25, 2021 at 11:17 AM Kefeng Wang <wangkefeng.wang@xxxxxxxxxx> wrote:
> >> Provide kfence_is_enabled() helper, only load kfence_test module
> >> when kfence is enabled.
> > What's wrong with the current behavior?
> > I think we need at least some way to tell the developer that KFENCE
> > does not work, and a failing test seems to be the perfect one.
>
> If the kfence is not enabled, eg kfence.sample_interval=0, kfence_test
> spend too much time,
>
> and all tests will fails. It is meaningless. so better to just skip it ;)
But what is your usecase?
I'd like to avoid the export of a new function that is pretty much unused.