sysfs permissions
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest3 patches 0 repliesNew
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/3 | sysfs-iattr: attach sysfs_dirent before new inodefs/ | +15 | 0 replies | |
| 2/3 | sysfs-iattr: add sysfs_setattrfs/ fs/ fs/ +1 more | +69 | 0 replies | |
| 3/3 | sysfs-iattr: set inode attributesfs/ fs/ fs/ | +35 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [patch 0/3] sysfs permissions
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
Signature · 17 lines
Maneesh Soni Linux Technology Center, IBM India Software Labs, Bangalore, India email: [email protected] 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 [email protected] https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel