1. 08 9月, 2012 1 次提交
    • M
      ima: integrity appraisal extension · 2fe5d6de
      Mimi Zohar 提交于
      IMA currently maintains an integrity measurement list used to assert the
      integrity of the running system to a third party.  The IMA-appraisal
      extension adds local integrity validation and enforcement of the
      measurement against a "good" value stored as an extended attribute
      'security.ima'.  The initial methods for validating 'security.ima' are
      hashed based, which provides file data integrity, and digital signature
      based, which in addition to providing file data integrity, provides
      authenticity.
      
      This patch creates and maintains the 'security.ima' xattr, containing
      the file data hash measurement.  Protection of the xattr is provided by
      EVM, if enabled and configured.
      
      Based on policy, IMA calls evm_verifyxattr() to verify a file's metadata
      integrity and, assuming success, compares the file's current hash value
      with the one stored as an extended attribute in 'security.ima'.
      
      Changelov v4:
      - changed iint cache flags to hex values
      
      Changelog v3:
      - change appraisal default for filesystems without xattr support to fail
      
      Changelog v2:
      - fix audit msg 'res' value
      - removed unused 'ima_appraise=' values
      
      Changelog v1:
      - removed unused iint mutex (Dmitry Kasatkin)
      - setattr hook must not reset appraised (Dmitry Kasatkin)
      - evm_verifyxattr() now differentiates between no 'security.evm' xattr
        (INTEGRITY_NOLABEL) and no EVM 'protected' xattrs included in the
        'security.evm' (INTEGRITY_NOXATTRS).
      - replace hash_status with ima_status (Dmitry Kasatkin)
      - re-initialize slab element ima_status on free (Dmitry Kasatkin)
      - include 'security.ima' in EVM if CONFIG_IMA_APPRAISE, not CONFIG_IMA
      - merged half "ima: ima_must_appraise_or_measure API change" (Dmitry Kasatkin)
      - removed unnecessary error variable in process_measurement() (Dmitry Kasatkin)
      - use ima_inode_post_setattr() stub function, if IMA_APPRAISE not configured
        (moved ima_inode_post_setattr() to ima_appraise.c)
      - make sure ima_collect_measurement() can read file
      
      Changelog:
      - add 'iint' to evm_verifyxattr() call (Dimitry Kasatkin)
      - fix the race condition between chmod, which takes the i_mutex and then
        iint->mutex, and ima_file_free() and process_measurement(), which take
        the locks in the reverse order, by eliminating iint->mutex. (Dmitry Kasatkin)
      - cleanup of ima_appraise_measurement() (Dmitry Kasatkin)
      - changes as a result of the iint not allocated for all regular files, but
        only for those measured/appraised.
      - don't try to appraise new/empty files
      - expanded ima_appraisal description in ima/Kconfig
      - IMA appraise definitions required even if IMA_APPRAISE not enabled
      - add return value to ima_must_appraise() stub
      - unconditionally set status = INTEGRITY_PASS *after* testing status,
        not before.  (Found by Joe Perches)
      Signed-off-by: NMimi Zohar <zohar@us.ibm.com>
      Signed-off-by: NDmitry Kasatkin <dmitry.kasatkin@intel.com>
      2fe5d6de
  2. 23 8月, 2012 1 次提交
  3. 10 8月, 2012 1 次提交
  4. 04 8月, 2012 2 次提交
  5. 02 8月, 2012 1 次提交
  6. 01 8月, 2012 8 次提交
  7. 31 7月, 2012 23 次提交
  8. 30 7月, 2012 3 次提交
    • M
      common: DMA-mapping: add DMA_ATTR_SKIP_CPU_SYNC attribute · bdf5e487
      Marek Szyprowski 提交于
      This patch adds DMA_ATTR_SKIP_CPU_SYNC attribute to the DMA-mapping
      subsystem.
      
      By default dma_map_{single,page,sg} functions family transfer a given
      buffer from CPU domain to device domain. Some advanced use cases might
      require sharing a buffer between more than one device. This requires
      having a mapping created separately for each device and is usually
      performed by calling dma_map_{single,page,sg} function more than once
      for the given buffer with device pointer to each device taking part in
      the buffer sharing. The first call transfers a buffer from 'CPU' domain
      to 'device' domain, what synchronizes CPU caches for the given region
      (usually it means that the cache has been flushed or invalidated
      depending on the dma direction). However, next calls to
      dma_map_{single,page,sg}() for other devices will perform exactly the
      same sychronization operation on the CPU cache. CPU cache sychronization
      might be a time consuming operation, especially if the buffers are
      large, so it is highly recommended to avoid it if possible.
      DMA_ATTR_SKIP_CPU_SYNC allows platform code to skip synchronization of
      the CPU cache for the given buffer assuming that it has been already
      transferred to 'device' domain. This attribute can be also used for
      dma_unmap_{single,page,sg} functions family to force buffer to stay in
      device domain after releasing a mapping for it. Use this attribute with
      care!
      Signed-off-by: NMarek Szyprowski <m.szyprowski@samsung.com>
      Reviewed-by: NKyungmin Park <kyungmin.park@samsung.com>
      bdf5e487
    • M
      common: DMA-mapping: add DMA_ATTR_NO_KERNEL_MAPPING attribute · d5724f17
      Marek Szyprowski 提交于
      This patch adds DMA_ATTR_NO_KERNEL_MAPPING attribute which lets the
      platform to avoid creating a kernel virtual mapping for the allocated
      buffer. On some architectures creating such mapping is non-trivial task
      and consumes very limited resources (like kernel virtual address space
      or dma consistent address space). Buffers allocated with this attribute
      can be only passed to user space by calling dma_mmap_attrs().
      Signed-off-by: NMarek Szyprowski <m.szyprowski@samsung.com>
      Reviewed-by: NKyungmin Park <kyungmin.park@samsung.com>
      Reviewed-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      d5724f17
    • M
      ARM: dma-mapping: remove custom consistent dma region · e9da6e99
      Marek Szyprowski 提交于
      This patch changes dma-mapping subsystem to use generic vmalloc areas
      for all consistent dma allocations. This increases the total size limit
      of the consistent allocations and removes platform hacks and a lot of
      duplicated code.
      
      Atomic allocations are served from special pool preallocated on boot,
      because vmalloc areas cannot be reliably created in atomic context.
      Signed-off-by: NMarek Szyprowski <m.szyprowski@samsung.com>
      Reviewed-by: NKyungmin Park <kyungmin.park@samsung.com>
      Reviewed-by: NMinchan Kim <minchan@kernel.org>
      e9da6e99