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
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20100712173230.GE23776@linux.vnet.ibm.com>
Date:	Mon, 12 Jul 2010 23:02:30 +0530
From:	Srikar Dronamraju <srikar@...ux.vnet.ibm.com>
To:	Arnaldo Carvalho de Melo <acme@...radead.org>
Cc:	Peter Zijlstra <peterz@...radead.org>, Ingo Molnar <mingo@...e.hu>,
	Steven Rostedt <rostedt@...dmis.org>,
	Randy Dunlap <rdunlap@...otime.net>,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	Christoph Hellwig <hch@...radead.org>,
	Masami Hiramatsu <masami.hiramatsu.pt@...achi.com>,
	Oleg Nesterov <oleg@...hat.com>,
	Mark Wielaard <mjw@...hat.com>,
	Mathieu Desnoyers <mathieu.desnoyers@...icios.com>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Naren A Devaiah <naren.devaiah@...ibm.com>,
	Jim Keniston <jkenisto@...ux.vnet.ibm.com>,
	Frederic Weisbecker <fweisbec@...il.com>,
	"Frank Ch. Eigler" <fche@...hat.com>,
	Ananth N Mavinakayanahalli <ananth@...ibm.com>,
	LKML <linux-kernel@...r.kernel.org>,
	"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>
Subject: Re: [PATCHv9 2.6.35-rc4-tip 11/13]  perf: perf interface for
 uprobes

> Before some more comments: this is getting really nice! Kudos!
> 

Thanks.

> > +
> > +	/* check if user has specifed a virtual address */
> > +	vaddr = strtoul(pp->function, NULL, 0);
> > +	session = perf_session__new(NULL, O_WRONLY, false, false);
> 
> At first creating a session here looks too much, lets see below...

Okay. 

> 
> > +	if (!vaddr)
> > +		symbol_conf.sort_by_name = true;
> > +	if (symbol__init() < 0) {
> > +		pr_warning("Cannot initialize symbols.\n");
> > +		goto free_session;
> > +	}
> 
> Configuring the symbol lib on a library function is a no-go, this
> function (symbol__init()) should be marked with the equivalent of
> "module_init()" on tools that need the symbol library, i.e. be called
> from the cmd_{top,report,probe,etc} level.


Oh okay, I then might be doing the same thing in patch 13/13. 
I will correct there too.

> 
> > +	event__synthesize_thread(pev->upid, event__process, session);
> > +	thread = perf_session__findnew(session, pev->upid);
> > +	if (!thread) {
> > +		pr_warning("Cannot initialize perf session.\n");
> > +		goto free_session;
> > +	}
> 
> Got it, you want to read an existing thread, get it into the
> perf_session threads rb_tree to then use what was parsed from /proc.
> 
> I think you should change event__synthesize_thread somehow to achieve
> taht same goal instead of going in such a roundabout way, unless you
> need the session for some other need.


Right, I need the session for the thread.

> 
> Probably we could change it to create a thread instance that then would
> be used to synthesize the MMAP and COMM events... but then for the
> existing use case we would be creating such events just to trow those
> objects away right after synthesizing the PERF_RECORD_{MMAP,COMM}
> events... perhaps duplicate them after all :-\
> 
> If I don't come with something for this quickly we can go on using what
> you coded and later refactor it to remove the fat.

Okay. I am fine either way.

> > +					struct probe_trace_event *tev)
> >  {
> > -	struct kprobe_trace_point *tp = &tev->point;
> > +	struct probe_trace_point *tp = &tev->point;
> >  	char pr;
> >  	char *p;
> >  	int ret, i, argc;
> >  	char **argv;
> >  
> > -	pr_debug("Parsing kprobe_events: %s\n", cmd);
> > +	pr_debug("Parsing probe_events: %s\n", cmd);
> 
> I suggest you put these s/kprobe/probe/g parts in a separate patch for
> easing review :)
> 

Okay . 

--
Thanks and Regards
Srikar
--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ