perf: perf_fuzzer still triggers bts warning

From: Vince Weaver
Date: Wed Sep 14 2016 - 12:50:26 EST


Hello

I'm running 4.8-rc6 git from this morning (with the various perf fixes).

Fuzzing on Skylake I still managed to trigger the following warning.

It maps to

void intel_bts_enable_local(void)
{
...
/*
* Here we transition from INACTIVE to ACTIVE;
* if we instead are STOPPED from the interrupt handler,
* stay that way. Can't be ACTIVE here though.
*/
if (WARN_ON_ONCE(state == BTS_STATE_ACTIVE))
return;

[ 4070.994175] ------------[ cut here ]------------
[ 4070.994469] WARNING: CPU: 0 PID: 25484 at arch/x86/events/intel/bts.c:344 intel_bts_enable_local+0x58/0x60
[ 4070.995428] CPU: 0 PID: 25484 Comm: perf_fuzzer Not tainted 4.8.0-rc6+ #5
[ 4070.995430] Hardware name: LENOVO 10FY0017US/SKYBAY, BIOS FWKT53A 06/06/2016
[ 4070.995433] 0000000000000086 00000000dfbb88aa ffff9045fdc03dc8 ffffffff93b3b863
[ 4070.995438] 0000000000000000 0000000000000000 ffff9045fdc03e08 ffffffff9387f7d1
[ 4070.995443] 00000158fdc03e08 ffff9045fdc0a480 0000000000000000 ffff9045fdc0a480
[ 4070.995448] Call Trace:
[ 4070.995450] <IRQ> [<ffffffff93b3b863>] dump_stack+0x63/0x90
[ 4070.995465] [<ffffffff9387f7d1>] __warn+0xd1/0xf0
[ 4070.995471] [<ffffffff9387f8fd>] warn_slowpath_null+0x1d/0x20
[ 4070.995474] [<ffffffff9380d8b8>] intel_bts_enable_local+0x58/0x60
[ 4070.995478] [<ffffffff9380b2a0>] __intel_pmu_enable_all+0x80/0xb0
[ 4070.995481] [<ffffffff9380b2e0>] intel_pmu_enable_all+0x10/0x20
[ 4070.995486] [<ffffffff93807741>] x86_pmu_enable+0x261/0x2f0
[ 4070.995491] [<ffffffff93976950>] ? __perf_install_in_context+0x110/0x110
[ 4070.995494] [<ffffffff93974ff2>] perf_pmu_enable+0x22/0x30
[ 4070.995498] [<ffffffff93976a61>] perf_mux_hrtimer_handler+0x111/0x1c0
[ 4070.995504] [<ffffffff938ef633>] __hrtimer_run_queues+0xf3/0x280
[ 4070.995509] [<ffffffff938efb08>] hrtimer_interrupt+0xa8/0x1a0
[ 4070.995515] [<ffffffff93852d88>] local_apic_timer_interrupt+0x38/0x60
[ 4070.995521] [<ffffffff93e1de8d>] smp_apic_timer_interrupt+0x3d/0x50
[ 4070.995525] [<ffffffff93e1d1a2>] apic_timer_interrupt+0x82/0x90
[ 4070.995526] <EOI>
[ 4070.995529] ---[ end trace 6247e022342bacf7 ]---