linux-stable/arch/xtensa
Max Filippov 01fb21bf24 xtensa: fix coprocessor part of ptrace_{get,set}xregs
commit 38a35a78c5 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: Max Filippov <jcmvbkbc@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-12-05 19:32:06 +01:00
..
boot xtensa: add NOTES section to the linker script 2018-11-21 09:19:16 +01:00
configs xtensa: drop unused {CONFIG,PLATFORM}_DEFAULT_MEM_SIZE 2018-08-20 12:27:52 -07:00
include xtensa: make sure bFLT stack is 16 byte aligned 2018-11-21 09:19:16 +01:00
kernel xtensa: fix coprocessor part of ptrace_{get,set}xregs 2018-12-05 19:32:06 +01:00
lib xtensa: add support for KASAN 2017-12-16 22:37:12 -08:00
mm mm: convert return type of handle_mm_fault() caller to vm_fault_t 2018-08-17 16:20:28 -07:00
oprofile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
platforms xtensa: ISS: don't allocate memory in platform_setup 2018-09-06 11:29:31 -07:00
variants xtensa: add test_kc705_be variant 2018-08-20 12:34:45 -07:00
Kconfig xtensa: enable SG chaining in Kconfig 2018-09-11 22:12:59 -07:00
Kconfig.debug Kconfig: consolidate the "Kernel hacking" menu 2018-08-02 08:06:48 +09:00
Makefile xtensa: remove unnecessary KBUILD_SRC ifeq conditional 2018-09-11 22:09:48 -07:00