android_kernel_motorola_sm6225/arch/arc
Vineet Gupta f2f1b3a34f 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-30 08:48:24 -04:00
..
boot ARC: [plat-hsdk]: Switch ethernet phy-mode to rgmii-id 2020-09-17 13:45:25 +02:00
configs ARC: enable uboot support unconditionally 2019-08-06 19:06:57 +02:00
include ARCv2: save ABI registers across signal handling 2021-06-30 08:48:24 -04:00
kernel ARCv2: save ABI registers across signal handling 2021-06-30 08:48:24 -04:00
lib ARCv2: lib: memcpy: fix doing prefetchw outside of buffer 2019-03-23 20:09:51 +01:00
mm ARC: IOC: panic if kernel was started with previously enabled IOC 2019-12-13 08:51:12 +01:00
oprofile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
plat-axs10x ARC: [plat-axs103] refactor the quad core DT quirk code 2017-12-20 12:41:45 -08:00
plat-eznps irqchip/eznps: Fix build error for !ARC700 builds 2020-09-17 13:45:25 +02:00
plat-hsdk arc: plat-hsdk: fix kconfig dependency warning when !RESET_CONTROLLER 2020-10-29 09:55:17 +01:00
plat-sim ARC: [plat-sim] Include this platform unconditionally 2017-08-04 13:49:47 +05:30
plat-tb10x arc: select GPIOLIB directly 2016-04-26 14:07:59 +02:00
Kbuild
Kconfig ARC: enable uboot support unconditionally 2019-08-06 19:06:57 +02:00
Kconfig.debug Kconfig: consolidate the "Kernel hacking" menu 2018-08-02 08:06:48 +09:00
Makefile ARC: build: add boot_targets to PHONY 2021-01-19 18:22:36 +01:00