1. 18 4月, 2008 6 次提交
  2. 08 4月, 2008 1 次提交
  3. 06 2月, 2008 1 次提交
  4. 02 2月, 2008 2 次提交
  5. 01 2月, 2008 1 次提交
  6. 30 1月, 2008 5 次提交
  7. 26 1月, 2008 1 次提交
  8. 22 1月, 2008 1 次提交
  9. 17 10月, 2007 2 次提交
    • K
      SELinux: improve performance when AVC misses. · 9fe79ad1
      KaiGai Kohei 提交于
      * We add ebitmap_for_each_positive_bit() which enables to walk on
        any positive bit on the given ebitmap, to improve its performance
        using common bit-operations defined in linux/bitops.h.
        In the previous version, this logic was implemented using a combination
        of ebitmap_for_each_bit() and ebitmap_node_get_bit(), but is was worse
        in performance aspect.
        This logic is most frequestly used to compute a new AVC entry,
        so this patch can improve SELinux performance when AVC misses are happen.
      * struct ebitmap_node is redefined as an array of "unsigned long", to get
        suitable for using find_next_bit() which is fasted than iteration of
        shift and logical operation, and to maximize memory usage allocated
        from general purpose slab.
      * Any ebitmap_for_each_bit() are repleced by the new implementation
        in ss/service.c and ss/mls.c. Some of related implementation are
        changed, however, there is no incompatibility with the previous
        version.
      * The width of any new line are less or equal than 80-chars.
      
      The following benchmark shows the effect of this patch, when we
      access many files which have different security context one after
      another. The number is more than /selinux/avc/cache_threshold, so
      any access always causes AVC misses.
      
            selinux-2.6      selinux-2.6-ebitmap
      AVG:   22.763 [s]          8.750 [s]
      STD:    0.265              0.019
      ------------------------------------------
      1st:   22.558 [s]          8.786 [s]
      2nd:   22.458 [s]          8.750 [s]
      3rd:   22.478 [s]          8.754 [s]
      4th:   22.724 [s]          8.745 [s]
      5th:   22.918 [s]          8.748 [s]
      6th:   22.905 [s]          8.764 [s]
      7th:   23.238 [s]          8.726 [s]
      8th:   22.822 [s]          8.729 [s]
      Signed-off-by: NKaiGai Kohei <kaigai@ak.jp.nec.com>
      Acked-by: NStephen Smalley <sds@tycho.nsa.gov>
      Signed-off-by: NJames Morris <jmorris@namei.org>
      9fe79ad1
    • E
      SELinux: policy selectable handling of unknown classes and perms · 3f12070e
      Eric Paris 提交于
      Allow policy to select, in much the same way as it selects MLS support, how
      the kernel should handle access decisions which contain either unknown
      classes or unknown permissions in known classes.  The three choices for the
      policy flags are
      
      0 - Deny unknown security access. (default)
      2 - reject loading policy if it does not contain all definitions
      4 - allow unknown security access
      
      The policy's choice is exported through 2 booleans in
      selinuxfs.  /selinux/deny_unknown and /selinux/reject_unknown.
      Signed-off-by: NEric Paris <eparis@redhat.com>
      Acked-by: NStephen Smalley <sds@tycho.nsa.gov>
      Signed-off-by: NJames Morris <jmorris@namei.org>
      3f12070e
  10. 16 8月, 2007 1 次提交
  11. 01 8月, 2007 1 次提交
  12. 23 7月, 2007 1 次提交
  13. 12 7月, 2007 2 次提交
  14. 26 4月, 2007 6 次提交
  15. 27 2月, 2007 1 次提交
  16. 27 1月, 2007 1 次提交
  17. 24 1月, 2007 1 次提交
  18. 09 1月, 2007 2 次提交
  19. 03 1月, 2007 1 次提交
  20. 03 12月, 2006 3 次提交
    • P
      NetLabel: convert to an extensibile/sparse category bitmap · 02752760
      Paul Moore 提交于
      The original NetLabel category bitmap was a straight char bitmap which worked
      fine for the initial release as it only supported 240 bits due to limitations
      in the CIPSO restricted bitmap tag (tag type 0x01).  This patch converts that
      straight char bitmap into an extensibile/sparse bitmap in order to lay the
      foundation for other CIPSO tag types and protocols.
      
      This patch also has a nice side effect in that all of the security attributes
      passed by NetLabel into the LSM are now in a format which is in the host's
      native byte/bit ordering which makes the LSM specific code much simpler; look
      at the changes in security/selinux/ss/ebitmap.c as an example.
      Signed-off-by: NPaul Moore <paul.moore@hp.com>
      Signed-off-by: NJames Morris <jmorris@namei.org>
      02752760
    • P
      SELinux: peer secid consolidation for external network labeling · 3de4bab5
      Paul Moore 提交于
      Now that labeled IPsec makes use of the peer_sid field in the
      sk_security_struct we can remove a lot of the special cases between labeled
      IPsec and NetLabel.  In addition, create a new function,
      security_skb_extlbl_sid(), which we can use in several places to get the
      security context of the packet's external label which allows us to further
      simplify the code in a few places.
      Signed-off-by: NPaul Moore <paul.moore@hp.com>
      Signed-off-by: NJames Morris <jmorris@namei.org>
      3de4bab5
    • P
      NetLabel: SELinux cleanups · 9f2ad665
      Paul Moore 提交于
      This patch does a lot of cleanup in the SELinux NetLabel support code.  A
      summary of the changes include:
      
      * Use RCU locking for the NetLabel state variable in the skk_security_struct
        instead of using the inode_security_struct mutex.
      * Remove unnecessary parameters in selinux_netlbl_socket_post_create().
      * Rename selinux_netlbl_sk_clone_security() to
        selinux_netlbl_sk_security_clone() to better fit the other NetLabel
        sk_security functions.
      * Improvements to selinux_netlbl_inode_permission() to help reduce the cost of
        the common case.
      Signed-off-by: NPaul Moore <paul.moore@hp.com>
      Signed-off-by: NJames Morris <jmorris@namei.org>
      9f2ad665