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]
Date:	Sun, 25 Jan 2015 14:24:07 -0500
From:	Steven Rostedt <rostedt@...dmis.org>
To:	Jiri Olsa <jolsa@...hat.com>
Cc:	linux-kernel@...r.kernel.org, Ingo Molnar <mingo@...nel.org>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Jiri Olsa <jolsa@...nel.org>,
	Arnaldo Carvalho de Melo <acme@...hat.com>,
	Masami Hiramatsu <masami.hiramatsu.pt@...achi.com>,
	Namhyung Kim <namhyung@...nel.org>
Subject: Re: [PATCH 2/5] tools lib api fs: Add tracefs mount helper
 functions

On Sun, 25 Jan 2015 17:51:14 +0100
Jiri Olsa <jolsa@...hat.com> wrote:

> On Sat, Jan 24, 2015 at 01:13:32PM -0500, Steven Rostedt wrote:
> 
> SNIP
> 
> > +static const char * const tracefs_known_mountpoints[] = {
> > +	TRACEFS_DEFAULT_PATH,
> > +	"/sys/kernel/debug/tracing",
> > +	"/tracing",
> > +	"/trace",
> > +	0,
> > +};
> > +
> > +static bool tracefs_found;
> > +
> > +/* find the path to the mounted tracefs */
> > +const char *tracefs_find_mountpoint(void)
> > +{
> > +	if (tracefs_found)
> > +		return (const char *)tracefs_mountpoint;
> > +
> > +	return find_mountpoint("tracefs", (long) TRACEFS_MAGIC,
> > +			       tracefs_mountpoint, PATH_MAX + 1,
> > +			       tracefs_known_mountpoints);
> > +}
> 
> also tracefs_found is not set 'true' in case we succeed..
> 

Thanks will fix. This is something that testing wouldn't catch, because
the tracefs_found (and debugfs_found) are just there to not try to
remount. Where here it would just refind where it is mounted. Thus, not
incorrect code, just inefficient code.

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