1. 01 7月, 2006 1 次提交
  2. 27 6月, 2006 2 次提交
  3. 23 6月, 2006 2 次提交
    • C
      [PATCH] i386: extra checks in show_registers() · 7e04a118
      Chuck Ebbert 提交于
      Sometimes thread_info and task_struct get out-of-sync with each other.
      Printing task.thread_info in show_registers() can help spot this.  And when
      task_struct is corrupt then task.comm can contain garbage, so only print as
      many characters as it can hold.
      Signed-off-by: NChuck Ebbert <76306.1226@compuserve.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      7e04a118
    • I
      [PATCH] i386: break out of recursion in stackframe walk · b88d4f1d
      Ingo Molnar 提交于
      If CONFIG_FRAME_POINTERS is enabled, and one does a dump_stack() during
      early SMP init, an infinite stackdump and a bootup hang happens:
      
       [<c0104e7f>] show_trace+0xd/0xf
       [<c0104e96>] dump_stack+0x15/0x17
       [<c01440df>] save_trace+0xc3/0xce
       [<c014527d>] mark_lock+0x8c/0x4fe
       [<c0145df5>] __lockdep_acquire+0x44e/0xaa5
       [<c0146798>] lockdep_acquire+0x68/0x84
       [<c1048699>] _spin_lock+0x21/0x2f
       [<c010d918>] prepare_set+0xd/0x5d
       [<c010daa8>] generic_set_all+0x1d/0x201
       [<c010ca9a>] mtrr_ap_init+0x23/0x3b
       [<c010ada8>] identify_cpu+0x2a7/0x2af
       [<c01192a7>] smp_store_cpu_info+0x2f/0xb4
       [<c01197d0>] start_secondary+0xb5/0x3ec
       [<c104ec11>] end_of_stack_stop_unwind_function+0x1/0x4
       [<c104ec11>] end_of_stack_stop_unwind_function+0x1/0x4
       [<c104ec11>] end_of_stack_stop_unwind_function+0x1/0x4
       [<c104ec11>] end_of_stack_stop_unwind_function+0x1/0x4
       [<c104ec11>] end_of_stack_stop_unwind_function+0x1/0x4
       [<c104ec11>] end_of_stack_stop_unwind_function+0x1/0x4
       [<c104ec11>] end_of_stack_stop_unwind_function+0x1/0x4
       [<c104ec11>] end_of_stack_stop_unwind_function+0x1/0x4
       [...]
      
      Due to "end_of_stack_stop_unwind_function" recursing back to itself in the
      EBP stackframe-walker.  So avoid this type of recursion when walking the
      stack .
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      b88d4f1d
  4. 22 5月, 2006 1 次提交
  5. 11 4月, 2006 1 次提交
  6. 01 4月, 2006 1 次提交
    • O
      [PATCH] Don't pass boot parameters to argv_init[] · 9b41046c
      OGAWA Hirofumi 提交于
      The boot cmdline is parsed in parse_early_param() and
      parse_args(,unknown_bootoption).
      
      And __setup() is used in obsolete_checksetup().
      
      	start_kernel()
      		-> parse_args()
      			-> unknown_bootoption()
      				-> obsolete_checksetup()
      
      If __setup()'s callback (->setup_func()) returns 1 in
      obsolete_checksetup(), obsolete_checksetup() thinks a parameter was
      handled.
      
      If ->setup_func() returns 0, obsolete_checksetup() tries other
      ->setup_func().  If all ->setup_func() that matched a parameter returns 0,
      a parameter is seted to argv_init[].
      
      Then, when runing /sbin/init or init=app, argv_init[] is passed to the app.
      If the app doesn't ignore those arguments, it will warning and exit.
      
      This patch fixes a wrong usage of it, however fixes obvious one only.
      Signed-off-by: NOGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      9b41046c
  7. 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
  8. 27 3月, 2006 1 次提交
  9. 23 3月, 2006 6 次提交
  10. 06 2月, 2006 2 次提交
  11. 15 1月, 2006 1 次提交
  12. 11 1月, 2006 1 次提交
  13. 07 1月, 2006 3 次提交
  14. 05 1月, 2006 1 次提交
  15. 13 12月, 2005 1 次提交
  16. 31 10月, 2005 1 次提交
  17. 27 9月, 2005 1 次提交
  18. 14 9月, 2005 1 次提交
    • C
      [PATCH] i386: Ignore masked FPU exceptions · 33333373
      Chuck Ebbert 提交于
      Masked FPU exceptions should obviously not happen in the first place,
      but if they do, ignoring them seems to be the right thing to do.
      
      Although there is no documentation available for Cyrix MII, I did find
      erratum F-7 for Winchip C6, "FPU instruction may result in spurious
      exception under certain conditions" which seems to indicate that this
      can happen.
      
      That would also explain the behaviour Ondrej Zary reported on the MII.
      Signed-off-by: NChuck Ebbert <76306.1226@compuserve.com>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      33333373
  19. 08 9月, 2005 2 次提交
  20. 05 9月, 2005 3 次提交
    • G
      [PATCH] x86 NMI: better support for debuggers · 748f2edb
      George Anzinger 提交于
      This patch adds a notify to the die_nmi notify that the system is about to
      be taken down.  If the notify is handled with a NOTIFY_STOP return, the
      system is given a new lease on life.
      
      We also change the nmi watchdog to carry on if die_nmi returns.
      
      This give debug code a chance to a) catch watchdog timeouts and b) possibly
      allow the system to continue, realizing that the time out may be due to
      debugger activities such as single stepping which is usually done with
      "other" cpus held.
      
      Signed-off-by: George Anzinger<george@mvista.com>
      Cc: Keith Owens <kaos@ocs.com.au>
      Signed-off-by: NGeorge Anzinger <george@mvista.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      748f2edb
    • Z
      [PATCH] x86: privilege cleanup · 0998e422
      Zachary Amsden 提交于
      Privilege checking cleanup.  Originally, these diffs were much greater, but
      recent cleanups in Linux have already done much of the cleanup.  I added
      some explanatory comments in places where the reasoning behind certain
      tests is rather subtle.
      
      Also, in traps.c, we can skip the user_mode check in handle_BUG().  The
      reason is, there are only two call chains - one via die_if_kernel() and one
      via do_page_fault(), both entering from die().  Both of these paths already
      ensure that a kernel mode failure has happened.  Also, the original check
      here, if (user_mode(regs)) was insufficient anyways, since it would not
      rule out BUG faults from V8086 mode execution.
      
      Saving the %ss segment in show_regs() rather than assuming a fixed value
      also gives better information about the current kernel state in the
      register dump.
      Signed-off-by: NZachary Amsden <zach@vmware.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      0998e422
    • Z
      [PATCH] i386: inline assembler: cleanup and encapsulate descriptor and task register management · 4d37e7e3
      Zachary Amsden 提交于
      i386 inline assembler cleanup.
      
      This change encapsulates descriptor and task register management.  Also,
      it is possible to improve assembler generation in two cases; savesegment
      may store the value in a register instead of a memory location, which
      allows GCC to optimize stack variables into registers, and MOV MEM, SEG
      is always a 16-bit write to memory, making the casting in math-emu
      unnecessary.
      Signed-off-by: NZachary Amsden <zach@vmware.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      4d37e7e3
  21. 24 8月, 2005 1 次提交
    • C
      [PATCH] i386: fix incorrect FP signal code · b1daec30
      Chuck Ebbert 提交于
      i386 floating-point exception handling has a bug that can cause error
      code 0 to be sent instead of the proper code during signal delivery.
      
      This is caused by unconditionally checking the IS and c1 bits from the
      FPU status word when they are not always relevant.  The IS bit tells
      whether an exception is a stack fault and is only relevant when the
      exception is IE (invalid operation.) The C1 bit determines whether a
      stack fault is overflow or underflow and is only relevant when IS and IE
      are set.
      Signed-off-by: NChuck Ebbert <76306.1226@compuserve.com>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      b1daec30
  22. 26 6月, 2005 4 次提交
    • D
      3f3ae347
    • A
      [PATCH] kdump: Save trap information for later analysis · 4f339ecb
      Alexander Nyberg 提交于
      If we are faulting in kernel it is quite possible this will lead to a
      panic.  Save trap number, cr2 (in case of page fault) and error_code in the
      current thread (these fields already exist for signal delivery but are not
      used here).
      
      This helps later kdump crash analyzing from user-space (a script has been
      submitted to dig this info out in gdb).
      Signed-off-by: NAlexander Nyberg <alexn@telia.com>
      Cc: <fastboot@lists.osdl.org>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      4f339ecb
    • A
      [PATCH] kdump: Use real pt_regs from exception · 6e274d14
      Alexander Nyberg 提交于
      Makes kexec_crashdump() take a pt_regs * as an argument.  This allows to
      get exact register state at the point of the crash.  If we come from direct
      panic assertion NULL will be passed and the current registers saved before
      crashdump.
      
      This hooks into two places:
      die(): check the conditions under which we will panic when calling
      do_exit and go there directly with the pt_regs that caused the fatal
      fault.
      
      die_nmi(): If we receive an NMI lockup while in the kernel use the
      pt_regs and go directly to crash_kexec(). We're probably nested up badly
      at this point so this might be the only chance to escape with proper
      information.
      Signed-off-by: NAlexander Nyberg <alexn@telia.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      6e274d14
    • Z
      [PATCH] i386 CPU hotplug · f3705136
      Zwane Mwaikambo 提交于
      (The i386 CPU hotplug patch provides infrastructure for some work which Pavel
      is doing as well as for ACPI S3 (suspend-to-RAM) work which Li Shaohua
      <shaohua.li@intel.com> is doing)
      
      The following provides i386 architecture support for safely unregistering and
      registering processors during runtime, updated for the current -mm tree.  In
      order to avoid dumping cpu hotplug code into kernel/irq/* i dropped the
      cpu_online check in do_IRQ() by modifying fixup_irqs().  The difference being
      that on cpu offline, fixup_irqs() is called before we clear the cpu from
      cpu_online_map and a long delay in order to ensure that we never have any
      queued external interrupts on the APICs.  There are additional changes to s390
      and ppc64 to account for this change.
      
      1) Add CONFIG_HOTPLUG_CPU
      2) disable local APIC timer on dead cpus.
      3) Disable preempt around irq balancing to prevent CPUs going down.
      4) Print irq stats for all possible cpus.
      5) Debugging check for interrupts on offline cpus.
      6) Hacky fixup_irqs() to redirect irqs when cpus go off/online.
      7) play_dead() for offline cpus to spin inside.
      8) Handle offline cpus set in flush_tlb_others().
      9) Grab lock earlier in smp_call_function() to prevent CPUs going down.
      10) Implement __cpu_disable() and __cpu_die().
      11) Enable local interrupts in cpu_enable() after fixup_irqs()
      12) Don't fiddle with NMI on dead cpu, but leave intact on other cpus.
      13) Program IRQ affinity whilst cpu is still in cpu_online_map on offline.
      Signed-off-by: NZwane Mwaikambo <zwane@linuxpower.ca>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      f3705136
  23. 24 6月, 2005 2 次提交