tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: "Rewriting kernfs and procfs" - GSoC'12



Hi,

On Mar,Sunday 18 2012, at 2:24 AM, ambarisha b wrote:

> Hi,
> 
> On Fri, Mar 9, 2012 at 1:37 AM, Elad Efrat <elad%netbsd.org@localhost> wrote:
>> On 2012-03-07 6:12 PM, ambarisha b wrote:
>> 
>>> I also found two other projects not on GSoC page really interesting.
>>> "Rewriting kernfs and procfs". Can it be worked on as a GSoC project,
>>> because it isn't tagged GSoC?
>> 
>> I want to see that done, by porting the pseudofs layer from FreeBSD and
>> rewriting kernfs/procfs in terms of pseudofs. If you decide to do that,
>> I can probably mentor it, so let me know.
> 
> I couldn't find much documentation about pseudofs on the internet. So,
> I dug a little into FreeBSD's code (src/sys/fs/pseudofs/pseudofs.h) to
> inspect what pseudofs layer offers. FreeBSD's procfs has been built
> over their pseudofs. I studied some parts of it. I, now, have a good
> idea of how procfs is using pseudofs. But, to port the pseudofs, how
> do I realize the differences between NetBSD and FreeBSD which effect
> pseudofs?
> 
> The project description page [1] also talks about writing procfs in
> such a way as to be able to allow external code to add/delete its
> entries dynamically through an API. How would this work and what are
> its implications?

I can't talk for others but I understand it that way that there will be some 
sort of a api to create/destroy dynamic entries in procfs.

struct procfs_node {
 procfs_node_path;
 procfs_node_permissions;
 procfs_owner;
 procfs_group;
 
 procfs_callback; -> function called when this node is accessed.
};

procfs_register_node(procfs_node *node);
procfs_unregister_node(procfs_node *node);

this would allow for third party modules to create their procfs nodes and 
destroy
them during module unload.



> 
> Cheers
> Ambarish
> 
> [1] - http://wiki.netbsd.org/projects/project/kernfs-rewrite/

Regards

Adam.



Home | Main Index | Thread Index | Old Index