1. 24 5月, 2008 4 次提交
    • P
      x86: mmiotrace, preview 2 · d61fc448
      Pekka Paalanen 提交于
      Kconfig.debug, Makefile and testmmiotrace.c style fixes.
      Use real mutex instead of mutex.
      Fix failure path in register probe func.
      kmmio: RCU read-locked over single stepping.
      Generate mapping id's.
      Make mmio-mod.c built-in and rewrite its locking.
      Add debugfs file to enable/disable mmiotracing.
      kmmio: use irqsave spinlocks.
      Lots of cleanups in mmio-mod.c
      Marker file moved from /proc into debugfs.
      Call mmiotrace entrypoints directly from ioremap.c.
      Signed-off-by: NPekka Paalanen <pq@iki.fi>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      d61fc448
    • P
      x86: explicit call to mmiotrace in do_page_fault() · 10c43d2e
      Pekka Paalanen 提交于
      The custom page fault handler list is replaced with a single function
      pointer. All related functions and variables are renamed for
      mmiotrace.
      Signed-off-by: NPekka Paalanen <pq@iki.fi>
      Cc: Christoph Hellwig <hch@infradead.org>
      Cc: Arjan van de Ven <arjan@infradead.org>
      Cc: pq@iki.fi
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      10c43d2e
    • P
      x86: mmiotrace - trace memory mapped IO · 8b7d89d0
      Pekka Paalanen 提交于
      Mmiotrace is a tool for trapping memory mapped IO (MMIO) accesses within
      the kernel. It is used for debugging and especially for reverse
      engineering evil binary drivers.
      
      Mmiotrace works by wrapping the ioremap family of kernel functions and
      marking the returned pages as not present. Access to the IO memory
      triggers a page fault, which will be handled by mmiotrace's custom page
      fault handler. This will single-step the faulted instruction with the
      MMIO page marked as present. Access logs are directed to user space via
      relay and debug_fs.
      
      This page fault approach is necessary, because binary drivers have
      readl/writel etc. calls inlined and therefore extremely difficult to
      trap with with e.g. kprobes.
      
      This patch depends on the custom page fault handlers patch.
      Signed-off-by: NPekka Paalanen <pq@iki.fi>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      8b7d89d0
    • P
      x86: add a list for custom page fault handlers. · 86069782
      Pekka Paalanen 提交于
      Provides kernel modules a way to register custom page fault handlers.
      On every page fault this will call a list of registered functions. The
      functions may handle the fault and force do_page_fault() to return
      immediately.
      
      This functionality is similar to the now removed page fault notifiers.
      Custom page fault handlers are used by debugging and reverse engineering
      tools. Mmiotrace is one such tool and a patch to add it into the tree
      will follow.
      
      The custom page fault handlers are called earlier in do_page_fault()
      than the page fault notifiers were.
      Signed-off-by: NPekka Paalanen <pq@iki.fi>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      86069782
  2. 01 5月, 2008 4 次提交
  3. 26 4月, 2008 1 次提交
    • I
      x86: add optimized inlining · 60a3cdd0
      Ingo Molnar 提交于
      add CONFIG_OPTIMIZE_INLINING=y.
      
      allow gcc to optimize the kernel image's size by uninlining
      functions that have been marked 'inline'. Previously gcc was
      forced by Linux to always-inline these functions via a gcc
      attribute:
      
       #define inline	inline __attribute__((always_inline))
      
      Especially when the user has already selected
      CONFIG_OPTIMIZE_FOR_SIZE=y this can make a huge difference in
      kernel image size (using a standard Fedora .config):
      
         text    data     bss     dec           hex filename
         5613924  562708 3854336 10030968    990f78 vmlinux.before
         5486689  562708 3854336  9903733    971e75 vmlinux.after
      
      that's a 2.3% text size reduction (!).
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      60a3cdd0
  4. 25 4月, 2008 2 次提交
    • I
      /dev/mem: make promisc the default · 1f56cf1c
      Ingo Molnar 提交于
      default to the old semantics.
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      1f56cf1c
    • A
      x86: introduce /dev/mem restrictions with a config option · ae531c26
      Arjan van de Ven 提交于
      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: NArjan van de Ven <arjan@linux.intel.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      ae531c26
  5. 17 4月, 2008 4 次提交
  6. 19 2月, 2008 1 次提交
  7. 10 2月, 2008 1 次提交
  8. 07 2月, 2008 1 次提交
  9. 30 1月, 2008 14 次提交
  10. 30 10月, 2007 3 次提交
  11. 26 10月, 2007 1 次提交
  12. 30 7月, 2007 1 次提交
  13. 22 6月, 2007 1 次提交
  14. 21 6月, 2007 1 次提交
  15. 03 5月, 2007 1 次提交