1. 23 Feb, 2010 1 commit
    • wzt.wzt@gmail.com's avatar
      Security: add static to security_ops and default_security_ops variable · 189b3b1c
      wzt.wzt@gmail.com authored
      Enhance the security framework to support resetting the active security
      module. This eliminates the need for direct use of the security_ops and
      default_security_ops variables outside of security.c, so make security_ops
      and default_security_ops static. Also remove the secondary_ops variable as
      a cleanup since there is no use for that. secondary_ops was originally used by
      SELinux to call the "secondary" security module (capability or dummy),
      but that was replaced by direct calls to capability and the only
      remaining use is to save and restore the original security ops pointer
      value if SELinux is disabled by early userspace based on /etc/selinux/config.
      Further, if we support this directly in the security framework, then we can
      just use &default_security_ops for this purpose since that is now available.
      Signed-off-by: default avatarZhitong Wang <zhitong.wangzt@alibaba-inc.com>
      Acked-by: default avatarStephen Smalley <sds@tycho.nsa.gov>
      Signed-off-by: default avatarJames Morris <jmorris@namei.org>
      189b3b1c
  2. 21 Feb, 2010 1 commit
  3. 17 Feb, 2010 1 commit
  4. 16 Feb, 2010 3 commits
  5. 15 Feb, 2010 1 commit
  6. 14 Feb, 2010 4 commits
  7. 11 Feb, 2010 1 commit
  8. 08 Feb, 2010 2 commits
    • Xiaotian Feng's avatar
      selinux: fix memory leak in sel_make_bools · 8007f102
      Xiaotian Feng authored
      In sel_make_bools, kernel allocates memory for bool_pending_names[i]
      with security_get_bools. So if we just free bool_pending_names, those
      memories for bool_pending_names[i] will be leaked.
      
      This patch resolves dozens of following kmemleak report after resuming
      from suspend:
      unreferenced object 0xffff88022e4c7380 (size 32):
        comm "init", pid 1, jiffies 4294677173
        backtrace:
          [<ffffffff810f76b5>] create_object+0x1a2/0x2a9
          [<ffffffff810f78bb>] kmemleak_alloc+0x26/0x4b
          [<ffffffff810ef3eb>] __kmalloc+0x18f/0x1b8
          [<ffffffff811cd511>] security_get_bools+0xd7/0x16f
          [<ffffffff811c48c0>] sel_write_load+0x12e/0x62b
          [<ffffffff810f9a39>] vfs_write+0xae/0x10b
          [<ffffffff810f9b56>] sys_write+0x4a/0x6e
          [<ffffffff81011b82>] system_call_fastpath+0x16/0x1b
          [<ffffffffffffffff>] 0xffffffffffffffff
      Signed-off-by: default avatarXiaotian Feng <dfeng@redhat.com>
      Signed-off-by: default avatarJames Morris <jmorris@namei.org>
      8007f102
    • Tetsuo Handa's avatar
      TOMOYO: Extract bitfield · ea13ddba
      Tetsuo Handa authored
      Since list elements are rounded up to kmalloc() size rather than sizeof(int),
      saving one byte by using bitfields is no longer helpful.
      Signed-off-by: default avatarTetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
      Acked-by: default avatarSerge Hallyn <serue@us.ibm.com>
      Signed-off-by: default avatarJames Morris <jmorris@namei.org>
      ea13ddba
  9. 05 Feb, 2010 1 commit
  10. 04 Feb, 2010 2 commits
  11. 03 Feb, 2010 2 commits
  12. 02 Feb, 2010 1 commit
  13. 26 Jan, 2010 1 commit
  14. 24 Jan, 2010 2 commits
  15. 17 Jan, 2010 3 commits
  16. 16 Jan, 2010 14 commits