android_kernel_xiaomi_sm7250/arch/nios2/kernel
Al Viro 8cae08d732 nios2: add force_successful_syscall_return()
commit fd0c153daad135d0ec1a53c5dbe6936a724d6ae1 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:15:40 +02:00
..
.gitignore nios2: add .gitignore entries for auto-generated files 2017-05-08 16:59:19 +08:00
asm-offsets.c nios2: asm-offsets: Remove unused definition TI_TASK 2014-12-08 12:56:12 +08:00
cpuinfo.c nios2: Add CDX support 2017-05-08 16:59:19 +08:00
entry.S nios2: add force_successful_syscall_return() 2022-08-25 11:15:40 +02:00
head.S
insnemu.S nios2: Traps exception handling 2014-12-08 12:55:50 +08:00
irq.c nios2: constify irq_domain_ops 2017-05-08 16:59:19 +08:00
kgdb.c nios2: add kgdb support 2015-02-16 19:26:43 +08:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
misaligned.c nios2: remove unused statistic counters 2015-09-08 01:32:34 +08:00
module.c module: remove mod arg from module_free, rename module_memfree(). 2015-01-20 11:38:33 +10:30
nios2_ksyms.c nios2: ksyms: Add missing symbol exports 2020-01-27 14:50:30 +01:00
process.c sched/headers: Prepare to remove the <linux/mm_types.h> dependency from <linux/sched.h> 2017-03-02 08:42:37 +01:00
prom.c nios2: remove arch specific early_init_dt_alloc_memory_arch 2018-01-30 11:17:12 -06:00
ptrace.c sched/headers: Prepare for new header dependencies before moving code to <linux/sched/task_stack.h> 2017-03-02 08:42:36 +01:00
setup.c nios2: remove custom early console implementation 2017-05-11 17:44:21 +08:00
signal.c nios2: restarts apply only to the first sigframe we build... 2022-08-25 11:15:40 +02:00
sys_nios2.c nios2: System calls handling 2014-12-08 12:55:58 +08:00
syscall_table.c nios2: don't leave NULLs in sys_call_table[] 2022-08-25 11:15:40 +02:00
time.c nios2: Use read_persistent_clock64() instead of read_persistent_clock() 2018-04-03 00:36:55 +08:00
traps.c signal/nios2: Use force_sig_fault where appropriate 2018-04-25 10:44:04 -05:00
vmlinux.lds.S nmi_backtrace: generate one-line reports for idle cpus 2016-10-07 18:46:30 -07:00