linux/arch/arc
Vineet Gupta 80c56699cf ARCv2: save ABI registers across signal handling
commit 96f1b00138cb8f04c742c82d0a7c460b2202e887 upstream.

ARCv2 has some configuration dependent registers (r30, r58, r59) which
could be targetted by the compiler. To keep the ABI stable, these were
unconditionally part of the glibc ABI
(sysdeps/unix/sysv/linux/arc/sys/ucontext.h:mcontext_t) however we
missed populating them (by saving/restoring them across signal
handling).

This patch fixes the issue by
 - adding arcv2 ABI regs to kernel struct sigcontext
 - populating them during signal handling

Change to struct sigcontext might seem like a glibc ABI change (although
it primarily uses ucontext_t:mcontext_t) but the fact is
 - it has only been extended (existing fields are not touched)
 - the old sigcontext was ABI incomplete to begin with anyways

Fixes: https://github.com/foss-for-synopsys-dwc-arc-processors/linux/issues/53
Cc: <stable@vger.kernel.org>
Tested-by: kernel test robot <lkp@intel.com>
Reported-by: Vladimir Isaev <isaev@synopsys.com>
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-06-23 14:41:29 +02:00
..
boot ARC: build: move symlink creation to arch/arc/Makefile to avoid race 2021-01-19 18:26:14 +01:00
configs
include ARCv2: save ABI registers across signal handling 2021-06-23 14:41:29 +02:00
kernel ARCv2: save ABI registers across signal handling 2021-06-23 14:41:29 +02:00
lib
mm ARC: mm: PAE: use 40-bit physical page mask 2021-05-19 10:08:29 +02:00
oprofile
plat-axs10x
plat-eznps irqchip/eznps: Fix build error for !ARC700 builds 2020-09-17 13:47:47 +02:00
plat-hsdk arc: plat-hsdk: fix kconfig dependency warning when !RESET_CONTROLLER 2020-10-29 09:57:47 +01:00
plat-sim
plat-tb10x
Kbuild
Kconfig
Kconfig.debug
Makefile ARC: build: move symlink creation to arch/arc/Makefile to avoid race 2021-01-19 18:26:14 +01:00