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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 12 Oct 2009 23:16:46 +0200
From:	Frederic Weisbecker <fweisbec@...il.com>
To:	Masami Hiramatsu <mhiramat@...hat.com>
Cc:	Steven Rostedt <rostedt@...dmis.org>, Ingo Molnar <mingo@...e.hu>,
	lkml <linux-kernel@...r.kernel.org>,
	systemtap <systemtap@...rces.redhat.com>,
	DLE <dle-develop@...ts.sourceforge.net>,
	Thomas Gleixner <tglx@...utronix.de>,
	Arnaldo Carvalho de Melo <acme@...hat.com>,
	Mike Galbraith <efault@....de>,
	Paul Mackerras <paulus@...ba.org>,
	Peter Zijlstra <a.p.zijlstra@...llo.nl>,
	Christoph Hellwig <hch@...radead.org>,
	Ananth N Mavinakayanahalli <ananth@...ibm.com>,
	Jim Keniston <jkenisto@...ibm.com>,
	"Frank Ch. Eigler" <fche@...hat.com>
Subject: Re: [PATCH tracing/kprobes v3 4/7] tracing/kprobes: Avoid field
	name confliction

On Mon, Oct 12, 2009 at 04:22:26PM -0400, Masami Hiramatsu wrote:
> Frederic Weisbecker wrote:
>> On Mon, Oct 12, 2009 at 03:13:51PM -0400, Masami Hiramatsu wrote:
>>> Frederic Weisbecker wrote:
>>>> The conflict issue might not be obvious for a user desperately trying to set
>>>> a kprobe. Even for other failcases, it might not be obvious (blacklisted
>>>> symbols, syntax errors...)
>>>>
>>>> May be should you improve the error granularity and print a KERN_DEBUG
>>>> message?
>>>
>>> Agreed, and kprobes error handling should be improved too (in the most cases,
>>> it just returns -EINVAL).
>>>
>>> Thank you.
>>>
>>
>>
>> And btw, I'm enable to create a probe, neither through ftrace nor perf:
>>
>> 	$ sudo ./perf probe -P 'p:sys_close sys_close $retval'
>> 	Adding new event: p:sys_close sys_close+0 $retval
>>
>> 	Error: Failed to create event: Invalid argument
>>
>>
>> 	# echo 'p:sys_open sys_open $retval'>  /debug/tracing/kprobe_events
>> 	bash: echo: write error : Invalid argument
>>
>> I suspect I missed something very obvious with the syntax :)
>
> Ah, only kretprobe events can use $retval :-)
> So, you should specify 'r' instead of 'p'.
>
> -P 'r:sys_close sys_close $retval'
>

Hehe, I was sure I was doing something silly but couldn't figure
out what :-)

So that works, at least without libdwarf, I can't test with it for
now but this tool looks very promising.

I really think it would be great to be able to cut the

	./perf probe
	./perf record
	./perf trace

batch into one step through a single

	./perf probe -t -P "probe definition" [-a|cmdline]

That would do the probe creation, the record, and stop
once the given process finishes, or once we Ctrl+C (especially
useful in wide tracing with -a, but sometimes also with processes).
Not a lot of changes are required to do that.

I can already see printk() whining on the horizon...

Thanks!

--
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