1. 05 11月, 2009 1 次提交
  2. 15 10月, 2009 1 次提交
  3. 10 9月, 2009 1 次提交
    • D
      sysfs: Add labeling support for sysfs · ddd29ec6
      David P. Quigley 提交于
      This patch adds a setxattr handler to the file, directory, and symlink
      inode_operations structures for sysfs. The patch uses hooks introduced in the
      previous patch to handle the getting and setting of security information for
      the sysfs inodes. As was suggested by Eric Biederman the struct iattr in the
      sysfs_dirent structure has been replaced by a structure which contains the
      iattr, secdata and secdata length to allow the changes to persist in the event
      that the inode representing the sysfs_dirent is evicted. Because sysfs only
      stores this information when a change is made all the optional data is moved
      into one dynamically allocated field.
      
      This patch addresses an issue where SELinux was denying virtd access to the PCI
      configuration entries in sysfs. The lack of setxattr handlers for sysfs
      required that a single label be assigned to all entries in sysfs. Granting virtd
      access to every entry in sysfs is not an acceptable solution so fine grained
      labeling of sysfs is required such that individual entries can be labeled
      appropriately.
      
      [sds:  Fixed compile-time warnings, coding style, and setting of inode security init flags.]
      Signed-off-by: NDavid P. Quigley <dpquigl@tycho.nsa.gov>
      Signed-off-by: NStephen D. Smalley <sds@tycho.nsa.gov>
      Signed-off-by: NJames Morris <jmorris@namei.org>
      ddd29ec6
  4. 29 7月, 2009 1 次提交
    • P
      sysfs: fix hardlink count on device_move · 0f58b445
      Peter Oberparleiter 提交于
      Update directory hardlink count when moving kobjects to a new parent.
      Fixes the following problem which occurs when several devices are
      moved to the same parent and then unregistered:
      
      > ls -laF /sys/devices/css0/defunct/
      > total 0
      > drwxr-xr-x 4294967295 root root    0 2009-07-14 17:02 ./
      > drwxr-xr-x        114 root root    0 2009-07-14 17:02 ../
      > drwxr-xr-x          2 root root    0 2009-07-14 17:01 power/
      > -rw-r--r--          1 root root 4096 2009-07-14 17:01 uevent
      Signed-off-by: NPeter Oberparleiter <oberpar@linux.vnet.ibm.com>
      Cc: stable <stable@kernel.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      0f58b445
  5. 28 3月, 2009 1 次提交
  6. 25 3月, 2009 2 次提交
    • E
      sysfs: don't block indefinitely for unmapped files. · e0edd3c6
      Eric W. Biederman 提交于
      Modify sysfs bin files so that we can remove the bin file while they are
      still mapped.  When the kobject is removed we unmap the bin file and
      arrange for future accesses to the mapping to receive SIGBUS.
      
      Implementing this prevents a nasty DOS when pci devices are hot plugged
      and unplugged.  Where if any of their resources were mmaped the kernel
      could not free up their pci resources or release their pci data
      structures.
      
      [akpm@linux-foundation.org: remove unused var]
      Signed-off-by: NEric W. Biederman <ebiederm@aristanetworks.com>
      Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
      Acked-by: NTejun Heo <tj@kernel.org>
      Cc: Kay Sievers <kay.sievers@vrfy.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      e0edd3c6
    • A
      sysfs: sysfs_add_one WARNs with full path to duplicate filename · 425cb029
      Alex Chiang 提交于
      sysfs: sysfs_add_one WARNs with full path to duplicate filename
      
      As a debugging aid, it can be useful to know the full path to a
      duplicate file being created in sysfs.
      
      We now will display warnings such as:
      
      	sysfs: cannot create duplicate filename '/foo'
      
      when attempting to create multiple files named 'foo' in the sysfs
      root, or:
      
      	sysfs: cannot create duplicate filename '/bus/pci/slots/5/foo'
      
      when attempting to create multiple files named 'foo' under a
      given directory in sysfs.
      
      The path displayed is always a relative path to sysfs_root. The
      leading '/' in the path name refers to the sysfs_root mount
      point, and should not be confused with the "real" '/'.
      
      Thanks to Alex Williamson for essentially writing sysfs_pathname.
      
      Cc: Alex Williamson <alex.williamson@hp.com>
      Signed-off-by: NAlex Chiang <achiang@hp.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      425cb029
  7. 23 10月, 2008 1 次提交
  8. 17 10月, 2008 3 次提交
  9. 27 7月, 2008 1 次提交
  10. 22 7月, 2008 1 次提交
  11. 15 5月, 2008 1 次提交
  12. 20 4月, 2008 1 次提交
  13. 25 1月, 2008 1 次提交
  14. 17 1月, 2008 2 次提交
  15. 31 10月, 2007 1 次提交
  16. 17 10月, 2007 2 次提交
  17. 13 10月, 2007 19 次提交