1. 26 7月, 2008 1 次提交
  2. 29 4月, 2008 1 次提交
    • N
      Taint kernel after WARN_ON(condition) · 95b570c9
      Nur Hussein 提交于
      The kernel is sent to tainted within the warn_on_slowpath() function, and
      whenever a warning occurs the new taint flag 'W' is set.  This is useful to
      know if a warning occurred before a BUG by preserving the warning as a flag
      in the taint state.
      
      This does not work on architectures where WARN_ON has its own definition.
      These archs are:
      	1. s390
      	2. superh
      	3. avr32
      	4. parisc
      
      The maintainers of these architectures have been added in the Cc: list
      in this email to alert them to the situation.
      
      The documentation in oops-tracing.txt has been updated to include the
      new flag.
      Signed-off-by: NNur Hussein <nurhussein@gmail.com>
      Cc: Arjan van de Ven <arjan@infradead.org>
      Cc: "Randy.Dunlap" <rdunlap@xenotime.net>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Kyle McMartin <kyle@mcmartin.ca>
      Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
      Cc: Haavard Skinnemoen <hskinnemoen@atmel.com>
      Cc: Paul Mundt <lethal@linux-sh.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      95b570c9
  3. 07 2月, 2008 1 次提交
  4. 30 1月, 2008 2 次提交
    • A
      debug: add the end-of-trace marker and the module list to · 71c33911
      Arjan van de Ven 提交于
      Unlike oopses, WARN_ON() currently does't print the loaded modules list.
      This makes it harder to take action on certain bug reports. For example,
      recently there were a set of WARN_ON()s reported in the mac80211 stack,
      which were just signalling a driver bug. It takes then anther round trip
      to the bug reporter (if he responds at all) to find out which driver
      is at fault.
      
      Another issue is that, unlike oopses, WARN_ON() doesn't currently printk
      the helpful "cut here" line, nor the "end of trace" marker.
      Now that WARN_ON() is out of line, the size increase due to this is
      minimal and it's worth adding.
      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>
      71c33911
    • A
      debug: move WARN_ON() out of line · 79b4cc5e
      Arjan van de Ven 提交于
      A quick grep shows that there are currently 1145 instances of WARN_ON
      in the kernel. Currently, WARN_ON is pretty much entirely inlined,
      which makes it hard to enhance it without growing the size of the kernel
      (and getting Andrew unhappy).
      
      This patch build on top of Olof's patch that introduces __WARN,
      and places the slowpath out of line. It also uses Ingo's suggestion
      to not use __FUNCTION__ but to use kallsyms to do the lookup;
      this saves a ton of extra space since gcc doesn't need to store the function
      string twice now:
      
      3936367  833603  624736 5394706  525112 vmlinux.before
      3917508  833603  624736 5375847  520767 vmlinux-slowpath
      
      15Kb savings...
      Signed-off-by: NArjan van de Ven <arjan@linux.intel.com>
      CC: Andrew Morton <akpm@linux-foundation.org>
      CC: Olof Johansson <olof@lixom.net>
      Acked-by: NMatt Meckall <mpm@selenic.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      79b4cc5e
  5. 20 12月, 2007 1 次提交
    • A
      debug: add end-of-oops marker · 2c3b20e9
      Arjan van de Ven 提交于
      Right now it's nearly impossible for parsers that collect kernel crashes
      from logs or emails (such as www.kerneloops.org) to detect the
      end-of-oops condition. In addition, it's not currently possible to
      detect whether or not 2 oopses that look alike are actually the same
      oops reported twice, or are truly two unique oopses.
      
      This patch adds an end-of-oops marker, and makes the end marker include
      a very simple 64-bit random ID to be able to detect duplicate reports.
      
      Normally, this ID is calculated as a late_initcall() (in the hope that
      at that time there is enough entropy to get a unique enough ID); however
      for early oopses the oops_exit() function needs to generate the ID on
      the fly.
      
      We do this all at the _end_ of an oops printout, so this does not impact
      our ability to get the most important portions of a crash out to the
      console first.
      
      [ Sidenote: the already existing oopses-since-bootup counter we print
        during crashes serves as the differentiator between multiple oopses
        that trigger during the same bootup. ]
      
      Tested on 32-bit and 64-bit x86. Artificially injected very early
      crashes as well, as expected they result in this constant ID after
      multiple bootups:
      
        ---[ end trace ca143223eefdc828 ]---
        ---[ end trace ca143223eefdc828 ]---
      
      because the random pools are still all zero. But it all still works
      fine and causes no additional problems (which is the main goal of
      instrumentation code).
      Signed-off-by: NArjan van de Ven <arjan@linux.intel.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      2c3b20e9
  6. 20 10月, 2007 1 次提交
  7. 19 10月, 2007 1 次提交
  8. 18 7月, 2007 1 次提交
  9. 12 2月, 2007 1 次提交
  10. 30 9月, 2006 1 次提交
  11. 26 9月, 2006 2 次提交
    • A
      [PATCH] Add the __stack_chk_fail() function · 3162f751
      Arjan van de Ven 提交于
      GCC emits a call to a __stack_chk_fail() function when the stack canary is
      not matching the expected value.
      
      Since this is a bad security issue; lets panic the kernel rather than limping
      along; the kernel really can't be trusted anymore when this happens.
      Signed-off-by: NArjan van de Ven <arjan@linux.intel.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      Signed-off-by: NAndi Kleen <ak@suse.de>
      CC: Andi Kleen <ak@suse.de>
      3162f751
    • D
      [PATCH] x86: Allow users to force a panic on NMI · 8da5adda
      Don Zickus 提交于
      To quote Alan Cox:
      
      The default Linux behaviour on an NMI of either memory or unknown is to
      continue operation. For many environments such as scientific computing
      it is preferable that the box is taken out and the error dealt with than
      an uncorrected parity/ECC error get propogated.
      
      A small number of systems do generate NMI's for bizarre random reasons
      such as power management so the default is unchanged. In other respects
      the new proc/sys entry works like the existing panic controls already in
      that directory.
      
      This is separate to the edac support - EDAC allows supported chipsets to
      handle ECC errors well, this change allows unsupported cases to at least
      panic rather than cause problems further down the line.
      Signed-off-by: NDon Zickus <dzickus@redhat.com>
      Signed-off-by: NAndi Kleen <ak@suse.de>
      8da5adda
  12. 07 9月, 2006 1 次提交
  13. 15 8月, 2006 1 次提交
  14. 11 7月, 2006 1 次提交
    • A
      [PATCH] lockdep: disable lock debugging when kernel state becomes untrusted · 2c16e9c8
      Arjan van de Ven 提交于
      Disable lockdep debugging in two situations where the integrity of the
      kernel no longer is guaranteed: when oopsing and when hitting a
      tainting-condition.  The goal is to not get weird lockdep traces that don't
      make sense or are otherwise undebuggable, to not waste time.
      
      Lockdep assumes that the previous state it knows about is valid to operate,
      which is why lockdep turns itself off after the first violation it reports,
      after that point it can no longer make that assumption.
      
      A kernel oops means that the integrity of the kernel compromised; in
      addition anything lockdep would report is of lesser importance than the
      oops.
      
      All the tainting conditions are of similar integrity-violating nature and
      also make debugging/diagnosing more difficult.
      Signed-off-by: NArjan van de Ven <arjan@linux.intel.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      2c16e9c8
  15. 01 7月, 2006 1 次提交
  16. 11 4月, 2006 1 次提交
  17. 28 3月, 2006 1 次提交
    • A
      [PATCH] Notifier chain update: API changes · e041c683
      Alan Stern 提交于
      The kernel's implementation of notifier chains is unsafe.  There is no
      protection against entries being added to or removed from a chain while the
      chain is in use.  The issues were discussed in this thread:
      
          http://marc.theaimsgroup.com/?l=linux-kernel&m=113018709002036&w=2
      
      We noticed that notifier chains in the kernel fall into two basic usage
      classes:
      
      	"Blocking" chains are always called from a process context
      	and the callout routines are allowed to sleep;
      
      	"Atomic" chains can be called from an atomic context and
      	the callout routines are not allowed to sleep.
      
      We decided to codify this distinction and make it part of the API.  Therefore
      this set of patches introduces three new, parallel APIs: one for blocking
      notifiers, one for atomic notifiers, and one for "raw" notifiers (which is
      really just the old API under a new name).  New kinds of data structures are
      used for the heads of the chains, and new routines are defined for
      registration, unregistration, and calling a chain.  The three APIs are
      explained in include/linux/notifier.h and their implementation is in
      kernel/sys.c.
      
      With atomic and blocking chains, the implementation guarantees that the chain
      links will not be corrupted and that chain callers will not get messed up by
      entries being added or removed.  For raw chains the implementation provides no
      guarantees at all; users of this API must provide their own protections.  (The
      idea was that situations may come up where the assumptions of the atomic and
      blocking APIs are not appropriate, so it should be possible for users to
      handle these things in their own way.)
      
      There are some limitations, which should not be too hard to live with.  For
      atomic/blocking chains, registration and unregistration must always be done in
      a process context since the chain is protected by a mutex/rwsem.  Also, a
      callout routine for a non-raw chain must not try to register or unregister
      entries on its own chain.  (This did happen in a couple of places and the code
      had to be changed to avoid it.)
      
      Since atomic chains may be called from within an NMI handler, they cannot use
      spinlocks for synchronization.  Instead we use RCU.  The overhead falls almost
      entirely in the unregister routine, which is okay since unregistration is much
      less frequent that calling a chain.
      
      Here is the list of chains that we adjusted and their classifications.  None
      of them use the raw API, so for the moment it is only a placeholder.
      
        ATOMIC CHAINS
        -------------
      arch/i386/kernel/traps.c:		i386die_chain
      arch/ia64/kernel/traps.c:		ia64die_chain
      arch/powerpc/kernel/traps.c:		powerpc_die_chain
      arch/sparc64/kernel/traps.c:		sparc64die_chain
      arch/x86_64/kernel/traps.c:		die_chain
      drivers/char/ipmi/ipmi_si_intf.c:	xaction_notifier_list
      kernel/panic.c:				panic_notifier_list
      kernel/profile.c:			task_free_notifier
      net/bluetooth/hci_core.c:		hci_notifier
      net/ipv4/netfilter/ip_conntrack_core.c:	ip_conntrack_chain
      net/ipv4/netfilter/ip_conntrack_core.c:	ip_conntrack_expect_chain
      net/ipv6/addrconf.c:			inet6addr_chain
      net/netfilter/nf_conntrack_core.c:	nf_conntrack_chain
      net/netfilter/nf_conntrack_core.c:	nf_conntrack_expect_chain
      net/netlink/af_netlink.c:		netlink_chain
      
        BLOCKING CHAINS
        ---------------
      arch/powerpc/platforms/pseries/reconfig.c:	pSeries_reconfig_chain
      arch/s390/kernel/process.c:		idle_chain
      arch/x86_64/kernel/process.c		idle_notifier
      drivers/base/memory.c:			memory_chain
      drivers/cpufreq/cpufreq.c		cpufreq_policy_notifier_list
      drivers/cpufreq/cpufreq.c		cpufreq_transition_notifier_list
      drivers/macintosh/adb.c:		adb_client_list
      drivers/macintosh/via-pmu.c		sleep_notifier_list
      drivers/macintosh/via-pmu68k.c		sleep_notifier_list
      drivers/macintosh/windfarm_core.c	wf_client_list
      drivers/usb/core/notify.c		usb_notifier_list
      drivers/video/fbmem.c			fb_notifier_list
      kernel/cpu.c				cpu_chain
      kernel/module.c				module_notify_list
      kernel/profile.c			munmap_notifier
      kernel/profile.c			task_exit_notifier
      kernel/sys.c				reboot_notifier_list
      net/core/dev.c				netdev_chain
      net/decnet/dn_dev.c:			dnaddr_chain
      net/ipv4/devinet.c:			inetaddr_chain
      
      It's possible that some of these classifications are wrong.  If they are,
      please let us know or submit a patch to fix them.  Note that any chain that
      gets called very frequently should be atomic, because the rwsem read-locking
      used for blocking chains is very likely to incur cache misses on SMP systems.
      (However, if the chain's callout routines may sleep then the chain cannot be
      atomic.)
      
      The patch set was written by Alan Stern and Chandra Seetharaman, incorporating
      material written by Keith Owens and suggestions from Paul McKenney and Andrew
      Morton.
      
      [jes@sgi.com: restructure the notifier chain initialization macros]
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NChandra Seetharaman <sekharan@us.ibm.com>
      Signed-off-by: NJes Sorensen <jes@sgi.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      e041c683
  18. 23 3月, 2006 1 次提交
    • A
      [PATCH] pause_on_oops command line option · dd287796
      Andrew Morton 提交于
      Attempt to fix the problem wherein people's oops reports scroll off the screen
      due to repeated oopsing or to oopses on other CPUs.
      
      If this happens the user can reboot with the `pause_on_oops=<seconds>' option.
      It will allow the first oopsing CPU to print an oops record just a single
      time.  Second oopsing attempts, or oopses on other CPUs will cause those CPUs
      to enter a tight loop until the specified number of seconds have elapsed.
      
      The patch implements the infrastructure generically in the expectation that
      architectures other than x86 will find it useful.
      
      Cc: Dave Jones <davej@codemonkey.org.uk>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      dd287796
  19. 11 2月, 2006 1 次提交
  20. 07 1月, 2006 1 次提交
  21. 27 7月, 2005 1 次提交
  22. 26 6月, 2005 2 次提交
  23. 25 4月, 2005 1 次提交
  24. 17 4月, 2005 1 次提交
    • L
      Linux-2.6.12-rc2 · 1da177e4
      Linus Torvalds 提交于
      Initial git repository build. I'm not bothering with the full history,
      even though we have it. We can create a separate "historical" git
      archive of that later if we want to, and in the meantime it's about
      3.2GB when imported into git - space that would just make the early
      git days unnecessarily complicated, when we don't have a lot of good
      infrastructure for it.
      
      Let it rip!
      1da177e4