Skip to content
  1. May 13, 2008
  2. May 12, 2008
  3. May 11, 2008
    • David S. Miller's avatar
      sparc: Fix debugger syscall restart interactions. · 28e61036
      David S. Miller authored
      
      
      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: default avatarDavid S. Miller <davem@davemloft.net>
      28e61036
    • David S. Miller's avatar
      sparc: Fix ptrace() detach. · 986bef85
      David S. Miller authored
      
      
      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: default avatarDavid S. Miller <davem@davemloft.net>
      986bef85
    • Linus Torvalds's avatar
      Merge master.kernel.org:/home/rmk/linux-2.6-arm · 5bb7ff79
      Linus Torvalds authored
      * master.kernel.org:/home/rmk/linux-2.6-arm:
        [ARM] 5033/1: Unbreak corgi_ssp by registering ssp drivers earlier.
        [ARM] Orion: clean up addr-map.c after window setting code purge
        [ARM] Orion: pass proper t_clk into mv643xx_eth
        [ARM] Orion: use mv643xx_eth driver mbus window handling
        [ARM] pxa: Fix RCSR handling
        [ARM] lubbock: fix compilation
        [ARM] 5032/1: Added cpufreq support for pxa27x CPU
        [ARM] 5031/1: Indentation correction in cpu-pxa.c.
        [ARM] 5028/1: pxafb: fix broken "backward compatibility way" in framebuffer
        [ARM] 4882/2: Correction for S3C2410 clkout generation
        [ARM] 5027/1: Fixed random memory corruption on pxa suspend cycle.
        [ARM] 5024/1: Fix some minor clk issues in the MMCI PL18x driver
        [ARM] 5023/1: Fix broken gpio interrupts on ep93xx
        ns9xxx: fix sparse warning
        ns9xxx: check for irq lockups
        ns9xxx: fix handle_prio_irq to unmask irqs with lower priority
      5bb7ff79
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-x86 · 3e1b83ab
      Linus Torvalds authored
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-x86:
        x86: rdc: leds build/config fix
        x86: sysfs cpu?/topology is empty in 2.6.25 (32-bit Intel system)
        x86: revert commit 709f744f ("x86: bitops asm constraint fixes")
        x86: restrict keyboard io ports reservation to make ipmi driver work
        x86: fix fpu restore from sig return
        x86: remove spew print out about bus to node mapping
        x86: revert printk format warning change which is for linux-next
        x86: cleanup PAT cpu validation
        x86: geode: define geode_has_vsa2() even if CONFIG_MGEODE_LX is not set
        x86: GEODE: cache results from geode_has_vsa2() and uninline
        x86: revert geode config dependency
      3e1b83ab
    • Linus Torvalds's avatar
      BKL: revert back to the old spinlock implementation · 8e3e076c
      Linus Torvalds authored
      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: default avatarYanmin 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: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      8e3e076c
    • Linus Torvalds's avatar
      Revert "semaphore: fix" · 00b41ec2
      Linus Torvalds authored
      This reverts commit bf726eab, as it has
      been reported to cause a regression with processes stuck in __down(),
      apparently because some missing wakeup.
      
      Quoth Sven Wegener:
       "I'm currently investigating a regression that has showed up with my
        last git pull yesterday.  Bisecting the commits showed bf726e
        "semaphore: fix" to be the culprit, reverting it fixed the issue.
      
        Symptoms: During heavy filesystem usage (e.g.  a kernel compile) I get
        several compiler processes in uninterruptible sleep, blocking all i/o
        on the filesystem.  System is an Intel Core 2 Quad running a 64bit
        kernel and userspace.  Filesystem is xfs on top of lvm.  See below for
        the output of sysrq-w."
      
      See
      
      	http://lkml.org/lkml/2008/5/10/45
      
      for full report.
      
      In the meantime, we can just fix the BKL performance regression by
      reverting back to the good old BKL spinlock implementation instead,
      since any sleeping lock will generally perform badly, especially if it
      tries to be...
      00b41ec2
    • Linus Torvalds's avatar
      Make <asm-x86/spinlock.h> use ACCESS_ONCE() · 39f004ba
      Linus Torvalds authored
      
      
      ..instead of cooking up its own uglier local version of it.
      
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      39f004ba
    • Linus Torvalds's avatar
      Move ACCESS_ONCE() to <linux/compiler.h> · 9c3cdc1f
      Linus Torvalds authored
      
      
      It actually makes much more sense there, and we do tend to need it for
      non-RCU usage too.  Moving it to <linux/compiler.h> will allow some
      other cases that have open-coded the same logic to use the same helper
      function that RCU has used.
      
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      9c3cdc1f
    • Ingo Molnar's avatar
      x86: rdc: leds build/config fix · 82fd8667
      Ingo Molnar authored
      
      
      select NEW_LEDS for now until the Kconfig dependencies have been
      fixed.
      
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      82fd8667
    • Vaidyanathan Srinivasan's avatar
      x86: sysfs cpu?/topology is empty in 2.6.25 (32-bit Intel system) · 5c3a121d
      Vaidyanathan Srinivasan authored
      
      
      System topology on intel based system needs to be exported
      for non-numa case as well.
      
      All parts of asm-i386/topology.h has come under
      #ifdef CONFIG_NUMA after the merge to asm-x86/topology.h
      
      /sys/devices/system/cpu/cpu?/topology/* is populated based on
      ENABLE_TOPO_DEFINES
      
      The sysfs cpu topology is not being populated on my dual socket
      dual core xeon 5160 processor based (x86 32 bit) system.
      
      CONFIG_NUMA is not set in my case yet the topology is relevant
      and useful.
      
      irqbalance daemon application depends on topology to build the
      cpus and package list and it fails on Fedora9 beta since the
      sysfs topology was not being populated in the 2.6.25 kernel.
      
      I am not sure if it was intentional to not define ENABLE_TOPO_DEFINES
      for non-numa systems.
      
      This fix has been tested on the above mentioned dual core, dual socket
      system.
      
      Signed-off-by: default avatarVaidyanathan Srinivasan <svaidy@linux.vnet.ibm.com>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Cc: stable@kernel.org
      5c3a121d
    • Simon Holm Thøgersen's avatar
      x86: revert commit 709f744f ("x86: bitops asm constraint fixes") · eb2b4e68
      Simon Holm Thøgersen authored
      709f744f causes my computer to freeze during the start up of X and my
      login manger (GDM). It gets to the point where it has shown the default
      X mouse cursor logo (a big X / cross) and does not respond to anything
      from that point on.
      
      This worked fine before 709f744f, and it works fine with 709f744f
      reverted on top of Linus' current tree (f74d505b
      
      ). The revert had
      conflicts, as far as I can tell due to white space changes. The diff I
      ended up with is below.
      
      It is 100% reproducible.
      
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      eb2b4e68
    • Helge Wagner's avatar
      x86: restrict keyboard io ports reservation to make ipmi driver work · 9096bd7a
      Helge Wagner authored
      
      
      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: default avatarThomas Gleixner <tglx@linutronix.de>
      Acked-by: default avatarH. Peter Anvin <hpa@zytor.com>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      9096bd7a
    • Suresh Siddha's avatar
      x86: fix fpu restore from sig return · fd3c3ed5
      Suresh Siddha authored
      
      
      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: default avatarEric Sesterhenn <snakebyte@gmx.de>
      Signed-off-by: default avatarSuresh Siddha <suresh.b.siddha@intel.com>
      Tested-by: default avatarEric Sesterhenn <snakebyte@gmx.de>
      Cc: Frederik Deweerdt <deweerdt@free.fr>
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      fd3c3ed5
    • Yinghai Lu's avatar
      x86: remove spew print out about bus to node mapping · 06461539
      Yinghai Lu authored
      
      
      Jeff Garzik pointed out that this printout is not needed.
      
      Signed-off-by: default avatarYinghai Lu <yhlu.kernel@gmail.com>
      Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      06461539
    • Thomas Gleixner's avatar
      x86: revert printk format warning change which is for linux-next · 5ecddceb
      Thomas Gleixner authored
      commit 62179849
      
      
          x86: fix setup printk format warning
      
      is for linux-next and not for .26
      
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      5ecddceb
  4. May 10, 2008
  5. May 09, 2008
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6 · 26c5e98e
      Linus Torvalds authored
      * git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6:
        [CIFS] fix build warning
        [CIFS] Fixed build warning in is_ip
        [CIFS] cleanup cifsd completion
        [CIFS] Remove over-indented code in find_unc().
        [CIFS] fix typo
        [CIFS] Remove duplicate call to mode_to_acl
        [CIFS] convert usage of implicit booleans to bool
        [CIFS] fixed compatibility issue with samba refferal request
        [CIFS] Fix statfs formatting
        [CIFS] Adds to dns_resolver checking if the server name is an IP addr and skipping upcall in this case.
        [CIFS] Fix spelling mistake
        [CIFS] Update cifs version number
      26c5e98e
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6 · a9545ee3
      Linus Torvalds authored
      * git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6: (37 commits)
        SH: catch negative denormal_subf1() retval in denormal_add()
        sh: Fix DMAC base address for SH7709S
        sh: update smc91x platform data for se7206.
        sh: Stub in cpu_to_node() and friends for NUMA build.
        sh: intc register modify fix
        sh: no high level trigger on some sh3 cpus
        sh: clean up sh7710 and sh7720 intc tables
        sh: add interrupt ack code to sh3
        sh: unify external irq pin code for sh3
        sh-sci: avoid writing to nonexistent registers
        sh-sci: sh7722 lacks scsptr registers
        sh-sci: improve sh7722 support
        sh: reset hardware from early printk
        sh: drain and wait for early printk
        sh: use sci_out() for early printk
        sh: add memory resources to /proc/iomem
        sh: add kernel bss resource
        sh: fix sh7705 interrupt vector typo
        sh: update smc91x platform data for se7722
        sh: update smc91x platform data for MigoR
        ...
      a9545ee3
    • Linus Torvalds's avatar
    • Linus Torvalds's avatar
      Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc · d9a9a23f
      Linus Torvalds authored
      * 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc: (23 commits)
        [POWERPC] Remove leftover printk in isa-bridge.c
        [POWERPC] Remove duplicate #include
        [POWERPC] Initialize lockdep earlier
        [POWERPC] Document when printk is useable
        [POWERPC] Fix bogus paca->_current initialization
        [POWERPC] Fix of_i2c include for module compilation
        [POWERPC] Make default cputable entries reflect selected CPU family
        [POWERPC] spufs: lockdep annotations for spufs_dir_close
        [POWERPC] spufs: don't requeue victim contex in find_victim if it's not in spu_run
        [POWERPC] 4xx: Fix PCI mem in sequoia DTS
        [POWERPC] 4xx: Add endpoint support to 4xx PCIe driver
        [POWERPC] 4xx: Fix problem with new TLB storage attibute fields on 440x6 core
        [POWERPC] spufs: spu_create should send inotify IM_CREATE event
        [POWERPC] spufs: handle faults while the context switch pending flag is set
        [POWERPC] spufs: fix concurrent delivery of class 0 & 1 exceptions
        [POWERPC] spufs: try to route SPU interrupts to local node
        [POWERPC] spufs: set SPU_CONTEXT_SWITCH_PENDING before synchronising SPU irqs
        [POWERPC] spufs: don't acquire state_mutex interruptible while performing callback
        [POWERPC] spufs: update master runcntl with context lock held
        [POWERPC] spufs: fix post-stopped update of MFC_CNTL register
        ...
      d9a9a23f