linux/arch/xtensa
Max Filippov 8dc4dd2c7b 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.

Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
[bwh: Backported to 3.16: adjust context]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
History 2019-02-11 17:54:14 +00:00
..
boot xtensa: add NOTES section to the linker script 2019-02-11 17:53:44 +00:00
configs Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2014-04-12 14:49:50 -07:00
include xtensa: make sure bFLT stack is 16 byte aligned 2019-02-11 17:53:48 +00:00
kernel xtensa: fix coprocessor part of ptrace_{get,set}xregs 2019-02-11 17:54:14 +00:00
lib xtensa: fixes for configs without loop option 2015-12-13 17:49:02 +00:00
mm xtensa: mm/cache: add missing EXPORT_SYMBOLs 2017-11-11 13:33:12 +00:00
oprofile xtensa: fix oprofile building as module 2013-05-09 01:07:09 -07:00
platforms xtensa: ISS: don't hang if stdin EOF is reached 2016-05-01 00:05:57 +02:00
variants xtensa: fsf: drop nonexistent GPIO32 support 2014-02-21 21:33:40 +04:00
Kconfig xtensa: xtfpga: fix hardware lockup caused by LCD driver 2015-05-04 16:06:36 +01:00
Kconfig.debug xtensa: check TLB sanity on return to userspace 2013-07-08 01:18:56 -07:00
Makefile xtensa: don't use echo -e needlessly 2013-09-06 09:48:29 -07:00