lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Tue, 21 Jul 2015 00:31:37 +0900 From: Namhyung Kim <namhyung@...nel.org> To: Masami Hiramatsu <masami.hiramatsu.pt@...achi.com> Cc: Arnaldo Carvalho de Melo <acme@...nel.org>, Peter Zijlstra <a.p.zijlstra@...llo.nl>, linux-kernel@...r.kernel.org, Adrian Hunter <adrian.hunter@...el.com>, Ingo Molnar <mingo@...hat.com>, Paul Mackerras <paulus@...ba.org>, Jiri Olsa <jolsa@...nel.org>, Borislav Petkov <bp@...e.de>, Hemant Kumar <hemant@...ux.vnet.ibm.com> Subject: Re: [RFC PATCH perf/core v2 14/16] perf probe: Add group name support On Mon, Jul 20, 2015 at 01:48:36PM +0900, Masami Hiramatsu wrote: > On 2015/07/19 19:16, Namhyung Kim wrote: > > On Wed, Jul 15, 2015 at 06:15:30PM +0900, Masami Hiramatsu wrote: > >> Allow user to set group name for adding new event. > >> Note that this can easily shot yourself in the foot. > >> E.g. Existing group name can conflict with other events. > >> Especially, using the group name reserved for kernel > >> modules can break something when loading/unloading > >> modules. > > > > Yes, I agree that this can be dangerous. How about enforcing > > [ku]probes to make the directory of dynamic events safely? > > What the safety issue would you afraid? As you said, I worried that an arbitrary group/event names can clash with another module's group/event names. > > > I think > > it'd be better putting all dynamic events in a single directory - > > e.g. $tracefs/events/probe/. Any events lack group name are created > > in the directory. Any events have group name create subdirectories as > > group name under the directory. The perf tools (and others too) > > should be changed to lookup the directory after the usual location. > > That will be possible, but includes a big change on event namespace, > e.g. how we'll show the events by perf-list? Even if we can avoid > namespace conflict on tracefs, perf-list event namespace is still > fragile. Yes, it's a big change. And I think we can easily fix perf-list to handle the new event namespace. But other tools/scripts will break. > > > What do you think? > > I think there are 2 purposes of probe-event, one is just additional > debug points, another is an extensible event-set. The former will not > any namespace problem, we just add it into new namespace. But latter > requires to be treated as a part of existing (in-kernel) events. > And (userspace)SDT is clearly the latter one. > > However, avoiding the conflict of namespace is also important, how > about simply using sdt_<PROVIDER>:<NAME> ? > > - Give just a name on a userspace binary > perf probe -x <BIN> --add <NAME>=<PROBEDEF> > -> probe_<BIN>:<NAME> > - Give a pair of group and name on a userspace binary > perf probe -x <BIN> --add <GRP>:<NAME>=<PROBEDEF> > -> probe_<GRP>:<NAME> > - Set an sdt event on a userspace binary > perf probe -x <BIN> --add %<PROV>:<NAME> # or %sdt_<PROV> ? > -> sdt_<PROV>:<NAME> > - Set an cached event on a userspace binary > perf probe -x <BIN> --add %<GRP>:<NAME> # or %probe_<GRP> ? > -> probe_<GRP>:<NAME> I think this is good for perf. It seems same problem still exists when users access tracefs directly though. Thanks, Namhyung -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@...r.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists