Re: [PATCH] securityfs

serge
2005-07-06T16:43:22Z

Quoting Greg KH (greg@kroah.com):
> Nice, glad to see this makes your code smaller and simpler. Although I
> think it could be made even smaller if you use the default read and
> write file type functions in libfs (look at the debugfs wrappers of them
> for u8, u16, etc, for examples of how to use them.)

Hmm, I looked around at libfs and debugfs yesterday... it seems that
the simple_attr_read as used by fops_u8 would have been great for
seclvl - except that -1 is a valid input for seclvl :)

A more specialized per-type API in security/security.c in the line of
debugfs/file.c might be good,simple_attr_read as used by fops_u8 would
have been great for
seclvl - except that -1 is a valid input for seclvl :)

The general type of API provided by debugfs/file.c might be useful in
security/security.c, though, provided that the securityfs_create_int()
and friends also took a function pointer to an update() or validate()
function. I'll try to do something like that later today or tomorrow.

thanks,
-serge