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: <20130407141547.GD8672@linux.vnet.ibm.com>
Date:	Sun, 7 Apr 2013 19:45:47 +0530
From:	Srikar Dronamraju <srikar@...ux.vnet.ibm.com>
To:	Oleg Nesterov <oleg@...hat.com>
Cc:	Ananth N Mavinakayanahalli <ananth@...ibm.com>,
	Steven Rostedt <rostedt@...dmis.org>,
	Anton Arapov <anton@...hat.com>,
	Frederic Weisbecker <fweisbec@...il.com>,
	Ingo Molnar <mingo@...hat.com>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 5/6] uprobes/tracing: Make seq_printf() code
 uretprobe-friendly

* Oleg Nesterov <oleg@...hat.com> [2013-04-01 18:08:57]:

> Change probes_seq_show() and print_uprobe_event() to check
> is_ret_probe() and print the correct data.
> 
> Signed-off-by: Oleg Nesterov <oleg@...hat.com>

Acked-by: Srikar Dronamraju <srikar@...ux.vnet.ibm.com>

> ---
>  kernel/trace/trace_uprobe.c |   17 +++++++++++++----
>  1 files changed, 13 insertions(+), 4 deletions(-)
> 
> diff --git a/kernel/trace/trace_uprobe.c b/kernel/trace/trace_uprobe.c
> index f75e52d..1b3622a 100644
> --- a/kernel/trace/trace_uprobe.c
> +++ b/kernel/trace/trace_uprobe.c
> @@ -434,9 +434,10 @@ static void probes_seq_stop(struct seq_file *m, void *v)
>  static int probes_seq_show(struct seq_file *m, void *v)
>  {
>  	struct trace_uprobe *tu = v;
> +	char c = is_ret_probe(tu) ? 'r' : 'p';
>  	int i;
> 
> -	seq_printf(m, "p:%s/%s", tu->call.class->system, tu->call.name);
> +	seq_printf(m, "%c:%s/%s", c, tu->call.class->system, tu->call.name);
>  	seq_printf(m, " %s:0x%p", tu->filename, (void *)tu->offset);
> 
>  	for (i = 0; i < tu->nr_args; i++)
> @@ -569,10 +570,18 @@ print_uprobe_event(struct trace_iterator *iter, int flags, struct trace_event *e
>  	entry = (struct uprobe_trace_entry_head *)iter->ent;
>  	tu = container_of(event, struct trace_uprobe, call.event);
> 
> -	if (!trace_seq_printf(s, "%s: (0x%lx)", tu->call.name, entry->vaddr[0]))
> -		goto partial;
> +	if (is_ret_probe(tu)) {
> +		if (!trace_seq_printf(s, "%s: (0x%lx <- 0x%lx)", tu->call.name,
> +					entry->vaddr[1], entry->vaddr[0]))
> +			goto partial;
> +		data = DATAOF_TRACE_ENTRY(entry, 2);
> +	} else {
> +		if (!trace_seq_printf(s, "%s: (0x%lx)", tu->call.name,
> +					entry->vaddr[0]))
> +			goto partial;
> +		data = DATAOF_TRACE_ENTRY(entry, 1);
> +	}
> 
> -	data = DATAOF_TRACE_ENTRY(entry, 1);
>  	for (i = 0; i < tu->nr_args; i++) {
>  		if (!tu->args[i].type->print(s, tu->args[i].name,
>  					     data + tu->args[i].offset, entry))
> -- 
> 1.5.5.1
> 

-- 
Thanks and Regards
Srikar Dronamraju

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