We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ef9ee4a commit 46b1b57Copy full SHA for 46b1b57
arch/x86/events/core.c
@@ -27,6 +27,7 @@
27
#include <linux/cpu.h>
28
#include <linux/bitops.h>
29
#include <linux/device.h>
30
+#include <linux/nospec.h>
31
32
#include <asm/apic.h>
33
#include <asm/stacktrace.h>
@@ -424,6 +425,8 @@ int x86_setup_perfctr(struct perf_event *event)
424
425
if (attr->config >= x86_pmu.max_events)
426
return -EINVAL;
427
428
+ attr->config = array_index_nospec((unsigned long)attr->config, x86_pmu.max_events);
429
+
430
/*
431
* The generic map:
432
*/
0 commit comments