linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [patch 0/3] sysfs permissions
@ 2005-06-01 20:59 Greg KH
  0 siblings, 0 replies; 2+ messages in thread
From: Greg KH @ 2005-06-01 20:59 UTC (permalink / raw)
  To: linux-hotplug

On Tue, May 31, 2005 at 10:36:42AM +0530, Maneesh Soni wrote:
> Hi
> 
> Following this post, are the three patches implementing setattr functionality 
> for sysfs objects. This allows sysfs objects to get their default attributes 
> like owner, group, permission modes modified. The changed attributes are 
> saved in a struct iattr linked with struct sysfs_dirent for the corresponding 
> object. This keeps the inode attributes saved even if inode/dentry is 
> evacuated due to memory pressure or umount. The struct iattr is allocated only 
> for those sysfs objects for which inode attributes are getting changed.
> 
> I did the following test for verifying the patchset
> 
> [root@llm01 ~]# ls -l /sys/class/net/dummy0/address
> -r--r--r--  1 root root 4096 May 31 10:32 /sys/class/net/dummy0/address
> [root@llm01 ~]# chmod +w /sys/class/net/dummy0/address
> [root@llm01 ~]# ls -l /sys/class/net/dummy0/address
> -rw-r--r--  1 root root 4096 May 31 10:32 /sys/class/net/dummy0/address
> [root@llm01 ~]#
> [root@llm01 ~]# chown maneesh /sys/class/net/dummy0/address
> [root@llm01 ~]# ls -l /sys/class/net/dummy0/address
> -rw-r--r--  1 maneesh root 4096 May 31 10:32 /sys/class/net/dummy0/address
> [root@llm01 ~]#
> [root@llm01 ~]# chgrp maneesh /sys/class/net/dummy0/address
> [root@llm01 ~]# ls -l /sys/class/net/dummy0/address
> -rw-r--r--  1 maneesh maneesh 4096 May 31 10:32 /sys/class/net/dummy0/address
> [root@llm01 ~]#
> [root@llm01 ~]# umount /sys
> [root@llm01 ~]# ls -l /sys/class/net/dummy0/address
> ls: /sys/class/net/dummy0/address: No such file or directory
> [root@llm01 ~]#
> [root@llm01 ~]# mount -t sysfs none /sys
> [root@llm01 ~]# ls -l /sys/class/net/dummy0/address
> -rw-r--r--  1 maneesh maneesh 4096 May 31 10:32 /sys/class/net/dummy0/address
> 
> 
> Please review/test.

Nice, thanks a lot for doing this.  I've added them to my tree and will
test them out (should also show up in the next -mm release).

thanks again,

greg k-h


-------------------------------------------------------
This SF.Net email is sponsored by Yahoo.
Introducing Yahoo! Search Developer Network - Create apps using Yahoo!
Search APIs Find out how you can build Yahoo! directly into your own
Applications - visit http://developer.yahoo.net/?fr=offad-ysdn-ostg-q22005
_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

^ permalink raw reply	[flat|nested] 2+ messages in thread
* [patch 0/3] sysfs permissions
@ 2005-05-31  5:18 Maneesh Soni
  0 siblings, 0 replies; 2+ messages in thread
From: Maneesh Soni @ 2005-05-31  5:18 UTC (permalink / raw)
  To: linux-hotplug

Hi

Following this post, are the three patches implementing setattr functionality 
for sysfs objects. This allows sysfs objects to get their default attributes 
like owner, group, permission modes modified. The changed attributes are 
saved in a struct iattr linked with struct sysfs_dirent for the corresponding 
object. This keeps the inode attributes saved even if inode/dentry is 
evacuated due to memory pressure or umount. The struct iattr is allocated only 
for those sysfs objects for which inode attributes are getting changed.

I did the following test for verifying the patchset

[root@llm01 ~]# ls -l /sys/class/net/dummy0/address
-r--r--r--  1 root root 4096 May 31 10:32 /sys/class/net/dummy0/address
[root@llm01 ~]# chmod +w /sys/class/net/dummy0/address
[root@llm01 ~]# ls -l /sys/class/net/dummy0/address
-rw-r--r--  1 root root 4096 May 31 10:32 /sys/class/net/dummy0/address
[root@llm01 ~]#
[root@llm01 ~]# chown maneesh /sys/class/net/dummy0/address
[root@llm01 ~]# ls -l /sys/class/net/dummy0/address
-rw-r--r--  1 maneesh root 4096 May 31 10:32 /sys/class/net/dummy0/address
[root@llm01 ~]#
[root@llm01 ~]# chgrp maneesh /sys/class/net/dummy0/address
[root@llm01 ~]# ls -l /sys/class/net/dummy0/address
-rw-r--r--  1 maneesh maneesh 4096 May 31 10:32 /sys/class/net/dummy0/address
[root@llm01 ~]#
[root@llm01 ~]# umount /sys
[root@llm01 ~]# ls -l /sys/class/net/dummy0/address
ls: /sys/class/net/dummy0/address: No such file or directory
[root@llm01 ~]#
[root@llm01 ~]# mount -t sysfs none /sys
[root@llm01 ~]# ls -l /sys/class/net/dummy0/address
-rw-r--r--  1 maneesh maneesh 4096 May 31 10:32 /sys/class/net/dummy0/address


Please review/test.

Thanks
Maneesh


-- 
Maneesh Soni
Linux Technology Center, 
IBM India Software Labs,
Bangalore, India
email: maneesh@in.ibm.com
Phone: 91-80-25044990


-------------------------------------------------------
This SF.Net email is sponsored by Yahoo.
Introducing Yahoo! Search Developer Network - Create apps using Yahoo!
Search APIs Find out how you can build Yahoo! directly into your own
Applications - visit http://developer.yahoo.net/?fr=offad-ysdn-ostg-q22005
_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2005-06-01 20:59 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-06-01 20:59 [patch 0/3] sysfs permissions Greg KH
  -- strict thread matches above, loose matches on Subject: below --
2005-05-31  5:18 Maneesh Soni

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).