Re: [for-next][PATCH 7/8] tracing/probe: Reject exactly same probe event
From: Srikar Dronamraju
Date: Mon Sep 23 2019 - 13:42:17 EST
> > I think we need something like this:
> >
> > list_for_each_entry(pos, &tpe->probes, list) {
> > orig = container_of(pos, struct trace_kprobe, tp);
> > if (strcmp(trace_kprobe_symbol(orig),
> > trace_kprobe_symbol(comp)) ||
> > trace_kprobe_offset(orig) != trace_kprobe_offset(comp))
> > continue;
> >
> > /*
> > * trace_probe_compare_arg_type() ensured that nr_args and
> > * each argument name and type are same. Let's compare comm.
> > */
> > for (i = 0; i < orig->tp.nr_args; i++) {
> > if (strcmp(orig->tp.args[i].comm,
> > comp->tp.args[i].comm))
> > goto outer_loop;
> >
> > }
> >
> > return true;
> > outer_loop:
> > }
>
> Correct, that's what I intended.
> Could you make a fix patch on top of it? (or do I?)
>
> Thank you,
Either way is fine. I can send out a patch tomorrow. But fine if you beat
me to it.
--
Thanks and Regards
Srikar Dronamraju