From: Jackie Liu <liuyun01@xxxxxxxxxx> By printing information, we can friendly prompt the status change information of kfence by dmesg. Signed-off-by: Jackie Liu <liuyun01@xxxxxxxxxx> --- mm/kfence/core.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/mm/kfence/core.c b/mm/kfence/core.c index 11a954763be9..beb552089b67 100644 --- a/mm/kfence/core.c +++ b/mm/kfence/core.c @@ -67,8 +67,11 @@ static int param_set_sample_interval(const char *val, const struct kernel_param if (ret < 0) return ret; - if (!num) /* Using 0 to indicate KFENCE is disabled. */ + if (!num) { + /* Using 0 to indicate KFENCE is disabled. */ WRITE_ONCE(kfence_enabled, false); + pr_info("KFENCE is disabled.\n"); + } *((unsigned long *)kp->arg) = num; @@ -874,6 +877,7 @@ static int kfence_enable_late(void) WRITE_ONCE(kfence_enabled, true); queue_delayed_work(system_unbound_wq, &kfence_timer, 0); + pr_info("KFENCE is re-enabled.\n"); return 0; } -- 2.25.1