On Thu, Jan 29, 2015 at 4:35 AM, Namhyung Kim wrote:
>>> Right. I think bpf programs belong to a user process but events are
>>> global resource. Maybe you also need to consider attaching bpf
>>> program via perf (ioctl?) interface..
>>
>> yes. I did. Please see my reply to Masami.
>> ioctl only
On Thu, Jan 29, 2015 at 4:04 PM, Alexei Starovoitov wrote:
> On Wed, Jan 28, 2015 at 10:41 PM, Namhyung Kim wrote:
>>
>> I think it's not a problem of bpf. An user process can be killed
>> anytime while it enabed events without bpf. The only thing it should
>> care is the auto-unload IMHO.
>
>
On Wed, Jan 28, 2015 at 10:41 PM, Namhyung Kim wrote:
>
> I think it's not a problem of bpf. An user process can be killed
> anytime while it enabed events without bpf. The only thing it should
> care is the auto-unload IMHO.
ok. I think it does indeed make sense to decouple the logic.
We can a
On Thu, Jan 29, 2015 at 1:40 PM, Alexei Starovoitov wrote:
> On Wed, Jan 28, 2015 at 4:46 PM, Namhyung Kim wrote:
>>>
>>> +static int event_filter_release(struct inode *inode, struct file *filp)
>>> +{
>>> + struct ftrace_event_file *file;
>>> + char buf[2] = "0";
>>> +
>>> + mutex_lo
On Wed, Jan 28, 2015 at 9:39 PM, Masami Hiramatsu
wrote:
>
> Maybe, would we need a reference counter for each event? :)
when we would want multiple users to attach different programs
to the same event, then yes.
Right now I'd rather have things simple.
> Actually, ftrace event is not similar to
(2015/01/29 13:40), Alexei Starovoitov wrote:
> On Wed, Jan 28, 2015 at 4:46 PM, Namhyung Kim wrote:
>>>
>>> +static int event_filter_release(struct inode *inode, struct file *filp)
>>> +{
>>> + struct ftrace_event_file *file;
>>> + char buf[2] = "0";
>>> +
>>> + mutex_lock(&event_mute
On Wed, Jan 28, 2015 at 4:46 PM, Namhyung Kim wrote:
>>
>> +static int event_filter_release(struct inode *inode, struct file *filp)
>> +{
>> + struct ftrace_event_file *file;
>> + char buf[2] = "0";
>> +
>> + mutex_lock(&event_mutex);
>> + file = event_file_data(filp);
>> + if
Hi Alexei,
On Tue, Jan 27, 2015 at 08:06:06PM -0800, Alexei Starovoitov wrote:
> User interface:
> fd = open("/sys/kernel/debug/tracing/__event__/filter")
>
> write(fd, "bpf_123")
>
> where 123 is process local FD associated with eBPF program previously loaded.
> __event__ is static tracepoint e
User interface:
fd = open("/sys/kernel/debug/tracing/__event__/filter")
write(fd, "bpf_123")
where 123 is process local FD associated with eBPF program previously loaded.
__event__ is static tracepoint event or syscall.
(kprobe support is in next patch)
Once program is successfully attached to tr
9 matches
Mail list logo