lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aWprkg0fRoYQl5DP@Jessicas-MacBook-Pro>
Date: Fri, 16 Jan 2026 16:47:14 +0000
From: Jessica Clarke <jrtc27@...c27.com>
To: Ludwig Rydberg <ludwig.rydberg@...sler.com>
Cc: davem@...emloft.net, andreas@...sler.com, brauner@...nel.org,
	shuah@...nel.org, sparclinux@...r.kernel.org,
	linux-kselftest@...r.kernel.org, linux-kernel@...r.kernel.org,
	arnd@...db.de, glaubitz@...sik.fu-berlin.de, geert@...ux-m68k.org,
	schuster.simon@...mens-energy.com
Subject: Re: [PATCH 2/3] sparc: Add architecture support for clone3

On Fri, Jan 16, 2026 at 04:30:50PM +0100, Ludwig Rydberg wrote:
> Add support for the clone3 system call to the SPARC architectures.
> 
> The implementation follows the pattern of the original clone syscall.
> However, instead of explicitly calling kernel_clone, the clone3
> handler calls the generic sys_clone3 handler in kernel/fork.
> In case no stack is provided, the parents stack is reused.
> 
> The return call conventions for clone on SPARC are kept for clone3:
>   Parent -->  %o0 == child's  pid, %o1 == 0
>   Child  -->  %o0 == parent's pid, %o1 == 1

One of the benefits of having a new clone3 is that the interface can be
made the same across all architectures*, unlike clone, which both passes
the arguments in different orders for different architectures and, in
the case of SPARC, has this weird return convention inherited from the
SunOS syscall interface. Is there a good reason to deviate for clone3
too and keep this annoying oddity going, that requires special-casing
SPARC when other architectures can just syscall(__NR_clone3, ...)?

Jessica

* Even Itanium's clone2 could have been subsumed by it, as clone3 passes
  the stack base and size rather than the desired stack pointer

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ