openrisc: Add clone3 ABI wrapper
authorStafford Horne <shorne@gmail.com>
Fri, 3 Dec 2021 22:10:18 +0000 (07:10 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 27 Jan 2022 09:54:06 +0000 (10:54 +0100)
commite9e4d1fb4590956add5cc4cd01b6d471f4475489
tree83fdad6d5917b1390d800fb6e250340c90b3bdf3
parent551a785c26f6ff41cccd527e7bd9f032f91332c2
openrisc: Add clone3 ABI wrapper

[ Upstream commit 433fe39f674d58bc7a3e8254a5d2ffc290b7e04e ]

Like fork and clone the clone3 syscall needs a wrapper to save callee
saved registers, which is required by the OpenRISC ABI.  This came up
after auditing code following a discussion with Rob Landley and Arnd
Bergmann [0].

Tested with the clone3 kselftests and there were no issues.

[0] https://lore.kernel.org/all/41206fc7-f8ce-98aa-3718-ba3e1431e320@landley.net/T/#m9c0cdb2703813b9df4da04cf6b30de1f1aa89944

Fixes: 07e83dfbe16c ("openrisc: Enable the clone3 syscall")
Cc: Rob Landley <rob@landley.net>
Cc: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Stafford Horne <shorne@gmail.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/openrisc/include/asm/syscalls.h
arch/openrisc/kernel/entry.S