kernel-hacking-2024-linux-s.../arch/arc
Vineet Gupta cbfe74a753 ARCv2: STAR 9000950267: Handle return from intr to Delay Slot #2
Returning to delay slot, riding an interrupti, had one loose end.
AUX_USER_SP used for restoring user mode SP upon RTIE was not being
setup from orig task's saved value, causing task to use wrong SP,
leading to ProtV errors.

The reason being:
 - INTERRUPT_EPILOGUE returns to a kernel trampoline, thus not expected to restore it
 - EXCEPTION_EPILOGUE is not used at all

Fix that by restoring AUX_USER_SP explicitly in the trampoline.

This was broken in the original workaround, but the error scenarios got
reduced considerably since v3.14 due to following:

 1. The Linuxthreads.old based userspace at the time caused many more
    exceptions in delay slot than the current NPTL based one.
    Infact with current userspace the error doesn't happen at all.

 2. Return from interrupt (delay slot or otherwise) doesn't get exercised much
    after commit 4de0e52867 ("Really Re-enable interrupts to avoid deadlocks")
    since IRQ_ACTIVE.active being clear means most returns are as if from pure
    kernel (even for active interrupts)

Infact the issue only happened in an experimental branch where I was tinkering with
reverted 4de0e52867

Cc: stable@kernel.org # v4.2+
Fixes: 4255b07f2c ("ARCv2: STAR 9000793984: Handle return from intr to Delay Slot")
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
2016-01-22 17:25:03 +05:30
..
boot ARC: [plat-sim] unbork non default CONFIG_LINUX_LINK_BASE 2015-12-17 11:06:43 +05:30
configs ARC: switch to arc-linux- CROSS_COMPILE prefix across all configs 2015-11-16 12:00:09 +05:30
include ARC: mm: fix building for MMU v2 2015-12-21 12:10:40 +05:30
kernel ARCv2: STAR 9000950267: Handle return from intr to Delay Slot #2 2016-01-22 17:25:03 +05:30
lib ARCv2: lib: memcpy: use local symbols 2015-11-03 17:33:00 +05:30
mm ARC: mm: HIGHMEM: Fix section mismatch splat 2015-12-21 12:10:40 +05:30
oprofile
plat-axs10x ARCv2: smp: [plat-*]: No need to explicitly call mcip_init_smp() 2015-10-28 16:13:41 +05:30
plat-sim ARC: remove extraneous header include 2015-11-14 13:11:38 +05:30
plat-tb10x
Kbuild
Kconfig ARC: [plat-sim] unbork non default CONFIG_LINUX_LINK_BASE 2015-12-17 11:06:43 +05:30
Kconfig.debug ARC: With earlycon in use, retire EARLY_PRINTK 2015-05-11 11:20:21 +05:30
Makefile ARC: Fix linking errors with CONFIG_MODULE + CONFIG_CC_OPTIMIZE_FOR_SIZE 2015-12-21 13:01:19 +05:30