lkml.org 
[lkml]   [2009]   [Jul]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] Security/sysfs: Enable security xattrs to be set on sysfs files, directories, and symlinks.
From
Date
On Tue, 2009-07-14 at 13:35 -0700, Greg KH wrote:
> On Tue, Jul 14, 2009 at 04:16:06PM -0400, David P. Quigley wrote:
> > On Tue, 2009-07-14 at 10:50 -0700, Greg KH wrote:
> > > On Tue, Jul 14, 2009 at 12:37:39PM -0400, David P. Quigley wrote:
> > > > So, I've been looking through the sysfs code and I can't find a
> > > > reference to netlink in there. I am assuming that it is other parts of
> > > > the kernel which make use of netlink which are calling the sysfs_*
> > > > functions. Any suggestions for where to look on how this is being used
> > > > and what the important users are?
> > >
> > > The netlink messages are coming from the kobject uevent code, look in
> > > lib/kobject_uevent.c for the code that creates and sends them out. This
> > > happens for every sysfs directory that is created that corresponds with
> > > a kobject.
> > >
> > > thanks,
> > >
> > > greg k-h
> >
> > It is unclear to me what if anything we need to do to the kobject_uevent
> > code for these changes. Do you have a particular use case in mind? Is
> > there some sort of notification that should be sent up to user space
> > when the label is changed on a file?
>
> No, the point is that userspace is notified when a kobject is created
> and added to sysfs. You can use that notification to then put the
> "correct" label on the sysfs directory and files, if they differ from
> your "default" value you wanted them to have.
>
> Hope this helps,
>
> greg k-h


Ahh that makes sense. Thank you for the input. It seems like we can have
libvirtd listen for these messages and when the new devices are created
as a result of its actions it can then label them appropriately. I'll
pass it along to the svirt guys.

Dave



\
 
 \ /
  Last update: 2009-07-14 22:47    [W:0.070 / U:0.208 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site