1. 10 7月, 2014 1 次提交
  2. 24 6月, 2014 1 次提交
  3. 22 6月, 2014 1 次提交
  4. 05 6月, 2014 2 次提交
  5. 14 5月, 2014 1 次提交
  6. 12 5月, 2014 1 次提交
  7. 05 5月, 2014 2 次提交
  8. 19 4月, 2014 1 次提交
  9. 02 4月, 2014 1 次提交
  10. 24 2月, 2014 2 次提交
  11. 05 2月, 2014 1 次提交
    • L
      kbuild: don't enable DEBUG_INFO when building for COMPILE_TEST · 12b13835
      Linus Torvalds 提交于
      It really isn't very interesting to have DEBUG_INFO when doing compile
      coverage stuff (you wouldn't want to run the result anyway, that's kind
      of the whole point of COMPILE_TEST), and it currently makes the build
      take longer and use much more disk space for "all{yes,mod}config".
      
      There's somewhat active discussion about this still, and we might end up
      with some new config option for things like this (Andi points out that
      the silly X86_DECODER_SELFTEST option also slows down the normal
      coverage tests hugely), but I'm starting the ball rolling with this
      simple one-liner.
      
      DEBUG_INFO isn't that noticeable if you have tons of memory and a good
      IO subsystem, but it hurts you a lot if you don't - for very little
      upside for the common use.
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      12b13835
  12. 24 1月, 2014 2 次提交
    • K
      test: check copy_to/from_user boundary validation · 3e2a4c18
      Kees Cook 提交于
      To help avoid an architecture failing to correctly check kernel/user
      boundaries when handling copy_to_user, copy_from_user, put_user, or
      get_user, perform some simple tests and fail to load if any of them
      behave unexpectedly.
      
      Specifically, this is to make sure there is a way to notice if things
      like what was fixed in commit 8404663f ("ARM: 7527/1: uaccess:
      explicitly check __user pointer when !CPU_USE_DOMAINS") ever regresses
      again, for any architecture.
      
      Additionally, adds new "user" selftest target, which loads this module.
      Signed-off-by: NKees Cook <keescook@chromium.org>
      Cc: Rusty Russell <rusty@rustcorp.com.au>
      Cc: Joe Perches <joe@perches.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      3e2a4c18
    • K
      test: add minimal module for verification testing · 93e9ef83
      Kees Cook 提交于
      This is a pair of test modules I'd like to see in the tree.  Instead of
      putting these in lkdtm, where I've been adding various tests that trigger
      crashes, these don't make sense there since they need to be either
      distinctly separate, or their pass/fail state don't need to crash the
      machine.
      
      These live in lib/ for now, along with a few other in-kernel test modules,
      and use the slightly more common "test_" naming convention, instead of
      "test-".  We should likely standardize on the former:
      
      $ find . -name 'test_*.c' | grep -v /tools/ | wc -l
      4
      $ find . -name 'test-*.c' | grep -v /tools/ | wc -l
      2
      
      The first is entirely a no-op module, designed to allow simple testing of
      the module loading and verification interface.  It's useful to have a
      module that has no other uses or dependencies so it can be reliably used
      for just testing module loading and verification.
      
      The second is a module that exercises the user memory access functions, in
      an effort to make sure that we can quickly catch any regressions in
      boundary checking (e.g.  like what was recently fixed on ARM).
      
      This patch (of 2):
      
      When doing module loading verification tests (for example, with module
      signing, or LSM hooks), it is very handy to have a module that can be
      built on all systems under test, isn't auto-loaded at boot, and has no
      device or similar dependencies.  This creates the "test_module.ko" module
      for that purpose, which only reports its load and unload to printk.
      Signed-off-by: NKees Cook <keescook@chromium.org>
      Acked-by: NRusty Russell <rusty@rustcorp.com.au>
      Cc: Joe Perches <joe@perches.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      93e9ef83
  13. 22 1月, 2014 1 次提交
    • D
      dma-debug: introduce debug_dma_assert_idle() · 0abdd7a8
      Dan Williams 提交于
      Record actively mapped pages and provide an api for asserting a given
      page is dma inactive before execution proceeds.  Placing
      debug_dma_assert_idle() in cow_user_page() flagged the violation of the
      dma-api in the NET_DMA implementation (see commit 77873803 "net_dma:
      mark broken").
      
      The implementation includes the capability to count, in a limited way,
      repeat mappings of the same page that occur without an intervening
      unmap.  This 'overlap' counter is limited to the few bits of tag space
      in a radix tree.  This mechanism is added to mitigate false negative
      cases where, for example, a page is dma mapped twice and
      debug_dma_assert_idle() is called after the page is un-mapped once.
      Signed-off-by: NDan Williams <dan.j.williams@intel.com>
      Cc: Joerg Roedel <joro@8bytes.org>
      Cc: Vinod Koul <vinod.koul@intel.com>
      Cc: Russell King <rmk+kernel@arm.linux.org.uk>
      Cc: James Bottomley <JBottomley@Parallels.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      0abdd7a8
  14. 13 1月, 2014 1 次提交
  15. 26 11月, 2013 1 次提交
    • J
      panic: Make panic_timeout configurable · 5800dc3c
      Jason Baron 提交于
      The panic_timeout value can be set via the command line option
      'panic=x', or via /proc/sys/kernel/panic, however that is not
      sufficient when the panic occurs before we are able to set up
      these values. Thus, add a CONFIG_PANIC_TIMEOUT so that we can
      set the desired value from the .config.
      
      The default panic_timeout value continues to be 0 - wait
      forever. Also adds set_arch_panic_timeout(new_timeout,
      arch_default_timeout), which is intended to be used by arches in
      arch_setup(). The idea being that the new_timeout is only set if
      the user hasn't changed from the arch_default_timeout.
      Signed-off-by: NJason Baron <jbaron@akamai.com>
      Cc: benh@kernel.crashing.org
      Cc: paulus@samba.org
      Cc: ralf@linux-mips.org
      Cc: mpe@ellerman.id.au
      Cc: felipe.contreras@gmail.com
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Link: http://lkml.kernel.org/r/1a1674daec27c534df409697025ac568ebcee91e.1385418410.git.jbaron@akamai.comSigned-off-by: NIngo Molnar <mingo@kernel.org>
      5800dc3c
  16. 13 11月, 2013 1 次提交
  17. 29 10月, 2013 1 次提交
  18. 17 10月, 2013 1 次提交
  19. 13 9月, 2013 1 次提交
  20. 12 9月, 2013 1 次提交
  21. 05 9月, 2013 1 次提交
    • V
      Kconfig.debug: Add FRAME_POINTER anti-dependency for ARC · cc80ae38
      Vineet Gupta 提交于
      Frame pointer on ARC doesn't serve the conventional purpose of stack
      unwinding due to the typical way ABI designates it's usage.
      Thus it's explicit usage on ARC is discouraged (gcc is free to use it,
      for some tricky stack frames even if -fomit-frame-pointer).
      
      Hence no point enabling it for ARC.
      
      References: http://www.spinics.net/lists/kernel/msg1593937.htmlSigned-off-by: NVineet Gupta <vgupta@synopsys.com>
      Cc: Dave Hansen <dave.hansen@linux.intel.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: "Paul E. McKenney" <paul.mckenney@linaro.org>
      Cc: Catalin Marinas <catalin.marinas@arm.com>
      Cc: Michel Lespinasse <walken@google.com>
      Cc: linux-kernel@vger.kernel.org
      cc80ae38
  22. 26 7月, 2013 1 次提交
    • R
      kobject: delayed kobject release: help find buggy drivers · c817a67e
      Russell King 提交于
      Implement debugging for kobject release functions.  kobjects are
      reference counted, so the drop of the last reference to them is not
      predictable. However, the common case is for the last reference to be
      the kobject's removal from a subsystem, which results in the release
      function being immediately called.
      
      This can hide subtle bugs, which can occur when another thread holds a
      reference to the kobject at the same time that a kobject is removed.
      This results in the release method being delayed.
      
      In order to make these kinds of problems more visible, the following
      patch implements a delayed release; this has the effect that the
      release function will be out of order with respect to the removal of
      the kobject in the same manner that it would be if a reference was
      being held.
      
      This provides us with an easy way to allow driver writers to debug
      their drivers and fix otherwise hidden problems.
      Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      c817a67e
  23. 15 7月, 2013 1 次提交
    • P
      kernel: delete __cpuinit usage from all core kernel files · 0db0628d
      Paul Gortmaker 提交于
      The __cpuinit type of throwaway sections might have made sense
      some time ago when RAM was more constrained, but now the savings
      do not offset the cost and complications.  For example, the fix in
      commit 5e427ec2 ("x86: Fix bit corruption at CPU resume time")
      is a good example of the nasty type of bugs that can be created
      with improper use of the various __init prefixes.
      
      After a discussion on LKML[1] it was decided that cpuinit should go
      the way of devinit and be phased out.  Once all the users are gone,
      we can then finally remove the macros themselves from linux/init.h.
      
      This removes all the uses of the __cpuinit macros from C files in
      the core kernel directories (kernel, init, lib, mm, and include)
      that don't really have a specific maintainer.
      
      [1] https://lkml.org/lkml/2013/5/20/589Signed-off-by: NPaul Gortmaker <paul.gortmaker@windriver.com>
      0db0628d
  24. 05 7月, 2013 7 次提交
  25. 26 6月, 2013 1 次提交
    • D
      mutex: Add w/w mutex slowpath debugging · 23010027
      Daniel Vetter 提交于
      Injects EDEADLK conditions at pseudo-random interval, with
      exponential backoff up to UINT_MAX (to ensure that every lock
      operation still completes in a reasonable time).
      
      This way we can test the wound slowpath even for ww mutex users
      where contention is never expected, and the ww deadlock
      avoidance algorithm is only needed for correctness against
      malicious userspace. An example would be protecting kernel
      modesetting properties, which thanks to single-threaded X isn't
      really expected to contend, ever.
      
      I've looked into using the CONFIG_FAULT_INJECTION
      infrastructure, but decided against it for two reasons:
      
      - EDEADLK handling is mandatory for ww mutex users and should
        never affect the outcome of a syscall. This is in contrast to -ENOMEM
        injection. So fine configurability isn't required.
      
      - The fault injection framework only allows to set a simple
        probability for failure. Now the probability that a ww mutex acquire
        stage with N locks will never complete (due to too many injected
        EDEADLK backoffs) is zero. But the expected number of ww_mutex_lock
        operations for the completely uncontended case would be O(exp(N)).
        The per-acuiqire ctx exponential backoff solution choosen here only
        results in O(log N) overhead due to injection and so O(log N * N)
        lock operations. This way we can fail with high probability (and so
        have good test coverage even for fancy backoff and lock acquisition
        paths) without running into patalogical cases.
      
      Note that EDEADLK will only ever be injected when we managed to
      acquire the lock. This prevents any behaviour changes for users
      which rely on the EALREADY semantics.
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Signed-off-by: NMaarten Lankhorst <maarten.lankhorst@canonical.com>
      Acked-by: NPeter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: dri-devel@lists.freedesktop.org
      Cc: linaro-mm-sig@lists.linaro.org
      Cc: rostedt@goodmis.org
      Cc: daniel@ffwll.ch
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Link: http://lkml.kernel.org/r/20130620113117.4001.21681.stgit@patserSigned-off-by: NIngo Molnar <mingo@kernel.org>
      23010027
  26. 22 6月, 2013 1 次提交
  27. 01 5月, 2013 3 次提交
  28. 03 3月, 2013 1 次提交
    • J
      Kconfig.debug: add METAG to dependency lists · 79f83c02
      James Hogan 提交于
      Add [!]METAG to a couple of Kconfig dependencies in lib/Kconfig.debug.
      Don't allow stack utilization instrumentation on metag, and allow
      building with frame pointers.
      Signed-off-by: NJames Hogan <james.hogan@imgtec.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: "Paul E. McKenney" <paul.mckenney@linaro.org>
      Cc: Akinobu Mita <akinobu.mita@gmail.com>
      Cc: Michel Lespinasse <walken@google.com>
      Cc: Catalin Marinas <catalin.marinas@arm.com>
      79f83c02