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, 10 Aug 2011 15:34:13 -0400
From:	Steven Rostedt <rostedt@...dmis.org>
To:	Jiri Olsa <jolsa@...hat.com>
Cc:	fweisbec@...il.com, a.p.zijlstra@...llo.nl,
	linux-kernel@...r.kernel.org
Subject: Re: [RFC 2/4] perf, ftrace: Add filter support for ftrace:function
 tracepoint

Hi Jiri,

Sorry for the late response, I've been catching up on lots of other
things.


On Mon, 2011-07-11 at 15:22 +0200, Jiri Olsa wrote:

> +int ftrace_function_rec_ip(char *func, unsigned long long *ip)
> +{
> +	struct ftrace_page *pg;
> +	struct dyn_ftrace *rec;
> +	int len = strlen(func);
> +	int found = 0;
> +
> +	mutex_lock(&ftrace_lock);
> +
> +	do_for_each_ftrace_rec(pg, rec) {
> +		if (!ftrace_match_record(rec, NULL, func, len, MATCH_FULL))
> +			continue;
> +
> +		*ip = rec->ip;
> +		found = 1;
> +		break;

You can't use break here. The do_for_each_ftrace_rec() { }
while_for_each_ftrace_rec(); is a double loop. The break exits the first
loop, but then continues to the next loop. You must use a goto.

-- Steve

> +	} while_for_each_ftrace_rec();
> +
> +	mutex_unlock(&ftrace_lock);
> +
> +	return found ? 0 : -EINVAL;
> +}
> +


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