From mboxrd@z Thu Jan 1 00:00:00 1970 From: Greg KH Date: Wed, 01 Jun 2005 20:59:51 +0000 Subject: Re: [patch 0/3] sysfs permissions Message-Id: <20050601210840.GA3780@kroah.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-hotplug@vger.kernel.org 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