On Wed, Aug 07, 2024 at 11:54:41AM +0100, James Clark wrote:
diff --git a/kernel/events/core.c b/kernel/events/core.c
index aa3450bdc227..4a69583e329a 100644
--- a/kernel/events/core.c
+++ b/kernel/events/core.c
@@ -417,6 +417,7 @@ static struct kmem_cache *perf_event_cache;
* 2 - disallow kernel profiling for unpriv
*/
int sysctl_perf_event_paranoid __read_mostly = 2;
+EXPORT_SYMBOL_GPL(sysctl_perf_event_paranoid);
I'm never a fan of exporting variables. Perhaps create a helper function
that returns the value and use that where required?
That avoids modules getting the idea it would be okay to change this
valie themselves.