1. 04 6月, 2014 1 次提交
    • M
      ima: audit log files opened with O_DIRECT flag · f9b2a735
      Mimi Zohar 提交于
      Files are measured or appraised based on the IMA policy.  When a
      file, in policy, is opened with the O_DIRECT flag, a deadlock
      occurs.
      
      The first attempt at resolving this lockdep temporarily removed the
      O_DIRECT flag and restored it, after calculating the hash.  The
      second attempt introduced the O_DIRECT_HAVELOCK flag. Based on this
      flag, do_blockdev_direct_IO() would skip taking the i_mutex a second
      time.  The third attempt, by Dmitry Kasatkin, resolves the i_mutex
      locking issue, by re-introducing the IMA mutex, but uncovered
      another problem.  Reading a file with O_DIRECT flag set, writes
      directly to userspace pages.  A second patch allocates a user-space
      like memory.  This works for all IMA hooks, except ima_file_free(),
      which is called on __fput() to recalculate the file hash.
      
      Until this last issue is addressed, do not 'collect' the
      measurement for measuring, appraising, or auditing files opened
      with the O_DIRECT flag set.  Based on policy, permit or deny file
      access.  This patch defines a new IMA policy rule option named
      'permit_directio'.  Policy rules could be defined, based on LSM
      or other criteria, to permit specific applications to open files
      with the O_DIRECT flag set.
      
      Changelog v1:
      - permit or deny file access based IMA policy rules
      Signed-off-by: NMimi Zohar <zohar@linux.vnet.ibm.com>
      Acked-by: NDmitry Kasatkin <d.kasatkin@samsung.com>
      Cc: <stable@vger.kernel.org>
      f9b2a735
  2. 23 2月, 2014 1 次提交
  3. 08 2月, 2014 1 次提交
    • H
      tty: Set correct tty name in 'active' sysfs attribute · d8a5dc30
      Hannes Reinecke 提交于
      The 'active' sysfs attribute should refer to the currently active tty
      devices the console is running on, not the currently active console.
      
      The console structure doesn't refer to any device in sysfs, only the tty
      the console is running on has.  So we need to print out the tty names in
      'active', not the console names.
      
      This resolves an issue on s390 platforms in determining the correct
      console device to use.
      
      Cc: Lennart Poettering <lennart@poettering.net>
      Cc: Kay Sievers <kay@vrfy.org>
      Cc: Jiri Slaby <jslaby@suse.cz>
      Cc: David Herrmann <dh.herrmann@gmail.com>
      Signed-off-by: NWerner Fink <werner@suse.de>
      Signed-off-by: NHannes Reinecke <hare@suse.de>
      Cc: stable <stable@vger.kernel.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      d8a5dc30
  4. 30 1月, 2014 1 次提交
  5. 24 1月, 2014 1 次提交
  6. 11 1月, 2014 1 次提交
  7. 09 1月, 2014 2 次提交
    • J
      f2fs: update documents and a MAINTAINERS entry · 3bac380c
      Jaegeuk Kim 提交于
      This patch adds missing some description of sysfs entries in
       - Documentation/ABI/testing/sysfs-fs-f2fs
       - Documentation/filesystems/f2fs.txt.
      
      And it adds a maintained document entry of F2FS in MAINTAINERS.
      Signed-off-by: NJaegeuk Kim <jaegeuk.kim@samsung.com>
      3bac380c
    • A
      batman-adv: add isolation_mark sysfs attribute · c42edfe3
      Antonio Quartulli 提交于
      This attribute can be used to set and read the value and the
      mask of the skb mark which will be used to classify the
      source non-mesh client as ISOLATED. In this way a client can
      be advertised as such and the mark can potentially be
      restored at the receiving node before delivering the skb.
      
      This can be helpful for creating network wide netfilter
      policies.
      
      This sysfs file expects a string of the shape "$mark/$mask".
      Where $mark has to be a 32-bit number in any base, while
      $mask must be a 32bit mask expressed in hex base. Only bits
      in $mark covered by the bitmask are really stored.
      Signed-off-by: NAntonio Quartulli <antonio@open-mesh.com>
      Signed-off-by: NMarek Lindner <mareklindner@neomailbox.ch>
      c42edfe3
  8. 06 1月, 2014 1 次提交
  9. 01 1月, 2014 2 次提交
    • I
      rbd: add support for single-major device number allocation scheme · 9b60e70b
      Ilya Dryomov 提交于
      Currently each rbd device is allocated its own major number, which
      leads to a hard limit of 230-250 images mapped at once.  This commit
      adds support for a new single-major device number allocation scheme,
      which is hidden behind a new single_major boolean module parameter and
      is disabled by default for backwards compatibility reasons.  (Old
      userspace cannot correctly unmap images mapped under single-major
      scheme and would essentially just unmap a random image, if that.)
      
      $ rbd showmapped
      id pool image snap device
      0  rbd  b100  -    /dev/rbd0
      1  rbd  b101  -    /dev/rbd1
      2  rbd  b102  -    /dev/rbd2
      3  rbd  b103  -    /dev/rbd3
      
      Old scheme (modprobe rbd):
      
      $ ls -l /dev/rbd*
      brw-rw---- 1 root disk 253, 0 Dec 10 12:24 /dev/rbd0
      brw-rw---- 1 root disk 252, 0 Dec 10 12:28 /dev/rbd1
      brw-rw---- 1 root disk 252, 1 Dec 10 12:28 /dev/rbd1p1
      brw-rw---- 1 root disk 252, 2 Dec 10 12:28 /dev/rbd1p2
      brw-rw---- 1 root disk 252, 3 Dec 10 12:28 /dev/rbd1p3
      brw-rw---- 1 root disk 251, 0 Dec 10 12:28 /dev/rbd2
      brw-rw---- 1 root disk 251, 1 Dec 10 12:28 /dev/rbd2p1
      brw-rw---- 1 root disk 250, 0 Dec 10 12:24 /dev/rbd3
      
      New scheme (modprobe rbd single_major=Y):
      
      $ ls -l /dev/rbd*
      brw-rw---- 1 root disk 253,   0 Dec 10 12:30 /dev/rbd0
      brw-rw---- 1 root disk 253, 256 Dec 10 12:30 /dev/rbd1
      brw-rw---- 1 root disk 253, 257 Dec 10 12:30 /dev/rbd1p1
      brw-rw---- 1 root disk 253, 258 Dec 10 12:30 /dev/rbd1p2
      brw-rw---- 1 root disk 253, 259 Dec 10 12:30 /dev/rbd1p3
      brw-rw---- 1 root disk 253, 512 Dec 10 12:30 /dev/rbd2
      brw-rw---- 1 root disk 253, 513 Dec 10 12:30 /dev/rbd2p1
      brw-rw---- 1 root disk 253, 768 Dec 10 12:30 /dev/rbd3
      
      (major 253 was assigned dynamically at module load time)
      
      The new limit is 4096 images mapped at once, and it comes from the fact
      that, as before, 256 minor numbers are reserved for each mapping.
      (A follow-up commit changes the number of minors reserved and the way
      we deal with partitions over that number.)
      
      If single_major is set to true, two new sysfs interfaces show up:
      /sys/bus/rbd/{add,remove}_single_major.  These are to be used instead
      of /sys/bus/rbd/{add,remove}, which are disabled for backwards
      compatibility reasons outlined above.
      Signed-off-by: NIlya Dryomov <ilya.dryomov@inktank.com>
      Reviewed-by: NAlex Elder <elder@linaro.org>
      Reviewed-by: NJosh Durgin <josh.durgin@inktank.com>
      9b60e70b
    • I
      rbd: add 'minor' sysfs rbd device attribute · dd82fff1
      Ilya Dryomov 提交于
      Introduce /sys/bus/rbd/devices/<id>/minor sysfs attribute for exporting
      rbd whole disk minor numbers.  This is a step towards single-major
      device number allocation scheme, but also a good thing on its own.
      Signed-off-by: NIlya Dryomov <ilya.dryomov@inktank.com>
      Reviewed-by: NAlex Elder <elder@linaro.org>
      Reviewed-by: NJosh Durgin <josh.durgin@inktank.com>
      dd82fff1
  10. 29 12月, 2013 1 次提交
    • D
      x86: Export x86 boot_params to sysfs · 5039e316
      Dave Young 提交于
      kexec-tools use boot_params for getting the 1st kernel hardware_subarch,
      the kexec kernel EFI runtime support also needs to read the old efi_info
      from boot_params. Currently it exists in debugfs which is not a good
      place for such infomation. Per HPA, we should avoid "sploit debugfs".
      
      In this patch /sys/kernel/boot_params are exported, also the setup_data is
      exported as a subdirectory. kexec-tools is using debugfs for hardware_subarch
      for a long time now so we're not removing it yet.
      
      Structure is like below:
      
      /sys/kernel/boot_params
      |__ data                /* boot_params in binary*/
      |__ setup_data
      |   |__ 0               /* the first setup_data node */
      |   |   |__ data        /* setup_data node 0 in binary*/
      |   |   |__ type        /* setup_data type of setup_data node 0, hex string */
      [snip]
      |__ version             /* boot protocal version (in hex, "0x" prefixed)*/
      Signed-off-by: NDave Young <dyoung@redhat.com>
      Acked-by: NBorislav Petkov <bp@suse.de>
      Tested-by: NToshi Kani <toshi.kani@hp.com>
      Signed-off-by: NMatt Fleming <matt.fleming@intel.com>
      5039e316
  11. 21 12月, 2013 2 次提交
  12. 20 12月, 2013 1 次提交
  13. 19 12月, 2013 2 次提交
  14. 13 12月, 2013 1 次提交
  15. 07 12月, 2013 1 次提交
  16. 04 12月, 2013 1 次提交
  17. 27 11月, 2013 2 次提交
  18. 13 11月, 2013 1 次提交
  19. 09 11月, 2013 5 次提交
  20. 30 10月, 2013 2 次提交
  21. 28 10月, 2013 1 次提交
  22. 19 10月, 2013 4 次提交
  23. 17 10月, 2013 1 次提交
  24. 12 10月, 2013 1 次提交
  25. 11 10月, 2013 1 次提交
  26. 10 10月, 2013 2 次提交