linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mm/kfence: print disabling or re-enabling message
@ 2022-05-17 11:15 Jackie Liu
  2022-05-17 11:42 ` Marco Elver
  2022-05-18  0:39 ` Jackie Liu
  0 siblings, 2 replies; 3+ messages in thread
From: Jackie Liu @ 2022-05-17 11:15 UTC (permalink / raw)
  To: glider; +Cc: elver, dvyukov, kasan-dev, linux-mm

From: Jackie Liu <liuyun01@kylinos.cn>

By printing information, we can friendly prompt the status change
information of kfence by dmesg.

Signed-off-by: Jackie Liu <liuyun01@kylinos.cn>
---
 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



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-05-18  0:40 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-17 11:15 [PATCH] mm/kfence: print disabling or re-enabling message Jackie Liu
2022-05-17 11:42 ` Marco Elver
2022-05-18  0:39 ` Jackie Liu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox