1. 24 Apr, 2008 2 commits
    • Venki Pallipadi's avatar
      devmem: add range_is_allowed() check to mmap of /dev/mem · e2beb3ea
      Venki Pallipadi authored
      Earlier patch that introduced CONFIG_NONPROMISC_DEVMEM, did the
      range_is_allowed() check only for read and write. Add range_is_allowed()
      check to mmap of /dev/mem as well.
      
      Changes the paramaters of range_is_allowed() to pfn and size to handle
      more than 32 bits of physical address on 32 bit arch cleanly.
      Signed-off-by: default avatarVenkatesh Pallipadi <venkatesh.pallipadi@intel.com>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      e2beb3ea
    • Arjan van de Ven's avatar
      x86: introduce /dev/mem restrictions with a config option · ae531c26
      Arjan van de Ven authored
      This patch introduces a restriction on /dev/mem: Only non-memory can be
      read or written unless the newly introduced config option is set.
      
      The X server needs access to /dev/mem for the PCI space, but it doesn't need
      access to memory; both the file permissions and SELinux permissions of /dev/mem
      just make X effectively super-super powerful. With the exception of the
      BIOS area, there's just no valid app that uses /dev/mem on actual memory.
      Other popular users of /dev/mem are rootkits and the like.
      (note: mmap access of memory via /dev/mem was already not allowed since
      a really long time)
      
      People who want to use /dev/mem for kernel debugging can enable the config
      option.
      
      The restrictions of this patch have been in the Fedora and RHEL kernels for
      at least 4 years without any problems.
      Signed-off-by: default avatarArjan van de Ven <arjan@linux.intel.com>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      ae531c26
  2. 23 Apr, 2008 4 commits
  3. 22 Apr, 2008 34 commits