aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/kfence.h
diff options
context:
space:
mode:
authorPeng Liu <liupeng256@huawei.com>2022-02-11 16:32:35 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2022-02-11 17:55:00 -0800
commit8913c61001482378d4ed8cc577b17c1ba3e847e4 (patch)
tree38a42b1093d0338f23d13039b38344d60d032f17 /include/linux/kfence.h
parentmm: memcg: synchronize objcg lists with a dedicated spinlock (diff)
downloadlinux-dev-8913c61001482378d4ed8cc577b17c1ba3e847e4.tar.xz
linux-dev-8913c61001482378d4ed8cc577b17c1ba3e847e4.zip
kfence: make test case compatible with run time set sample interval
The parameter kfence_sample_interval can be set via boot parameter and late shell command, which is convenient for automated tests and KFENCE parameter optimization. However, KFENCE test case just uses compile-time CONFIG_KFENCE_SAMPLE_INTERVAL, which will make KFENCE test case not run as users desired. Export kfence_sample_interval, so that KFENCE test case can use run-time-set sample interval. Link: https://lkml.kernel.org/r/20220207034432.185532-1-liupeng256@huawei.com Signed-off-by: Peng Liu <liupeng256@huawei.com> Reviewed-by: Marco Elver <elver@google.com> Cc: Alexander Potapenko <glider@google.com> Cc: Dmitry Vyukov <dvyukov@google.com> Cc: Jonathan Corbet <corbet@lwn.net> Cc: Sumit Semwal <sumit.semwal@linaro.org> Cc: Christian Knig <christian.koenig@amd.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux/kfence.h')
-rw-r--r--include/linux/kfence.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/kfence.h b/include/linux/kfence.h
index 4b5e3679a72c..f49e64222628 100644
--- a/include/linux/kfence.h
+++ b/include/linux/kfence.h
@@ -17,6 +17,8 @@
#include <linux/atomic.h>
#include <linux/static_key.h>
+extern unsigned long kfence_sample_interval;
+
/*
* We allocate an even number of pages, as it simplifies calculations to map
* address to metadata indices; effectively, the very first page serves as an