Re: [PATCH 3/3] kfence: allow change number of object by early parameter

From: Marco Elver

Date: Thu Dec 18 2025 - 19:03:48 EST


On Fri, 19 Dec 2025 at 00:58, Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> wrote:
>
> On Thu, 18 Dec 2025 09:58:49 +0800 yuan linyu <yuanlinyu@xxxxxxxxx> wrote:
>
> > when want to change the kfence pool size, currently it is not easy and
> > need to compile kernel.
> >
> > Add an early boot parameter kfence.num_objects to allow change kfence
> > objects number and allow increate total pool to provide high failure
> > rate.
> >
> > ...
> >
> > include/linux/kfence.h | 5 +-
> > mm/kfence/core.c | 122 +++++++++++++++++++++++++++++-----------
> > mm/kfence/kfence.h | 4 +-
> > mm/kfence/kfence_test.c | 2 +-
>
> Can you please add some documentation in Documentation/dev-tools/kfence.rst?
>
> Also, this should be described in
> Documentation/admin-guide/kernel-parameters.txt. That file doesn't
> mention kfence at all, which might be an oversight.
>
> Meanwhile, I'll queue these patches in mm.git's mm-nonmm-unstable
> branch for some testing. I'll await reviewer input before proceeding
> further. Thanks.

Note, there was an v2 sent 5 hours after this v1, which I had
commented on here:
https://lore.kernel.org/all/aUPB18Xeh1BhF9GS@xxxxxxxxxxxxxxxx/

Thanks,
-- Marco