On Wed, 2026-02-25 at 21:36 +0100, Marco Elver wrote:
>
> +static int __init early_kfence_fault(char *arg)
> +{
> + if (!arg)
> + return -EINVAL;
> +
> + if (!strcmp(arg, "report"))
> + kfence_fault = KFENCE_FAULT_REPORT;
> + else if (!strcmp(arg, "oops"))
> + kfence_fault = KFENCE_FAULT_OOPS;
> + else if (!strcmp(arg, "panic"))
> + kfence_fault = KFENCE_FAULT_PANIC;
> + else
> + return -EINVAL;
> +
> + return 0;
> +}
> +early_param("kfence.fault", early_kfence_fault);
The other parameters in mm/kfence/ seem to be module_param,
which make them tunable at run time through
/sys/module/kfence/parameters/*
Why is this one different?
And, does this one show up as /sys/module/kfence/parameters/fault?
Having the ability to tweak this behavior at run time, without
requiring a system reboot, could be really useful for people
unexpectedly triggering kernel panics across a fleet of servers,
and deciding they would rather not.
--
All Rights Reversed.