1. 13 5月, 2008 2 次提交
  2. 11 5月, 2008 8 次提交
    • D
      sparc: Fix debugger syscall restart interactions. · 28e61036
      David S. Miller 提交于
      So, forever, we've had this ptrace_signal_deliver implementation
      which tries to handle all of the nasties that can occur when the
      debugger looks at a process about to take a signal.  It's meant
      to address all of these issues inside of the kernel so that the
      debugger need not be mindful of such things.
      
      Problem is, this doesn't work.
      
      The idea was that we should do the syscall restart business first, so
      that the debugger captures that state.  Otherwise, if the debugger for
      example saves the child's state, makes the child execute something
      else, then restores the saved state, we won't handle the syscall
      restart properly because we lose the "we're in a syscall" state.
      
      The code here worked for most cases, but if the debugger actually
      passes the signal through to the child unaltered, it's possible that
      we would do a syscall restart when we shouldn't have.
      
      In particular this breaks the case of debugging a process under a gdb
      which is being debugged by yet another gdb.  gdb uses sigsuspend
      to wait for SIGCHLD of the inferior, but if gdb itself is being
      debugged by a top-level gdb we get a ptrace_stop().  The top-level gdb
      does a PTRACE_CONT with SIGCHLD to let the inferior gdb see the
      signal.  But ptrace_signal_deliver() assumed the debugger would cancel
      out the signal and therefore did a syscall restart, because the return
      error was ERESTARTNOHAND.
      
      Fix this by simply making ptrace_signal_deliver() a nop, and providing
      a way for the debugger to control system call restarting properly:
      
      1) Report a "in syscall" software bit in regs->{tstate,psr}.
         It is set early on in trap entry to a system call and is fully
         visible to the debugger via ptrace() and regsets.
      
      2) Test this bit right before doing a syscall restart.  We have
         to do a final recheck right after get_signal_to_deliver() in
         case the debugger cleared the bit during ptrace_stop().
      
      3) Clear the bit in trap return so we don't accidently try to set
         that bit in the real register.
      
      As a result we also get a ptrace_{is,clear}_syscall() for sparc32 just
      like sparc64 has.
      
      M68K has this same exact bug, and is now the only other user of the
      ptrace_signal_deliver hook.  It needs to be fixed in the same exact
      way as sparc.
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      28e61036
    • D
      sparc: Fix ptrace() detach. · 986bef85
      David S. Miller 提交于
      Forever we had a PTRACE_SUNOS_DETACH which was unconditionally
      recognized, regardless of the personality of the process.
      
      Unfortunately, this value is what ended up in the GLIBC sys/ptrace.h
      header file on sparc as PTRACE_DETACH and PT_DETACH.
      
      So continue to recognize this old value.  Luckily, it doesn't conflict
      with anything we actually care about.
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      986bef85
    • L
      BKL: revert back to the old spinlock implementation · 8e3e076c
      Linus Torvalds 提交于
      The generic semaphore rewrite had a huge performance regression on AIM7
      (and potentially other BKL-heavy benchmarks) because the generic
      semaphores had been rewritten to be simple to understand and fair.  The
      latter, in particular, turns a semaphore-based BKL implementation into a
      mess of scheduling.
      
      The attempt to fix the performance regression failed miserably (see the
      previous commit 00b41ec2 'Revert
      "semaphore: fix"'), and so for now the simple and sane approach is to
      instead just go back to the old spinlock-based BKL implementation that
      never had any issues like this.
      
      This patch also has the advantage of being reported to fix the
      regression completely according to Yanmin Zhang, unlike the semaphore
      hack which still left a couple percentage point regression.
      
      As a spinlock, the BKL obviously has the potential to be a latency
      issue, but it's not really any different from any other spinlock in that
      respect.  We do want to get rid of the BKL asap, but that has been the
      plan for several years.
      
      These days, the biggest users are in the tty layer (open/release in
      particular) and Alan holds out some hope:
      
        "tty release is probably a few months away from getting cured - I'm
         afraid it will almost certainly be the very last user of the BKL in
         tty to get fixed as it depends on everything else being sanely locked."
      
      so while we're not there yet, we do have a plan of action.
      Tested-by: NYanmin Zhang <yanmin_zhang@linux.intel.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Andi Kleen <andi@firstfloor.org>
      Cc: Matthew Wilcox <matthew@wil.cx>
      Cc: Alexander Viro <viro@ftp.linux.org.uk>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      8e3e076c
    • I
      x86: rdc: leds build/config fix · 82fd8667
      Ingo Molnar 提交于
      select NEW_LEDS for now until the Kconfig dependencies have been
      fixed.
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      82fd8667
    • H
      x86: restrict keyboard io ports reservation to make ipmi driver work · 9096bd7a
      Helge Wagner 提交于
      On some of our (single board computer) boards (x86) we are using an
      IPMI controller that uses I/O ports 0x62 and 0x66 for a KCS (keyboard
      controller style) IPMI system interface.
      
      Trying to load the openipmi driver fails, because the ports
      (0x62/0x66) are reserved for keyboard. keyboard reserves the full
      range 0x60-0x6F while it doesn't need to.
      
      Reserve only ports 0x60 and 0x64 for the legacy PS/2 i8042 keyboad
      controller instead of 0x60-0x6F to allow the openipmi driver to work.
      
      [ tglx: added 64bit fixup ]
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      Acked-by: NH. Peter Anvin <hpa@zytor.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      9096bd7a
    • S
      x86: fix fpu restore from sig return · fd3c3ed5
      Suresh Siddha 提交于
      If the task never used fpu, initialize the fpu before restoring the FP
      state from the signal handler context. This will allocate the fpu
      state, if the task never needed it before.
      Reported-and-bisected-by: NEric Sesterhenn <snakebyte@gmx.de>
      Signed-off-by: NSuresh Siddha <suresh.b.siddha@intel.com>
      Tested-by: NEric Sesterhenn <snakebyte@gmx.de>
      Cc: Frederik Deweerdt <deweerdt@free.fr>
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      fd3c3ed5
    • Y
      x86: remove spew print out about bus to node mapping · 06461539
      Yinghai Lu 提交于
      Jeff Garzik pointed out that this printout is not needed.
      Signed-off-by: NYinghai Lu <yhlu.kernel@gmail.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      06461539
    • T
      x86: revert printk format warning change which is for linux-next · 5ecddceb
      Thomas Gleixner 提交于
      commit 62179849
          x86: fix setup printk format warning
      
      is for linux-next and not for .26
      Signed-off-by: NThomas Gleixner <tglx@linutronix.de>
      5ecddceb
  3. 10 5月, 2008 2 次提交
  4. 09 5月, 2008 17 次提交
  5. 08 5月, 2008 11 次提交