summaryrefslogtreecommitdiffstats
path: root/arch/openrisc/kernel
diff options
context:
space:
mode:
authorStafford Horne <shorne@gmail.com>2020-04-22 20:24:11 +0900
committerSasha Levin <sashal@kernel.org>2020-06-29 20:07:53 -0400
commitd9f4137a16019edf7d0e8b07ae83921884b2f4c9 (patch)
tree8d4f66fece90bfd669d1542af14cc60fa6d90af8 /arch/openrisc/kernel
parent0e8108e0556b6353fd6ea0dda68ccba43d4ce8a2 (diff)
downloadlinux-stable-d9f4137a16019edf7d0e8b07ae83921884b2f4c9.tar.gz
linux-stable-d9f4137a16019edf7d0e8b07ae83921884b2f4c9.tar.bz2
linux-stable-d9f4137a16019edf7d0e8b07ae83921884b2f4c9.zip
openrisc: Fix issue with argument clobbering for clone/fork
[ Upstream commit 6bd140e14d9aaa734ec37985b8b20a96c0ece948 ] Working on the OpenRISC glibc port I found that sometimes clone was working strange. That the tls data argument sent in r7 was always wrong. Further investigation revealed that the arguments were getting clobbered in the entry code. This patch removes the code that writes to the argument registers. This was likely due to some old code hanging around. This patch fixes this up for clone and fork. This fork clobber is harmless but also useless so remove. Signed-off-by: Stafford Horne <shorne@gmail.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'arch/openrisc/kernel')
-rw-r--r--arch/openrisc/kernel/entry.S4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/openrisc/kernel/entry.S b/arch/openrisc/kernel/entry.S
index c17e8451d997..3fbe420f49c4 100644
--- a/arch/openrisc/kernel/entry.S
+++ b/arch/openrisc/kernel/entry.S
@@ -1092,13 +1092,13 @@ ENTRY(__sys_clone)
l.movhi r29,hi(sys_clone)
l.ori r29,r29,lo(sys_clone)
l.j _fork_save_extra_regs_and_call
- l.addi r7,r1,0
+ l.nop
ENTRY(__sys_fork)
l.movhi r29,hi(sys_fork)
l.ori r29,r29,lo(sys_fork)
l.j _fork_save_extra_regs_and_call
- l.addi r3,r1,0
+ l.nop
ENTRY(sys_rt_sigreturn)
l.j _sys_rt_sigreturn