Re: [PATCH] Security/sysfs: Enable security xattrs to be set onsysfs files, directories, and symlinks.

From: Greg KH
Date: Thu Jul 09 2009 - 11:27:52 EST


On Thu, Jul 09, 2009 at 10:05:06AM -0400, David P. Quigley wrote:
> So are you proposing that we embed a variable length string in the
> sysfs_dirent structure because that sounds completely silly. It seems
> completely reasonable here to take the blob coming in and have the LSM
> turn it into a handle that is efficiently referenced by the
> sysfs_dirent. The problem here is that sysfs entries have no backing
> store at all which means everything we do will have to be added to
> sysfs_dirent. I'm pretty sure we don't want to be doing lifecycle
> management on strings inside this structure considering the only other
> string I see is marked const. If you have a better way of doing this I'm
> interested in hearing it but it doesn't seem reasonable to be storing
> the xattr itself in the sysfs_dirent. I'd like to hear what Greg thinks
> about that.

I think you all better agree on the proposed solution before I will
accept any changes to the sysfs core code :)

good luck,

greg k-h
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/