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: <52A7C347.1060402@hitachi.com>
Date:	Wed, 11 Dec 2013 10:43:35 +0900
From:	Masami Hiramatsu <masami.hiramatsu.pt@...achi.com>
To:	Oleg Nesterov <oleg@...hat.com>
Cc:	Namhyung Kim <namhyung@...nel.org>,
	Steven Rostedt <rostedt@...dmis.org>,
	Srikar Dronamraju <srikar@...ux.vnet.ibm.com>,
	Hyeoncheol Lee <cheol.lee@....com>,
	"zhangwei(Jovi)" <jovi.zhangwei@...wei.com>,
	Arnaldo Carvalho de Melo <acme@...stprotocols.net>,
	Hemant Kumar <hkshaw@...ux.vnet.ibm.com>,
	LKML <linux-kernel@...r.kernel.org>,
	Namhyung Kim <namhyung.kim@....com>
Subject: Re: [PATCH 16/17] uprobes: Allocate ->utask before handler_chain()
 for tracing handlers

(2013/12/11 0:57), Oleg Nesterov wrote:
> On 12/10, Masami Hiramatsu wrote:
>>
>> (2013/12/09 15:20), Namhyung Kim wrote:
>>> From: Oleg Nesterov <oleg@...hat.com>
>>>
>>> uprobe_trace_print() and uprobe_perf_print() need to pass the additional
>>> info to call_fetch() methods, currently there is no simple way to do this.
>>>
>>> current->utask looks like a natural place to hold this info, but we need
>>> to allocate it before handler_chain().
>>>
>>> This is a bit unfortunate, perhaps we will find a better solution later,
>>> but this is simnple and should work right now.
>>
>> Hmm, when this will happen?
> 
> Perhaps never. Perhaps it will stay forever and we remove get_utask() from
> pre_ssout() (it is not needed after this patch).

Ah, OK, get_utask() is almost same as kzalloc().

> However I still think we can cleanup this. And to remind, we need to clean
> the usage of utask->vaddr in trace_uprobe.c anyway. We can either try to
> find another place to pass the info, or we can create a helper(s) for the
> tracing handlers to access (and populate if NULL) utask->handler_data.
> Note that this (probably) also makes sense because we can unexport
> "struct uprobe_task" (but this needs a couple of off-topic cleanups).
> 
> We will see. Lets do the minimal change which can work right now, Namhyung
> has enough more serious problems ;)
> 
>> and isn't it better to increment
>> miss-hit counter of the uprobe?
> 
> What do you mean? This is not miss-hit and ->utask == NULL is quite normal.

But it could skip the handler_chain silently. It could confuse users
why their probe doesn't hit as expected.

> For example, on ppc it can be always NULL because ppc likely emulates the
> probed insn.

Hmm, in that case, should uprobes handlers never be called on ppc with
this change?

> Or did you mean that if get_utask() fails we should report this somehow?

I meant that if the uprobes hits some error and not work as expected,
it should be reported somehow to users, and miss-hit counter will be
a possible option.

Thank you,

-- 
Masami HIRAMATSU
IT Management Research Dept. Linux Technology Center
Hitachi, Ltd., Yokohama Research Laboratory
E-mail: masami.hiramatsu.pt@...achi.com


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