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: <20150125202729.GI29656@ZenIV.linux.org.uk>
Date:	Sun, 25 Jan 2015 20:27:29 +0000
From:	Al Viro <viro@...IV.linux.org.uk>
To:	Steven Rostedt <rostedt@...dmis.org>
Cc:	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	linux-kernel@...r.kernel.org, Ingo Molnar <mingo@...nel.org>,
	Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [PATCH 3/5 v2] tracing: Automatically mount tracefs on
 debugfs/tracing

On Sun, Jan 25, 2015 at 07:59:32PM +0000, Al Viro wrote:
> On Sun, Jan 25, 2015 at 02:38:30PM -0500, Steven Rostedt wrote:
> > On Sun, 25 Jan 2015 21:22:07 +0800
> > Greg Kroah-Hartman <gregkh@...uxfoundation.org> wrote:
> > 
> > 
> > > If we could do it in a non-racy way, that would be good, otherwise I
> > > don't see us being able to even take this patch :(
> > 
> > Is it still racy even if it's only done at boot up? This path only gets
> > hit the first time it is called. "if (tr->flags &TRACE_ARRAY_FL_GLOBAL)"
> > is the top level tracing directory ("tracing") and is only called
> > during boot up (fs_initcall) and never hit again. I could even make
> > this called directly by that code so we could label it "__init" to make
> > sure that it is to be never hit. Or is this racy even when done by
> > fs_initcall?
> > 
> > Waiting for Al to comment on this, because, I can't add this feature
> > until debugfs/tracing still containing the tracing information,
> > otherwise it will break all the tools that interact with the tracing
> > infrastructure, and we all know how happy Linus feels about such
> > changes.
> 
> Actually, I'm almost done massaging that sucker into adding
> debugfs_create_automount().  The only remaining question is what arguments
> do we put it; for now I'm giving it dentry_operations + data (to go into
> inode->i_private), but it might be better to give it a pointer just to
> d_automount() callback + data for it...

Turns out that it is better that way (and less prone to abuse).  See
vfs.git#debugfs_automount; some massage on top of 3.19-rc5, the payoff is
in the last commit.

For your code it's a matter of replacing struct path *path with void *unused
in trace_automount() and just calling
	debugfs_create_automount("tracing", NULL, trace_automount, NULL);
to create the sucker.  That's it - no games with ->d_op, etc.
--
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