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]
Date:	Wed, 9 Dec 2009 09:43:41 +0100
From:	Ingo Molnar <mingo@...e.hu>
To:	Masami Hiramatsu <mhiramat@...hat.com>
Cc:	Frederic Weisbecker <fweisbec@...il.com>,
	lkml <linux-kernel@...r.kernel.org>,
	Steven Rostedt <rostedt@...dmis.org>,
	Jim Keniston <jkenisto@...ibm.com>,
	Ananth N Mavinakayanahalli <ananth@...ibm.com>,
	Christoph Hellwig <hch@...radead.org>,
	"Frank Ch. Eigler" <fche@...hat.com>,
	Jason Baron <jbaron@...hat.com>,
	"K.Prasad" <prasad@...ux.vnet.ibm.com>,
	Peter Zijlstra <peterz@...radead.org>,
	Srikar Dronamraju <srikar@...ux.vnet.ibm.com>,
	Arnaldo Carvalho de Melo <acme@...hat.com>,
	systemtap <systemtap@...rces.redhat.com>,
	DLE <dle-develop@...ts.sourceforge.net>
Subject: Re: [PATCH -tip 0/8] perf-probe updates


* Ingo Molnar <mingo@...e.hu> wrote:

> One hickup is that -d/--del does not appear to be working yet:
> 
>   # perf probe -l
>   probe:schedule                           (on schedule)
> 
>   # perf probe -d probe:schedule
>   Fatal: Failed to write event: Invalid argument

Ah, that was with an older kernel - a freshly booted kernel with 
delete-probe syntax worked fine.

There's another small hickup i had - when i typoed 'perf probe -', it 
gave me:

 # perf probe -
 No dwarf info found in the vmlinux - please rebuild with CONFIG_DEBUG_INFO.
 An error occurred in debuginfo analysis. Try to use symbols.
   Fatal: Failed to write event: Invalid argument

Similar thing happens if i try to probe a non-existent symbol:

 # perf probe test
 No dwarf info found in the vmlinux - please rebuild with CONFIG_DEBUG_INFO.
 An error occurred in debuginfo analysis. Try to use symbols.
   Fatal: Failed to write event: Invalid argument

I think we should print something more helpful, such as:

 # perf probe test
 Fatal: Kernel symbol 'test' not found - probe not added.

the debuginfo printout is not helpful in this case - we should fall back 
to symbols silently, unless the nature of the error indicates that we 
fail _because_ there's no debuginfo.

Here the failure was because the symbol does not exist.

There's similar problems in most other failure cases. Trying to remove a 
non-existent probe gives:

 # perf probe -d test
 Warning: event "probe:test" is not found.

It should say something like:

 # perf probe -d test
 Info: event "probe:test" does not exist, could not remove it.

Also, it's possible to add multiple probes to the same function, using 
'perf probe schedule' + 'perf probe schedule', etc. While in general it 
makes sense to allow it, by default we should refuse the second, 
identical probe on the symbol - and add a -f/--force option to force 
duplicate probes. I.e. the second probe should print:

 # perf probe schedule
 Info: event "probe:schedule" already exists. (Use -f to force a duplicate.)

etc. Please try out various sensible and also less sensible options of 
this tool and try to make it break - and see whether the behavior is 
intuitive and obvious to users - whether the messages are consistent, 
etc. etc.

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