Messages in this thread | | | Date | Wed, 6 Jul 2005 07:25:13 -0500 | From | serge@hallyn ... | Subject | Re: [PATCH] securityfs |
| |
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 - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |