• Roland McGrath's avatar
    x86_64: ia32 ptrace THREAD_AREA fix · fd181c72
    Roland McGrath authored
    The addr argument to PTRACE_GET_THREAD_AREA and PTRACE_SET_THREAD_AREA is
    not a magic constant.  It's derived from the segment register values being
    used, which are computed originally from the index used with set_thread_area.
    The value does not need to match what a native i386 kernel would accept.
    It needs to match the segment selectors that can actually be in use in this
    32-bit process.  The 64-bit ptrace support for PTRACE_GET_THREAD_AREA
    (normally used only on 32-bit processes) is correct, but the 32-bit emulation
    of ptrace is broken.
    Signed-off-by: default avatarRoland McGrath <roland@redhat.com>
    Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
    fd181c72
ptrace32.c 9.45 KB