1. 14 7月, 2015 1 次提交
    • J
      selinux: extended permissions for ioctls · fa1aa143
      Jeff Vander Stoep 提交于
      Add extended permissions logic to selinux. Extended permissions
      provides additional permissions in 256 bit increments. Extend the
      generic ioctl permission check to use the extended permissions for
      per-command filtering. Source/target/class sets including the ioctl
      permission may additionally include a set of commands. Example:
      
      allowxperm <source> <target>:<class> ioctl unpriv_app_socket_cmds
      auditallowxperm <source> <target>:<class> ioctl priv_gpu_cmds
      
      Where unpriv_app_socket_cmds and priv_gpu_cmds are macros
      representing commonly granted sets of ioctl commands.
      
      When ioctl commands are omitted only the permissions are checked.
      This feature is intended to provide finer granularity for the ioctl
      permission that may be too imprecise. For example, the same driver
      may use ioctls to provide important and benign functionality such as
      driver version or socket type as well as dangerous capabilities such
      as debugging features, read/write/execute to physical memory or
      access to sensitive data. Per-command filtering provides a mechanism
      to reduce the attack surface of the kernel, and limit applications
      to the subset of commands required.
      
      The format of the policy binary has been modified to include ioctl
      commands, and the policy version number has been incremented to
      POLICYDB_VERSION_XPERMS_IOCTL=30 to account for the format
      change.
      
      The extended permissions logic is deliberately generic to allow
      components to be reused e.g. netlink filters
      Signed-off-by: NJeff Vander Stoep <jeffv@google.com>
      Acked-by: NNick Kralevich <nnk@google.com>
      Signed-off-by: NPaul Moore <pmoore@redhat.com>
      fa1aa143
  2. 07 4月, 2015 2 次提交
    • J
      selinux: Use a better hash function for avtab · 33ebc193
      John Brooks 提交于
      This function, based on murmurhash3, has much better distribution than
      the original. Using the current default of 2048 buckets, there are many
      fewer collisions:
      
      Before:
      101421 entries and 2048/2048 buckets used, longest chain length 374
      After:
      101421 entries and 2048/2048 buckets used, longest chain length 81
      
      The difference becomes much more significant when buckets are increased.
      A naive attempt to expand the current function to larger outputs doesn't
      yield any significant improvement; so this function is a prerequisite
      for increasing the bucket size.
      
      sds:  Adapted from the original patches for libsepol to the kernel.
      Signed-off-by: NJohn Brooks <john.brooks@jolla.com>
      Signed-off-by: NStephen Smalley <sds@tycho.nsa.gov>
      Signed-off-by: NPaul Moore <pmoore@redhat.com>
      33ebc193
    • S
      selinux: convert avtab hash table to flex_array · ba39db6e
      Stephen Smalley 提交于
      Previously we shrank the avtab max hash buckets to avoid
      high order memory allocations, but this causes avtab lookups to
      degenerate to very long linear searches for the Fedora policy. Convert to
      using a flex_array instead so that we can increase the buckets
      without such limitations.
      
      This change does not alter the max hash buckets; that is left to a
      separate follow-on change.
      Signed-off-by: NStephen Smalley <sds@tycho.nsa.gov>
      Signed-off-by: NPaul Moore <pmoore@redhat.com>
      ba39db6e
  3. 21 10月, 2010 2 次提交
  4. 02 8月, 2010 1 次提交
    • D
      selinux: cleanup return codes in avtab_read_item() · 9e0bd4cb
      Dan Carpenter 提交于
      The avtab_read_item() function tends to return -1 as a default error
      code which is wrong (-1 means -EPERM).  I modified it to return
      appropriate error codes which is -EINVAL or the error code from
      next_entry() or insertf().
      
      next_entry() returns -EINVAL.
      insertf() is a function pointer to either avtab_insert() or
      cond_insertf().
      avtab_insert() returns -EINVAL, -ENOMEM, and -EEXIST.
      cond_insertf() currently returns -1, but I will fix it in a later patch.
      
      There is code in avtab_read() which translates the -1 returns from
      avtab_read_item() to -EINVAL. The translation is no longer needed, so I
      removed it.
      Signed-off-by: NDan Carpenter <error27@gmail.com>
      Acked-by: NStephen D. Smalley <sds@tycho.nsa.gov>
      Signed-off-by: NJames Morris <jmorris@namei.org>
      9e0bd4cb
  5. 15 8月, 2008 1 次提交
  6. 05 8月, 2008 1 次提交
  7. 14 7月, 2008 1 次提交
  8. 21 4月, 2008 2 次提交
  9. 18 4月, 2008 1 次提交
  10. 25 1月, 2008 1 次提交
  11. 08 11月, 2007 1 次提交
  12. 17 10月, 2007 1 次提交
  13. 20 7月, 2007 1 次提交
    • P
      mm: Remove slab destructors from kmem_cache_create(). · 20c2df83
      Paul Mundt 提交于
      Slab destructors were no longer supported after Christoph's
      c59def9f change. They've been
      BUGs for both slab and slub, and slob never supported them
      either.
      
      This rips out support for the dtor pointer from kmem_cache_create()
      completely and fixes up every single callsite in the kernel (there were
      about 224, not including the slab allocator definitions themselves,
      or the documentation references).
      Signed-off-by: NPaul Mundt <lethal@linux-sh.org>
      20c2df83
  14. 27 2月, 2007 1 次提交
    • E
      Reassign printk levels in selinux kernel code · fadcdb45
      Eric Paris 提交于
      Below is a patch which demotes many printk lines to KERN_DEBUG from
      KERN_INFO.  It should help stop the spamming of logs with messages in
      which users are not interested nor is there any action that users should
      take.  It also promotes some KERN_INFO to KERN_ERR such as when there
      are improper attempts to register/unregister security modules.
      
      A similar patch was discussed a while back on list:
      http://marc.theaimsgroup.com/?t=116656343500003&r=1&w=2
      This patch addresses almost all of the issues raised.  I believe the
      only advice not taken was in the demoting of messages related to
      undefined permissions and classes.
      Signed-off-by: NEric Paris <eparis@redhat.com>
      Acked-by: NStephen Smalley <sds@tycho.nsa.gov>
      
       security/selinux/hooks.c       |   20 ++++++++++----------
       security/selinux/ss/avtab.c    |    2 +-
       security/selinux/ss/policydb.c |    6 +++---
       security/selinux/ss/sidtab.c   |    2 +-
       4 files changed, 15 insertions(+), 15 deletions(-)
      Signed-off-by: NJames Morris <jmorris@namei.org>
      fadcdb45
  15. 12 2月, 2007 1 次提交
  16. 08 12月, 2006 2 次提交
  17. 07 1月, 2006 1 次提交
  18. 05 9月, 2005 2 次提交
  19. 17 4月, 2005 1 次提交
    • L
      Linux-2.6.12-rc2 · 1da177e4
      Linus Torvalds 提交于
      Initial git repository build. I'm not bothering with the full history,
      even though we have it. We can create a separate "historical" git
      archive of that later if we want to, and in the meantime it's about
      3.2GB when imported into git - space that would just make the early
      git days unnecessarily complicated, when we don't have a lot of good
      infrastructure for it.
      
      Let it rip!
      1da177e4