openrisc: Add clone3 ABI wrapper
authorStafford Horne <shorne@gmail.com>
Fri, 3 Dec 2021 22:10:18 +0000 (07:10 +0900)
committerStafford Horne <shorne@gmail.com>
Sat, 4 Dec 2021 02:12:09 +0000 (11:12 +0900)
commit433fe39f674d58bc7a3e8254a5d2ffc290b7e04e
tree759ed1ce58ef4251ecb9e969d78ad919e0066605
parent07baf50ac754384b9ea996f82b9a2a8aba946aa4
openrisc: Add clone3 ABI wrapper

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>
arch/openrisc/include/asm/syscalls.h
arch/openrisc/kernel/entry.S