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:	Mon, 26 Jan 2015 18:43:14 -0500
From:	Steven Rostedt <rostedt@...dmis.org>
To:	Al Viro <viro@...IV.linux.org.uk>
Cc:	linux-kernel@...r.kernel.org,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	Ingo Molnar <mingo@...nel.org>,
	Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [PATCH 00/16 v3] tracing: Add new file system tracefs

On Mon, 26 Jan 2015 21:46:58 +0000
Al Viro <viro@...IV.linux.org.uk> wrote:

> On Mon, Jan 26, 2015 at 03:42:59PM -0500, Steven Rostedt wrote:
> > On Mon, 26 Jan 2015 19:30:49 +0000
> > Al Viro <viro@...IV.linux.org.uk> wrote:
> > 
> > > You are still fighting an inconvenient API, but now it's not debugfs one -
> > > it's your copy thereof.  Why not give your instances/ an inode_operations
> > > of its own?  One with ->mkdir() and ->rmdir(), leaving all other directories
> > > as-is.  That way you don't need the secondary methods at all.  And sure,
> > > debugfs_create_dir() grabs ->i_mutex on parent, making you drop that in
> > > your ->mkdir() if you want to call it.  But now you are not talking to it -
> > > just to your own code, where you are free to change the calling conventions,
> > > making it caller's responsibility to get that ->i_mutex.  The same goes for
> > > the rmdir side...
> > 
> > The vfs layer grabs the i_mutex, which needs to be dropped.
> 
> What for?  Just keep it through your instance_mkdir/instance_rmdir and be
> done with that.  Sure, it means that you need variants of file/directory
> creation/removal primitives that would assume that parent is already locked
> by caller (and would leave unlocking to the caller as well).  So add them...

I originally had this, but the issue isn't with i_mutex only. The
instance_mkdir and instance_rmdir need to grab trace_types_lock. This
is also held when calling into tracefs.

That is, we can not hold i_mutex and take trace_types_lock.

trace_types_lock needs to be held with the creation or destruction of
events, which is what mkdir an rmdir do.


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