1. 14 11月, 2014 1 次提交
  2. 09 8月, 2014 1 次提交
  3. 07 6月, 2014 1 次提交
  4. 08 4月, 2014 1 次提交
  5. 31 3月, 2014 1 次提交
    • R
      Use 'E' instead of 'X' for unsigned module taint flag. · 57673c2b
      Rusty Russell 提交于
      Takashi Iwai <tiwai@suse.de> says:
      > The letter 'X' has been already used for SUSE kernels for very long
      > time, to indicate the external supported modules.  Can the new flag be
      > changed to another letter for avoiding conflict...?
      > (BTW, we also use 'N' for "no support", too.)
      
      Note: this code should be cleaned up, so we don't have such maps in
      three places!
      Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
      57673c2b
  6. 21 3月, 2014 1 次提交
  7. 13 3月, 2014 1 次提交
    • M
      Fix: module signature vs tracepoints: add new TAINT_UNSIGNED_MODULE · 66cc69e3
      Mathieu Desnoyers 提交于
      Users have reported being unable to trace non-signed modules loaded
      within a kernel supporting module signature.
      
      This is caused by tracepoint.c:tracepoint_module_coming() refusing to
      take into account tracepoints sitting within force-loaded modules
      (TAINT_FORCED_MODULE). The reason for this check, in the first place, is
      that a force-loaded module may have a struct module incompatible with
      the layout expected by the kernel, and can thus cause a kernel crash
      upon forced load of that module on a kernel with CONFIG_TRACEPOINTS=y.
      
      Tracepoints, however, specifically accept TAINT_OOT_MODULE and
      TAINT_CRAP, since those modules do not lead to the "very likely system
      crash" issue cited above for force-loaded modules.
      
      With kernels having CONFIG_MODULE_SIG=y (signed modules), a non-signed
      module is tainted re-using the TAINT_FORCED_MODULE taint flag.
      Unfortunately, this means that Tracepoints treat that module as a
      force-loaded module, and thus silently refuse to consider any tracepoint
      within this module.
      
      Since an unsigned module does not fit within the "very likely system
      crash" category of tainting, add a new TAINT_UNSIGNED_MODULE taint flag
      to specifically address this taint behavior, and accept those modules
      within Tracepoints. We use the letter 'X' as a taint flag character for
      a module being loaded that doesn't know how to sign its name (proposed
      by Steven Rostedt).
      
      Also add the missing 'O' entry to trace event show_module_flags() list
      for the sake of completeness.
      Signed-off-by: NMathieu Desnoyers <mathieu.desnoyers@efficios.com>
      Acked-by: NSteven Rostedt <rostedt@goodmis.org>
      NAKed-by: NIngo Molnar <mingo@redhat.com>
      CC: Thomas Gleixner <tglx@linutronix.de>
      CC: David Howells <dhowells@redhat.com>
      CC: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Signed-off-by: NRusty Russell <rusty@rustcorp.com.au>
      66cc69e3
  8. 14 2月, 2014 1 次提交
  9. 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
  10. 13 11月, 2013 1 次提交
  11. 12 9月, 2013 1 次提交
  12. 10 7月, 2013 1 次提交
  13. 20 6月, 2013 1 次提交
    • S
      tracing: Disable tracing on warning · de7edd31
      Steven Rostedt (Red Hat) 提交于
      Add a traceoff_on_warning option in both the kernel command line as well
      as a sysctl option. When set, any WARN*() function that is hit will cause
      the tracing_on variable to be cleared, which disables writing to the
      ring buffer.
      
      This is useful especially when tracing a bug with function tracing. When
      a warning is hit, the print caused by the warning can flood the trace with
      the functions that producing the output for the warning. This can make the
      resulting trace useless by either hiding where the bug happened, or worse,
      by overflowing the buffer and losing the trace of the bug totally.
      Acked-by: NPeter Zijlstra <peterz@infradead.org>
      Signed-off-by: NSteven Rostedt <rostedt@goodmis.org>
      de7edd31
  14. 01 5月, 2013 1 次提交
    • T
      dump_stack: implement arch-specific hardware description in task dumps · 98e5e1bf
      Tejun Heo 提交于
      x86 and ia64 can acquire extra hardware identification information
      from DMI and print it along with task dumps; however, the usage isn't
      consistent.
      
      * x86 show_regs() collects vendor, product and board strings and print
        them out with PID, comm and utsname.  Some of the information is
        printed again later in the same dump.
      
      * warn_slowpath_common() explicitly accesses the DMI board and prints
        it out with "Hardware name:" label.  This applies to both x86 and
        ia64 but is irrelevant on all other archs.
      
      * ia64 doesn't show DMI information on other non-WARN dumps.
      
      This patch introduces arch-specific hardware description used by
      dump_stack().  It can be set by calling dump_stack_set_arch_desc()
      during boot and, if exists, printed out in a separate line with
      "Hardware name:" label.
      
      dmi_set_dump_stack_arch_desc() is added which sets arch-specific
      description from DMI data.  It uses dmi_ids_string[] which is set from
      dmi_present() used for DMI debug message.  It is superset of the
      information x86 show_regs() is using.  The function is called from x86
      and ia64 boot code right after dmi_scan_machine().
      
      This makes the explicit DMI handling in warn_slowpath_common()
      unnecessary.  Removed.
      
      show_regs() isn't yet converted to use generic debug information
      printing and this patch doesn't remove the duplicate DMI handling in
      x86 show_regs().  The next patch will unify show_regs() handling and
      remove the duplication.
      
      An example WARN dump follows.
      
       WARNING: at kernel/workqueue.c:4841 init_workqueues+0x35/0x505()
       Modules linked in:
       CPU: 0 PID: 1 Comm: swapper/0 Not tainted 3.9.0-rc1-work+ #3
       Hardware name: empty empty/S3992, BIOS 080011  10/26/2007
        0000000000000009 ffff88007c861e08 ffffffff81c614dc ffff88007c861e48
        ffffffff8108f500 ffffffff82228240 0000000000000040 ffffffff8234a08e
        0000000000000000 0000000000000000 0000000000000000 ffff88007c861e58
       Call Trace:
        [<ffffffff81c614dc>] dump_stack+0x19/0x1b
        [<ffffffff8108f500>] warn_slowpath_common+0x70/0xa0
        [<ffffffff8108f54a>] warn_slowpath_null+0x1a/0x20
        [<ffffffff8234a0c3>] init_workqueues+0x35/0x505
        ...
      
      v2: Use the same string as the debug message from dmi_present() which
          also contains BIOS information.  Move hardware name into its own
          line as warn_slowpath_common() did.  This change was suggested by
          Bjorn Helgaas.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Cc: Bjorn Helgaas <bhelgaas@google.com>
      Cc: David S. Miller <davem@davemloft.net>
      Cc: Fengguang Wu <fengguang.wu@intel.com>
      Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
      Cc: Jesper Nilsson <jesper.nilsson@axis.com>
      Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
      Cc: Mike Frysinger <vapier@gentoo.org>
      Cc: Vineet Gupta <vgupta@synopsys.com>
      Cc: Sam Ravnborg <sam@ravnborg.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      98e5e1bf
  15. 21 1月, 2013 1 次提交
  16. 31 7月, 2012 1 次提交
    • V
      panic: fix a possible deadlock in panic() · 190320c3
      Vikram Mulukutla 提交于
      panic_lock is meant to ensure that panic processing takes place only on
      one cpu; if any of the other cpus encounter a panic, they will spin
      waiting to be shut down.
      
      However, this causes a regression in this scenario:
      
      1. Cpu 0 encounters a panic and acquires the panic_lock
         and proceeds with the panic processing.
      2. There is an interrupt on cpu 0 that also encounters
         an error condition and invokes panic.
      3. This second invocation fails to acquire the panic_lock
         and enters the infinite while loop in panic_smp_self_stop.
      
      Thus all panic processing is stopped, and the cpu is stuck for eternity
      in the while(1) inside panic_smp_self_stop.
      
      To address this, disable local interrupts with local_irq_disable before
      acquiring the panic_lock.  This will prevent interrupt handlers from
      executing during the panic processing, thus avoiding this particular
      problem.
      Signed-off-by: NVikram Mulukutla <markivx@codeaurora.org>
      Reviewed-by: NStephen Boyd <sboyd@codeaurora.org>
      Cc: Michael Holzheu <holzheu@linux.vnet.ibm.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      190320c3
  17. 18 5月, 2012 1 次提交
  18. 07 5月, 2012 1 次提交
  19. 13 4月, 2012 1 次提交
    • J
      panic: fix stack dump print on direct call to panic() · 026ee1f6
      Jason Wessel 提交于
      Commit 6e6f0a1f ("panic: don't print redundant backtraces on oops")
      causes a regression where no stack trace will be printed at all for the
      case where kernel code calls panic() directly while not processing an
      oops, and of course there are 100's of instances of this type of call.
      
      The original commit executed the check (!oops_in_progress), but this will
      always be false because just before the dump_stack() there is a call to
      bust_spinlocks(1), which does the following:
      
        void __attribute__((weak)) bust_spinlocks(int yes)
        {
      	if (yes) {
      		++oops_in_progress;
      
      The proper way to resolve the problem that original commit tried to
      solve is to avoid printing a stack dump from panic() when the either of
      the following conditions is true:
      
        1) TAINT_DIE has been set (this is done by oops_end())
           This indicates and oops has already been printed.
        2) oops_in_progress > 1
           This guards against the rare case where panic() is invoked
           a second time, or in between oops_begin() and oops_end()
      Signed-off-by: NJason Wessel <jason.wessel@windriver.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: <stable@vger.kernel.org>	[3.3+]
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      026ee1f6
  20. 13 1月, 2012 3 次提交
  21. 08 12月, 2011 1 次提交
    • B
      lockdep, bug: Exclude TAINT_OOT_MODULE from disabling lock debugging · 9ec84ace
      Ben Hutchings 提交于
      We do want to allow lock debugging for GPL-compatible modules
      that are not (yet) built in-tree.  This was disabled as a
      side-effect of commit 2449b8ba
      ('module,bug: Add TAINT_OOT_MODULE flag for modules not built
      in-tree').  Lock debug warnings now include taint flags, so
      kernel developers should still be able to deflect warnings
      caused by out-of-tree modules.
      
      The TAINT_PROPRIETARY_MODULE flag for non-GPL-compatible modules
      will still disable lock debugging.
      Signed-off-by: NBen Hutchings <ben@decadent.org.uk>
      Cc: Nick Bowler <nbowler@elliptictech.com>
      Cc: Greg KH <greg@kroah.com>
      Cc: Dave Jones <davej@redhat.com>
      Cc: Rusty Russell <rusty@rustcorp.com.au>
      Cc: Randy Dunlap <rdunlap@xenotime.net>
      Cc: Debian kernel maintainers <debian-kernel@lists.debian.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Alan Cox <alan@linux.intel.com>
      Link: http://lkml.kernel.org/r/1323268258.18450.11.camel@deadeyeSigned-off-by: NIngo Molnar <mingo@elte.hu>
      9ec84ace
  22. 06 12月, 2011 1 次提交
  23. 07 11月, 2011 1 次提交
  24. 27 7月, 2011 1 次提交
    • H
      panic: panic=-1 for immediate reboot · 4302fbc8
      Hugh Dickins 提交于
      When a kernel BUG or oops occurs, ChromeOS intends to panic and
      immediately reboot, with stacktrace and other messages preserved in RAM
      across reboot.
      
      But the longer we delay, the more likely the user is to poweroff and
      lose the info.
      
      panic_timeout (seconds before rebooting) is set by panic= boot option or
      sysctl or /proc/sys/kernel/panic; but 0 means wait forever, so at
      present we have to delay at least 1 second.
      
      Let a negative number mean reboot immediately (with the small cosmetic
      benefit of suppressing that newline-less "Rebooting in %d seconds.."
      message).
      Signed-off-by: NHugh Dickins <hughd@chromium.org>
      Signed-off-by: NMandeep Singh Baines <msb@chromium.org>
      Cc: Huang Ying <ying.huang@intel.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: Hugh Dickins <hughd@google.com>
      Cc: Olaf Hering <olaf@aepfle.de>
      Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
      Cc: Dave Airlie <airlied@gmail.com>
      Cc: Greg Kroah-Hartman <gregkh@suse.de>
      Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      4302fbc8
  25. 23 3月, 2011 1 次提交
  26. 12 1月, 2011 1 次提交
    • H
      ACPI, APEI, Generic Hardware Error Source POLL/IRQ/NMI notification type support · 81e88fdc
      Huang Ying 提交于
      Generic Hardware Error Source provides a way to report platform
      hardware errors (such as that from chipset). It works in so called
      "Firmware First" mode, that is, hardware errors are reported to
      firmware firstly, then reported to Linux by firmware. This way, some
      non-standard hardware error registers or non-standard hardware link
      can be checked by firmware to produce more valuable hardware error
      information for Linux.
      
      This patch adds POLL/IRQ/NMI notification types support.
      
      Because the memory area used to transfer hardware error information
      from BIOS to Linux can be determined only in NMI, IRQ or timer
      handler, but general ioremap can not be used in atomic context, so a
      special version of atomic ioremap is implemented for that.
      
      Known issue:
      
      - Error information can not be printed for recoverable errors notified
        via NMI, because printk is not NMI-safe. Will fix this via delay
        printing to IRQ context via irq_work or make printk NMI-safe.
      
      v2:
      
      - adjust printk format per comments.
      Signed-off-by: NHuang Ying <ying.huang@intel.com>
      Reviewed-by: NAndi Kleen <ak@linux.intel.com>
      Signed-off-by: NLen Brown <len.brown@intel.com>
      81e88fdc
  27. 11 8月, 2010 2 次提交
  28. 28 5月, 2010 1 次提交
  29. 19 5月, 2010 2 次提交
  30. 07 3月, 2010 1 次提交
  31. 01 1月, 2010 1 次提交
  32. 30 11月, 2009 1 次提交
  33. 06 10月, 2009 1 次提交
  34. 21 9月, 2009 1 次提交
  35. 25 7月, 2009 1 次提交
  36. 17 5月, 2009 1 次提交
    • L
      Fix caller information for warn_slowpath_null · 0f6f49a8
      Linus Torvalds 提交于
      Ian Campbell noticed that since "Eliminate thousands of warnings with
      gcc 3.2 build" (commit 57adc4d2) all
      WARN_ON()'s currently appear to come from warn_slowpath_null(), eg:
      
        WARNING: at kernel/softirq.c:143 warn_slowpath_null+0x1c/0x20()
      
      because now that warn_slowpath_null() is in the call path, the
      __builtin_return_address(0) returns that, rather than the place that
      caused the warning.
      
      Fix this by splitting up the warn_slowpath_null/fmt cases differently,
      using a common helper function, and getting the return address in the
      right place.  This also happens to avoid the unnecessary stack usage for
      the non-stdargs case, and just generally cleans things up.
      
      Make the function name printout use %pS while at it.
      
      Cc: Ian Campbell <ian.campbell@citrix.com>
      Cc: Jesper Nilsson <jesper.nilsson@axis.com>
      Cc: Johannes Weiner <hannes@cmpxchg.org>
      Cc: Arjan van de Ven <arjan@linux.intel.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: Hugh Dickins <hugh@veritas.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      0f6f49a8