• Max Filippov's avatar
    xtensa: fix coprocessor part of ptrace_{get,set}xregs · d36e4ee3
    Max Filippov authored
    commit 38a35a78c5e270cbe53c4fef6b0d3c2da90dd849 upstream.
    
    Layout of coprocessor registers in the elf_xtregs_t and
    xtregs_coprocessor_t may be different due to alignment. Thus it is not
    always possible to copy data between the xtregs_coprocessor_t structure
    and the elf_xtregs_t and get correct values for all registers.
    Use a table of offsets and sizes of individual coprocessor register
    groups to do coprocessor context copying in the ptrace_getxregs and
    ptrace_setxregs.
    This fixes incorrect coprocessor register values reading from the user
    process by the native gdb on an xtensa core with multiple coprocessors
    and registers with high alignment requirements.
    
    Cc: stable@vger.kernel.org
    Signed-off-by: default avatarMax Filippov <jcmvbkbc@gmail.com>
    Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
    d36e4ee3
Name
Last commit
Last update
..
boot Loading commit data...
configs Loading commit data...
include Loading commit data...
kernel Loading commit data...
lib Loading commit data...
mm Loading commit data...
oprofile Loading commit data...
platforms Loading commit data...
variants Loading commit data...
Kconfig Loading commit data...
Kconfig.debug Loading commit data...
Makefile Loading commit data...