1. 08 4月, 2008 1 次提交
  2. 06 2月, 2008 1 次提交
  3. 02 2月, 2008 2 次提交
  4. 01 2月, 2008 1 次提交
  5. 30 1月, 2008 5 次提交
  6. 26 1月, 2008 1 次提交
  7. 22 1月, 2008 1 次提交
  8. 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
  9. 16 8月, 2007 1 次提交
  10. 01 8月, 2007 1 次提交
  11. 23 7月, 2007 1 次提交
  12. 12 7月, 2007 2 次提交
  13. 26 4月, 2007 6 次提交
  14. 27 2月, 2007 1 次提交
  15. 27 1月, 2007 1 次提交
  16. 24 1月, 2007 1 次提交
  17. 09 1月, 2007 2 次提交
  18. 03 1月, 2007 1 次提交
  19. 03 12月, 2006 4 次提交
    • 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
    • P
      NetLabel: make netlbl_lsm_secattr struct easier/quicker to understand · 701a90ba
      Paul Moore 提交于
      The existing netlbl_lsm_secattr struct required the LSM to check all of the
      fields to determine if any security attributes were present resulting in a lot
      of work in the common case of no attributes.  This patch adds a 'flags' field
      which is used to indicate which attributes are present in the structure; this
      should allow the LSM to do a quick comparison to determine if the structure
      holds any security attributes.
      
      Example:
      
       if (netlbl_lsm_secattr->flags)
      	/* security attributes present */
       else
      	/* NO security attributes present */
      Signed-off-by: NPaul Moore <paul.moore@hp.com>
      Signed-off-by: NJames Morris <jmorris@namei.org>
      701a90ba
  20. 29 11月, 2006 2 次提交
    • C
      SELinux: validate kernel object classes and permissions · b94c7e67
      Chad Sellers 提交于
      This is a new object class and permission validation scheme that validates
      against the defined kernel headers. This scheme allows extra classes
      and permissions that do not conflict with the kernel definitions to be
      added to the policy. This validation is now done for all policy loads,
      not just subsequent loads after the first policy load.
      
      The implementation walks the three structrures containing the defined
      object class and permission values and ensures their values are the
      same in the policy being loaded. This includes verifying the object
      classes themselves, the permissions they contain, and the permissions
      they inherit from commons. Classes or permissions that are present in the
      kernel but missing from the policy cause a warning (printed to KERN_INFO)
      to be printed, but do not stop the policy from loading, emulating current
      behavior. Any other inconsistencies cause the load to fail.
      Signed-off-by: NChad Sellers <csellers@tresys.com>
      Acked-by: NStephen Smalley <sds@tycho.nsa.gov>
      Signed-off-by: NJames Morris <jmorris@namei.org>
      b94c7e67
    • C
      SELinux: remove current object class and permission validation mechanism · 5a64d443
      Chad Sellers 提交于
      Removes the current SELinux object class and permission validation code,
      as the current code makes it impossible to change or remove object classes
      and permissions on a running system. Additionally, the current code does
      not actually validate that the classes and permissions are correct, but
      instead merely validates that they do not change between policy reloads.
      Signed-off-by: NChad Sellers <csellers@tresys.com>
      Acked-by: NStephen Smalley <sds@tycho.nsa.gov>
      Signed-off-by: NJames Morris <jmorris@namei.org>
      5a64d443
  21. 31 10月, 2006 1 次提交
    • P
      [NetLabel]: protect the CIPSOv4 socket option from setsockopt() · f8687afe
      Paul Moore 提交于
      This patch makes two changes to protect applications from either removing or
      tampering with the CIPSOv4 IP option on a socket.  The first is the requirement
      that applications have the CAP_NET_RAW capability to set an IPOPT_CIPSO option
      on a socket; this prevents untrusted applications from setting their own
      CIPSOv4 security attributes on the packets they send.  The second change is to
      SELinux and it prevents applications from setting any IPv4 options when there
      is an IPOPT_CIPSO option already present on the socket; this prevents
      applications from removing CIPSOv4 security attributes from the packets they
      send.
      Signed-off-by: NPaul Moore <paul.moore@hp.com>
      Signed-off-by: NJames Morris <jmorris@namei.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      f8687afe
  22. 16 10月, 2006 1 次提交
  23. 12 10月, 2006 1 次提交