lkml.org 
[lkml]   [2015]   [Oct]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH net-next 2/3] bpf: introduce bpf_perf_event_output() helper
From
Date
On 10/22/15 6:59 AM, Peter Zijlstra wrote:
>> + if (unlikely(event->oncpu != smp_processor_id()))
>> >+ return -EOPNOTSUPP;
>> >+
>> >+ perf_sample_data_init(&sample_data, 0, 0);
>> >+ sample_data.raw = &raw;
>> >+ perf_event_output(event, &sample_data, regs);
>> >+ return 0;
>> >+}
> Note that this function also very much requires event to be local.

correct. that's why there is a dynamic check above to prevent buggy
programs causing issues.




\
 
 \ /
  Last update: 2015-10-22 18:01    [W:0.219 / U:0.612 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site