linux-stable/arch/nios2
Al Viro a2e1f07e3f nios2: add force_successful_syscall_return()
commit fd0c153daa upstream.

If we use the ancient SysV syscall ABI, we'd better have tell the
kernel how to claim that a negative return value is a success.
Use ->orig_r2 for that - it's inaccessible via ptrace, so it's
a fair game for changes and it's normally[*] non-negative on return
from syscall.  Set to -1; syscall is not going to be restart-worthy
by definition, so we won't interfere with that use either.

[*] the only exception is rt_sigreturn(), where we skip the entire
messing with r1/r2 anyway.

Fixes: 82ed08dd1b ("nios2: Exception handling")
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Dinh Nguyen <dinguyen@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-08-25 11:11:34 +02:00
..
boot .gitignore: move *.dtb and *.dtb.S patterns to the top-level .gitignore 2018-02-13 10:19:46 +01:00
configs treewide: Remove remaining executable attributes from source files 2017-02-25 12:12:50 -08:00
include nios2: add force_successful_syscall_return() 2022-08-25 11:11:34 +02:00
kernel nios2: add force_successful_syscall_return() 2022-08-25 11:11:34 +02:00
lib nios2: memset: use the right constraint modifier for the %4 output operand 2016-04-27 16:35:55 +08:00
mm License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
platform nios2: Make NIOS2_DTB_SOURCE_BOOL depend on !COMPILE_TEST 2021-11-02 18:25:12 +01:00
Kconfig License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
Kconfig.debug License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
Makefile nios2: Add CDX support 2017-05-08 16:59:19 +08:00