Re: [PATCH] perf/core: fix possible spectre-v1 write
From: kbuild test robot
Date: Tue Jul 10 2018 - 15:02:07 EST
Hi Mark,
I love your patch! Yet something to improve:
[auto build test ERROR on tip/perf/core]
[also build test ERROR on v4.18-rc4 next-20180710]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/Mark-Rutland/perf-core-fix-possible-spectre-v1-write/20180711-023735
config: i386-randconfig-x009-201827 (attached as .config)
compiler: gcc-7 (Debian 7.3.0-16) 7.3.0
reproduce:
# save the attached .config to linux build tree
make ARCH=i386
All errors (new ones prefixed by >>):
kernel/events/core.c: In function 'sw_perf_event_destroy':
>> kernel/events/core.c:8158:13: error: implicit declaration of function 'array_index_nospec'; did you mean 'array_index_mask_nospec'? [-Werror=implicit-function-declaration]
event_id = array_index_nospec(event_id, PERF_COUNT_SW_MAX);
^~~~~~~~~~~~~~~~~~
array_index_mask_nospec
cc1: some warnings being treated as errors
vim +8158 kernel/events/core.c
8154
8155 static void sw_perf_event_destroy(struct perf_event *event)
8156 {
8157 u64 event_id = event->attr.config;
> 8158 event_id = array_index_nospec(event_id, PERF_COUNT_SW_MAX);
8159
8160 WARN_ON(event->parent);
8161
8162 static_key_slow_dec(&perf_swevent_enabled[event_id]);
8163 swevent_hlist_put();
8164 }
8165
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
Attachment:
.config.gz
Description: application/gzip