1. 31 7月, 2012 1 次提交
    • A
      fault-injection: notifier error injection · 8d438288
      Akinobu Mita 提交于
      This patchset provides kernel modules that can be used to test the error
      handling of notifier call chain failures by injecting artifical errors to
      the following notifier chain callbacks.
      
       * CPU notifier
       * PM notifier
       * memory hotplug notifier
       * powerpc pSeries reconfig notifier
      
      Example: Inject CPU offline error (-1 == -EPERM)
      
        # cd /sys/kernel/debug/notifier-error-inject/cpu
        # echo -1 > actions/CPU_DOWN_PREPARE/error
        # echo 0 > /sys/devices/system/cpu/cpu1/online
        bash: echo: write error: Operation not permitted
      
      The patchset also adds cpu and memory hotplug tests to
      tools/testing/selftests These tests first do simple online and offline
      test and then do fault injection tests if notifier error injection
      module is available.
      
      This patch:
      
      The notifier error injection provides the ability to inject artifical
      errors to specified notifier chain callbacks.  It is useful to test the
      error handling of notifier call chain failures.
      
      This adds common basic functions to define which type of events can be
      fail and to initialize the debugfs interface to control what error code
      should be returned and which event should be failed.
      Signed-off-by: NAkinobu Mita <akinobu.mita@gmail.com>
      Cc: Pavel Machek <pavel@ucw.cz>
      Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
      Cc: Greg KH <greg@kroah.com>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Michael Ellerman <michael@ellerman.id.au>
      Cc: Dave Jones <davej@redhat.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      8d438288
  2. 20 7月, 2012 1 次提交
    • T
      debug: Do not permit CONFIG_DEBUG_STACK_USAGE=y on IA64 or PARISC · e9c31b32
      Tony Luck 提交于
      The stack_not_used() function in <linux/sched.h> assumes that stacks
      grow downwards. This is not true on IA64 or PARISC, so this function
      would walk off in the wrong direction and into the weeds.
      
      Found on IA64 because of a compilation failure with recursive dependencies
      on IA64_TASKSIZE and IA64_THREAD_INFO_SIZE.
      
      Fixing the code is possible, but should be combined with other
      infrastructure additions to set up the "canary" at the end of the stack.
      
      Reported-by: Fengguang Wu <fengguang.wu@intel.com> (failed allmodconfig build)
      Signed-off-by: NTony Luck <tony.luck@intel.com>
      e9c31b32
  3. 10 5月, 2012 1 次提交
  4. 07 5月, 2012 1 次提交
  5. 01 5月, 2012 1 次提交
  6. 31 3月, 2012 1 次提交
  7. 24 3月, 2012 1 次提交
  8. 23 3月, 2012 1 次提交
  9. 22 2月, 2012 2 次提交
  10. 11 2月, 2012 1 次提交
  11. 25 1月, 2012 1 次提交
    • E
      sysctl: Improve the sysctl sanity checks · 7c60c48f
      Eric W. Biederman 提交于
      - Stop validating subdirectories now that we only register leaf tables
      
      - Cleanup and improve the duplicate filename check.
        * Run the duplicate filename check under the sysctl_lock to guarantee
          we never add duplicate names.
        * Reduce the duplicate filename check to nearly O(M*N) where M is the
          number of entries in tthe table we are registering and N is the
          number of entries in the directory before we got there.
      
      - Move the duplicate filename check into it's own function and call
        it directtly from __register_sysctl_table
      
      - Kill the config option as the sanity checks are now cheap enough
        the config option is unnecessary. The original reason for the config
        option was because we had a huge table used to verify the proc filename
        to binary sysctl mapping.  That table has now evolved into the binary_sysctl
        translation layer and is no longer part of the sysctl_check code.
      
      - Tighten up the permission checks.  Guarnateeing that files only have read
        or write permissions.
      
      - Removed redudant check for parents having a procname as now everything has
        a procname.
      
      - Generalize the backtrace logic so that we print a backtrace from
        any failure of __register_sysctl_table that was not caused by
        a memmory allocation failure.  The backtrace allows us to track
        down who erroneously registered a sysctl table.
      
      Bechmark before (CONFIG_SYSCTL_CHECK=y):
          make-dummies 0 999 -> 12s
          rmmod dummy        -> 0.08s
      
      Bechmark before (CONFIG_SYSCTL_CHECK=n):
          make-dummies 0 999 -> 0.7s
          rmmod dummy        -> 0.06s
          make-dummies 0 99999 -> 1m13s
          rmmod dummy          -> 0.38s
      
      Benchmark after:
          make-dummies 0 999 -> 0.65s
          rmmod dummy        -> 0.055s
          make-dummies 0 9999 -> 1m10s
          rmmod dummy         -> 0.39s
      
      The sysctl sanity checks now impose no measurable cost.
      Signed-off-by: NEric W. Biederman <ebiederm@xmission.com>
      7c60c48f
  12. 03 12月, 2011 1 次提交
  13. 01 11月, 2011 1 次提交
  14. 27 10月, 2011 1 次提交
  15. 02 10月, 2011 1 次提交
    • A
      ARM: always use ARM_UNWIND for thumb2 kernels · 89bace65
      Arnd Bergmann 提交于
      Thumb2 kernels cannot be built with frame pointers, but can use the
      ARM_UNWIND feature for unwinding instead. This makes sure that all
      features that rely on unwinding includeing CONFIG_LATENCYTOP and
      FAULT_INJECTION_STACKTRACE_FILTER do not enable frame pointers
      when the unwinder is already selected, and we always build with
      the unwinder when we want a thumb2 kernel, to make sure we do not
      get the frame pointers instead.
      
      A different option would be to redefine the CONFIG_FRAME_POINTERS
      option on ARM to mean builing with either frame pointers or
      the unwinder, and then select which one to use based on the
      CPU architecture or another user option. That would still allow
      building thumb2 kernels without the unwinder but would also be
      more confusing.
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      89bace65
  16. 15 9月, 2011 1 次提交
  17. 23 8月, 2011 1 次提交
  18. 05 7月, 2011 1 次提交
  19. 23 6月, 2011 1 次提交
  20. 10 6月, 2011 1 次提交
  21. 02 6月, 2011 1 次提交
  22. 25 5月, 2011 2 次提交
  23. 20 5月, 2011 1 次提交
  24. 19 5月, 2011 1 次提交
  25. 06 5月, 2011 2 次提交
  26. 28 4月, 2011 1 次提交
  27. 10 4月, 2011 1 次提交
  28. 05 4月, 2011 1 次提交
  29. 23 3月, 2011 3 次提交
  30. 21 3月, 2011 1 次提交
  31. 05 3月, 2011 1 次提交
    • A
      BKL: That's all, folks · 4ba8216c
      Arnd Bergmann 提交于
      This removes the implementation of the big kernel lock,
      at last. A lot of people have worked on this in the
      past, I so the credit for this patch should be with
      everyone who participated in the hunt.
      
      The names on the Cc list are the people that were the
      most active in this, according to the recorded git
      history, in alphabetical order.
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Acked-by: NAlan Cox <alan@linux.intel.com>
      Cc: Alessio Igor Bogani <abogani@texware.it>
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Cc: Andrew Hendry <andrew.hendry@gmail.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Christoph Hellwig <hch@infradead.org>
      Cc: Eric W. Biederman <ebiederm@xmission.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Hans Verkuil <hverkuil@xs4all.nl>
      Acked-by: NIngo Molnar <mingo@elte.hu>
      Cc: Jan Blunck <jblunck@infradead.org>
      Cc: John Kacur <jkacur@redhat.com>
      Cc: Jonathan Corbet <corbet@lwn.net>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Matthew Wilcox <matthew@wil.cx>
      Cc: Oliver Neukum <oliver@neukum.org>
      Cc: Paul Menage <menage@google.com>
      Acked-by: NThomas Gleixner <tglx@linutronix.de>
      Cc: Trond Myklebust <Trond.Myklebust@netapp.com>
      4ba8216c
  32. 24 2月, 2011 1 次提交
  33. 08 2月, 2011 1 次提交
  34. 21 1月, 2011 1 次提交
    • D
      kconfig: rename CONFIG_EMBEDDED to CONFIG_EXPERT · 6a108a14
      David Rientjes 提交于
      The meaning of CONFIG_EMBEDDED has long since been obsoleted; the option
      is used to configure any non-standard kernel with a much larger scope than
      only small devices.
      
      This patch renames the option to CONFIG_EXPERT in init/Kconfig and fixes
      references to the option throughout the kernel.  A new CONFIG_EMBEDDED
      option is added that automatically selects CONFIG_EXPERT when enabled and
      can be used in the future to isolate options that should only be
      considered for embedded systems (RISC architectures, SLOB, etc).
      
      Calling the option "EXPERT" more accurately represents its intention: only
      expert users who understand the impact of the configuration changes they
      are making should enable it.
      Reviewed-by: NIngo Molnar <mingo@elte.hu>
      Acked-by: NDavid Woodhouse <david.woodhouse@intel.com>
      Signed-off-by: NDavid Rientjes <rientjes@google.com>
      Cc: Greg KH <gregkh@suse.de>
      Cc: "David S. Miller" <davem@davemloft.net>
      Cc: Jens Axboe <axboe@kernel.dk>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Cc: Robin Holt <holt@sgi.com>
      Cc: <linux-arch@vger.kernel.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      6a108a14
  35. 23 12月, 2010 1 次提交
    • D
      x86, nmi_watchdog: Remove ARCH_HAS_NMI_WATCHDOG and rely on CONFIG_HARDLOCKUP_DETECTOR · 4a7863cc
      Don Zickus 提交于
      The x86 arch has shifted its use of the nmi_watchdog from a
      local implementation to the global one provide by
      kernel/watchdog.c.  This shift has caused a whole bunch of
      compile problems under different config options.  I attempt to
      simplify things with the patch below.
      
      In order to simplify things, I had to come to terms with the
      meaning of two terms ARCH_HAS_NMI_WATCHDOG and
      CONFIG_HARDLOCKUP_DETECTOR.  Basically they mean the same thing,
      the former on a local level and the latter on a global level.
      
      With the old x86 nmi watchdog gone, there is no need to rely on
      defining the ARCH_HAS_NMI_WATCHDOG variable because it doesn't
      make sense any more.  x86 will now use the global
      implementation.
      
      The changes below do a few things.  First it changes the few
      places that relied on ARCH_HAS_NMI_WATCHDOG to use
      CONFIG_X86_LOCAL_APIC (the former was an alias for the latter
      anyway, so nothing unusual here).  Those pieces of code were
      relying more on local apic functionality the nmi watchdog
      functionality, so the change should make sense.
      
      Second, I removed the x86 implementation of
      touch_nmi_watchdog().  It isn't need now, instead x86 will rely
      on kernel/watchdog.c's implementation.
      
      Third, I removed the #define ARCH_HAS_NMI_WATCHDOG itself from
      x86.  And tweaked the include/linux/nmi.h file to tell users to
      look for an externally defined touch_nmi_watchdog in the case of
      ARCH_HAS_NMI_WATCHDOG _or_ CONFIG_HARDLOCKUP_DETECTOR. This
      changes removes some of the ugliness in that file.
      
      Finally, I added a Kconfig dependency for
      CONFIG_HARDLOCKUP_DETECTOR that said you can't have
      ARCH_HAS_NMI_WATCHDOG _and_ CONFIG_HARDLOCKUP_DETECTOR.  You can
      only have one nmi_watchdog.
      
      Tested with
      ARCH=i386: allnoconfig, defconfig, allyesconfig, (various broken
      configs) ARCH=x86_64: allnoconfig, defconfig, allyesconfig,
      (various broken configs)
      
      Hopefully, after this patch I won't get any more compile broken
      emails. :-)
      
      v3:
        changed a couple of 'linux/nmi.h' -> 'asm/nmi.h' to pick-up correct function
        prototypes when CONFIG_HARDLOCKUP_DETECTOR is not set.
      Signed-off-by: NDon Zickus <dzickus@redhat.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: fweisbec@gmail.com
      LKML-Reference: <1293044403-14117-1-git-send-email-dzickus@redhat.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      4a7863cc