1. 03 Jan, 2011 3 commits
  2. 01 Jan, 2011 1 commit
  3. 30 Dec, 2010 3 commits
  4. 29 Dec, 2010 3 commits
  5. 24 Dec, 2010 4 commits
  6. 23 Dec, 2010 5 commits
  7. 21 Dec, 2010 5 commits
  8. 20 Dec, 2010 9 commits
  9. 19 Dec, 2010 3 commits
  10. 18 Dec, 2010 3 commits
  11. 17 Dec, 2010 1 commit
    • Chris Metcalf's avatar
      arch/tile: handle rt_sigreturn() more cleanly · 81711cee
      Chris Metcalf authored
      The current tile rt_sigreturn() syscall pattern uses the common idiom
      of loading up pt_regs with all the saved registers from the time of
      the signal, then anticipating the fact that we will clobber the ABI
      "return value" register (r0) as we return from the syscall by setting
      the rt_sigreturn return value to whatever random value was in the pt_regs
      for r0.
      
      However, this breaks in our 64-bit kernel when running "compat" tasks,
      since we always sign-extend the "return value" register to properly
      handle returned pointers that are in the upper 2GB of the 32-bit compat
      address space.  Doing this to the sigreturn path then causes occasional
      random corruption of the 64-bit r0 register.
      
      Instead, we stop doing the crazy "load the return-value register"
      hack in sigreturn.  We already have some sigreturn-specific assembly
      code that we use to pass the pt_regs pointer to C code.  We extend that
      code to also set the link register to point to a spot a few instructions
      after the usual syscall return address so we don't clobber the saved r0.
      Now it no longer matters what the rt_sigreturn syscall returns, and the
      pt_regs structure can be cleanly and completely reloaded.
      Signed-off-by: default avatarChris Metcalf <cmetcalf@tilera.com>
      81711cee