1. 12 Jul, 2011 8 commits
  2. 11 Jul, 2011 5 commits
  3. 07 Jul, 2011 1 commit
  4. 30 Jun, 2011 7 commits
  5. 29 Jun, 2011 11 commits
  6. 28 Jun, 2011 8 commits
    • Tetsuo Handa's avatar
      TOMOYO: Make several options configurable. · 0e4ae0e0
      Tetsuo Handa authored
      To be able to start using enforcing mode from the early stage of boot sequence,
      this patch adds support for activating access control without calling external
      policy loader program. This will be useful for systems where operations which
      can lead to the hijacking of the boot sequence are needed before loading the
      policy. For example, you can activate immediately after loading the fixed part
      of policy which will allow only operations needed for mounting a partition
      which contains the variant part of policy and verifying (e.g. running GPG
      check) and loading the variant part of policy. Since you can start using
      enforcing mode from the beginning, you can reduce the possibility of hijacking
      the boot sequence.
      
      This patch makes several variables configurable on build time. This patch also
      adds TOMOYO_loader= and TOMOYO_trigger= kernel command line option to boot the
      same kernel in two different init systems (BSD-style init and systemd).
      Signed-off-by: default avatarTetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
      Signed-off-by: default avatarJames Morris <jmorris@namei.org>
      0e4ae0e0
    • Tetsuo Handa's avatar
      TOMOYO: Add built-in policy support. · efe836ab
      Tetsuo Handa authored
      To be able to start using enforcing mode from the early stage of boot sequence,
      this patch adds support for built-in policy configuration (and next patch adds
      support for activating access control without calling external policy loader
      program).
      Signed-off-by: default avatarTetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
      Signed-off-by: default avatarJames Morris <jmorris@namei.org>
      efe836ab
    • Tetsuo Handa's avatar
      TOMOYO: Rename meminfo to stat and show more statistics. · b22b8b9f
      Tetsuo Handa authored
      Show statistics such as last policy update time and last policy violation time
      in addition to memory usage.
      Signed-off-by: default avatarTetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
      Signed-off-by: default avatarJames Morris <jmorris@namei.org>
      b22b8b9f
    • Tetsuo Handa's avatar
      TOMOYO: Cleanup part 4. · 2c47ab93
      Tetsuo Handa authored
      Gather string constants to one file in order to make the object size smaller.
      Use unsigned type where appropriate.
      read()/write() returns ssize_t.
      Signed-off-by: default avatarTetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
      Signed-off-by: default avatarJames Morris <jmorris@namei.org>
      2c47ab93
    • Tetsuo Handa's avatar
      TOMOYO: Fix lockdep warning. · 2e503bbb
      Tetsuo Handa authored
      Currently TOMOYO holds SRCU lock upon open() and releases it upon close()
      because list elements stored in the "struct tomoyo_io_buffer" instances are
      accessed until close() is called. However, such SRCU usage causes lockdep to
      complain about leaving the kernel with SRCU lock held.
      
      This patch solves the warning by holding/releasing SRCU upon each
      read()/write(). This patch is doing something similar to calling kfree()
      without calling synchronize_srcu(), by selectively deferring kfree() by keeping
      track of the "struct tomoyo_io_buffer" instances.
      Signed-off-by: default avatarTetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
      Signed-off-by: default avatarJames Morris <jmorris@namei.org>
      2e503bbb
    • Tetsuo Handa's avatar
      TOMOYO: Change pathname for non-rename()able filesystems. · 5625f2e3
      Tetsuo Handa authored
      TOMOYO wants to use /proc/self/ rather than /proc/$PID/ if $PID matches current
      thread's process ID in order to prevent current thread from accessing other
      process's information unless needed.
      
      But since procfs can be mounted on various locations (e.g. /proc/ /proc2/ /p/
      /tmp/foo/100/p/ ), TOMOYO cannot tell that whether the numeric part in the
      string returned by __d_path() represents process ID or not.
      
      Therefore, to be able to convert from $PID to self no matter where procfs is
      mounted, this patch changes pathname representations for filesystems which do
      not support rename() operation (e.g. proc, sysfs, securityfs).
      
      Examples:
        /proc/self/mounts => proc:/self/mounts
        /sys/kernel/security/ => sys:/kernel/security/
        /dev/pts/0 => devpts:/0
      Signed-off-by: default avatarTetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
      Signed-off-by: default avatarJames Morris <jmorris@namei.org>
      5625f2e3
    • Tetsuo Handa's avatar
      TOMOYO: Add policy namespace support. · bd03a3e4
      Tetsuo Handa authored
      Mauras Olivier reported that it is difficult to use TOMOYO in LXC environments,
      for TOMOYO cannot distinguish between environments outside the container and
      environments inside the container since LXC environments are created using
      pivot_root(). To address this problem, this patch introduces policy namespace.
      
      Each policy namespace has its own set of domain policy, exception policy and
      profiles, which are all independent of other namespaces. This independency
      allows users to develop policy without worrying interference among namespaces.
      Signed-off-by: default avatarTetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
      Signed-off-by: default avatarJames Morris <jmorris@namei.org>
      bd03a3e4
    • Tetsuo Handa's avatar
      TOMOYO: Add ACL group support. · 32997144
      Tetsuo Handa authored
      ACL group allows administrator to globally grant not only "file read"
      permission but also other permissions.
      Signed-off-by: default avatarTetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
      Signed-off-by: default avatarJames Morris <jmorris@namei.org>
      32997144