Re: BUG uncore_assign_events

From: Andi Kleen
Date: Wed Sep 10 2014 - 17:59:15 EST


> # addr2line -i -e ivb-ep-build/vmlinux ffffffff81025f18
>
> arch/x86/include/asm/bitops.h:318
> arch/x86/kernel/cpu/perf_event_intel_uncore.c:3339

i == zero (ok)
c points to some kernel looking address
hwc->idx is 64

/* fastpath, try to reuse previous register */
for (i = 0; i < n; i++) {
hwc = &box->event_list[i]->hw;
c = hwc->constraint;

/* never assigned */
if (hwc->idx == -1)
break;

/* constraint still honored */
if (!test_bit(hwc->idx, c->idxmsk))
break;

My best bet is something goes wrong in uncore_pmu_to_box or
uncore_event_to_pmu in hte caller, so the box is bogus.

Did the test do CPU hot plug?

BTW i don't think it's a security issue because the uncore driver
is only accesible for root.

-Andi

--
ak@xxxxxxxxxxxxxxx -- Speaking for myself only.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/