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:	Thu, 22 Jan 2015 09:32:49 -0500
From:	Steven Rostedt <rostedt@...dmis.org>
To:	Tejun Heo <tj@...nel.org>
Cc:	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	linux-kernel@...r.kernel.org, Al Viro <viro@...IV.linux.org.uk>,
	Ingo Molnar <mingo@...nel.org>,
	Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [RFC][PATCH 0/5] tracing: Add new file system tracefs

On Thu, 22 Jan 2015 07:32:12 -0500
Tejun Heo <tj@...nel.org> wrote:

> > That is, I need to create the following interface:
> > 
> >   tracefs_create_file()
> 
> kernfs_create_file()
> 
> >   tracefs_create_dir()
> 
> kernfs_create_dir()

The problem is that these do not return dentry. They return kernfs_node.

I see a kernfs_node_from_dentry() call but not the other way around.

Yes, the interface for tracefs is just these four functions, but then
the interaction of the kernfs versions use a completely different API.

Each of the created files expects to attach their own open, read,
write, and release functions. And yes, some even use the seq functions,
and they use it the vfs way. I do not intend on rewriting the users of
the debugfs file system. To use kernfs, it seems that I would need to
do that, and I don't have the time to make such a dramatic change to
the system. It will fall down on my TODO list and I probably wont get
to it for another decade.

I created tracefs with 700 lines of code and two files (inode.c and
tracefs.h), and for the users of tracefs, I just did
s/debugfs/tracefs/. If I can't make that substitution for the users,
that is a show stopper.

I don't see how I can use kernfs without it causing a lot of invasive
changes to the ftrace subsystem.

-- Steve


> 
> >   tracefs_remove()
> >   tracefs_remove_recursive()
> 
> kernfs_remove[_by_name]() - recursive by default
> 
> > and that's all I need for the filesystem. There doesn't seem to be any
> > documentation on kernfs about how to implement this.
> > 
> > Yes, I can study the code, but I was hoping that there was some
> > kernfs.txt that described how to create a new fs with it. It just saves
> > time if there was a document than having to read the code and perhaps
> > use it in a way it wasn't supposed to be used.
> 
> Yeah yeah, I hear you.  I'll write one up.
> 
> Thanks.
> 

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