1. 08 Mar, 2008 1 commit
    • Roland McGrath's avatar
      x86_64: make ptrace always sign-extend orig_ax to 64 bits · 84c6f604
      Roland McGrath authored
      This makes 64-bit ptrace calls setting the 64-bit orig_ax field for a
      32-bit task sign-extend the low 32 bits up to 64.  This matches what a
      64-bit debugger expects when tracing a 32-bit task.
      
      This follows on my "x86_64 ia32 syscall restart fix".  This didn't
      matter until that was fixed.
      
      The debugger ignores or zeros the high half of every register slot it
      sets (including the orig_rax pseudo-register) uniformly.  It expects
      that the setting of the low 32 bits always has the same meaning as a
      32-bit debugger setting those same 32 bits with native 32-bit
      facilities.
      
      This never arose before because the syscall restart check never
      matched any -ERESTART* values due to lack of sign extension.  Before
      that fix, even 32-bit ptrace setting orig_eax to -1 failed to trigger
      the restart check anyway.  So this was never noticed as a regression
      of 64-bit debuggers vs 32-bit debuggers on the same 64-bit kernel.
      Signed-off-by: default avatarRoland McGrath <roland@redhat.com>
      [ Changed to just do the sign-extension unconditionally on x86-64,
        since orig_ax is always just a small integer and doesn't need
        the full 64-bit range ]
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      84c6f604
  2. 07 Mar, 2008 37 commits
  3. 06 Mar, 2008 2 commits
    • Harvey Harrison's avatar
      [IA64] kprobes arch consolidation build fix · 45e18c22
      Harvey Harrison authored
      ia64 named their handler kprobes_fault_handler while all other
      arches used kprobe_fault_handler.  Change the function definition
      and header declaration.
      Signed-off-by: default avatarHarvey Harrison <harvey.harrison@gmail.com>
      Signed-off-by: default avatarTony Luck <tony.luck@intel.com>
      45e18c22
    • Simon Horman's avatar
      [IA64] update efi region debugging to use MB, GB and TB as well as KB · 818c7e86
      Simon Horman authored
      When EFI_DEBUG is defined to a non-zero value in arch/ia64/kernel/efi.c,
      the efi memory regions are displayed. This patch enhances the
      display code in a few ways:
      
      1. Use TB, GB and MB as well as KB as units.
         Although this introduces rounding errors (KB doesn't as
         size is always a multiple of 4Kb), it does make
         things a lot more readable.
      
         Also as the range is also shown, it is possible to note the exact size
         if it is important. In my experience, the size field is mostly useful
         for getting a general idea of the size of a region.
      
         On the rx2620 that I use, there actually is an 8TB region (though not
         backed by physical memory, and 8TB really is a lot more readable than
         8589934592KB.
      
      2. pad the size field with leading spaces to further improve readability
      
         ...
         ... (   8MB)
         ... ( 928MB)
         ... (   3MB)
         ...
      
         vs
      
         ...
         ... (8MB)
         ... (928MB)
         ... (3MB)
         ...
      
      3. Pad the attr field out to 64bits using leading zeros,
         to further improve readability.
      
         ...
         mem05: type= 2, attr=0x0000000000000008, range=[0x0000000004000000-0x000000000481f000) (   8MB)
         mem06: type= 7, attr=0x0000000000000008, range=[0x000000000481f000-0x000000003e876000) ( 928MB)
         mem07: type= 5, attr=0x8000000000000008, range=[0x000000003e876000-0x000000003eb8e000) (   3MB)
         mem08: type= 4, attr=0x0000000000000008, range=[0x000000003eb8e000-0x000000003ee7a000) (   2MB)
         ...
      
         ...
         mem05: type= 2, attr=0x8, range=[0x0000000004000000-0x000000000481f000) (   8MB)
         mem06: type= 7, attr=0x8, range=[0x000000000481f000-0x000000003e876000) ( 928MB)
         mem07: type= 5, attr=0x8000000000000008, range=[0x000000003e876000-0x000000003eb8e000) (   3MB)
         mem08: type= 4, attr=0x8, range=[0x000000003eb8e000-0x000000003ee7a000) (   2MB)
         ...
      
      4. Use %d instead of %u for the index field, as i is a signed int.
      
      N.B: This code is not compiled unless EFI_DEBUG is non 0.
      Signed-off-by: default avatarSimon Horman <horms@verge.net.au>
      Signed-off-by: default avatarTony Luck <tony.luck@intel.com>
      818c7e86