Re: [PATCH v6 3/4] bpf: Implement function bpf_perf_event_read() that get the selected hardware PMU conuter

From: Alexei Starovoitov
Date: Wed Aug 05 2015 - 11:59:47 EST


On 8/5/15 3:04 AM, Peter Zijlstra wrote:
>+ __perf_event_read(event);
>+ return perf_event_count(event);
>+}
Also, you probably want a WARN_ON(in_nmi()) there, this function is
_NOT_ NMI safe.

we check that very early on:
unsigned int trace_call_bpf(struct bpf_prog *prog, void *ctx)
{
unsigned int ret;

if (in_nmi()) /* not supported yet */
return 1;
...

--
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/