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]
Message-ID: <20130204151850.GA6641@redhat.com>
Date:	Mon, 4 Feb 2013 16:18:50 +0100
From:	Oleg Nesterov <oleg@...hat.com>
To:	Srikar Dronamraju <srikar@...ux.vnet.ibm.com>
Cc:	Ingo Molnar <mingo@...e.hu>, Steven Rostedt <rostedt@...dmis.org>,
	Anton Arapov <anton@...hat.com>,
	Frank Eigler <fche@...hat.com>,
	Josh Stone <jistone@...hat.com>,
	Masami Hiramatsu <masami.hiramatsu.pt@...achi.com>,
	"Suzuki K. Poulose" <suzuki@...ibm.com>,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 6/6] uprobes/perf: Always increment trace_uprobe->nhit

On 02/04, Srikar Dronamraju wrote:
>
> * Oleg Nesterov <oleg@...hat.com> [2013-01-31 20:18:32]:
>
> > Move tu->nhit++ from uprobe_trace_func() to uprobe_dispatcher().
> >
> > ->nhit counts how many time we hit the breakpoint inserted by this
> > uprobe, we do not want to loose this info if uprobe was enabled by
> > sys_perf_event_open().
> >
>
> Though I dont see a problem with this change, It seems unnecessary for
> me.
>
> Info from nhits is mostly for /sys/kernel/debug/tracing/uprobe_profile

It is only for uprobe_profile, yes, and it is useful. Why should we hide
this info if this uprobe is used by perf?

> I am not sure how sys_perf_event_open() is making use of this?

I hope I'll send the final series today. From the changelog of the patch
which actually turns the filtering on:

	Testing:

		# perf probe -x /lib/libc.so.6 syscall

		# perl -e 'syscall -1 while 1' &
		[1] 530

		# perf record -e probe_libc:syscall perl -e 'syscall -1 for 1..10; sleep 1'

		# perf report --show-total-period
			100.00%            10     perl  libc-2.8.so    [.] syscall

	Before this patch:

		# cat /sys/kernel/debug/tracing/uprobe_profile
			/lib/libc.so.6 syscall				79291

	A huge ->nrhit == 79291 reflects the fact that the background process
	530 constantly hits this breakpoint too, even if doesn't contribute to
	the output.

	After the patch:

		# cat /sys/kernel/debug/tracing/uprobe_profile
			/lib/libc.so.6 syscall				10

	This shows that only the target process was punished by int3.

Oleg.

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