[PATCH 4/4] mm: kfence: Only load kfence_test when kfence is enabled

Marco Elver elver at google.com
Wed Aug 25 02:54:12 PDT 2021


On Wed, 25 Aug 2021 at 11:31, Alexander Potapenko <glider at google.com> wrote:
> On Wed, Aug 25, 2021 at 11:17 AM Kefeng Wang <wangkefeng.wang at huawei.com> 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.

Like Alex said, this is working as intended. The KFENCE test verifies
that everything is working as expected, *including* that KFENCE was
enabled, and has already helped us identify issues where we expected
it to be enabled! Trying to run the test when KFENCE was intentionally
disabled is therefore not a useful usecase.

Please drop this patch.



More information about the linux-arm-kernel mailing list