[PATCH v4 2/2] manual: add architecture specific note on clone and clone3 syscalls

Yury Khrustalev yury.khrustalev@arm.com
Thu Sep 4 12:10:05 GMT 2025


On Wed, Sep 03, 2025 at 11:37:44AM -0400, Rich Felker wrote:
> On Wed, Sep 03, 2025 at 04:53:57PM +0200, Florian Weimer wrote:
> > * Yury Khrustalev:
> > 
> > > On Mon, Sep 01, 2025 at 12:46:11PM -0400, Rich Felker wrote:
> > >> On Mon, Sep 01, 2025 at 06:33:35PM +0200, Florian Weimer wrote:
> > >> > * Yury Khrustalev:
> > >> > 
> > >> > > +@subsection Architecture specific notes on system calls
> > >> > > +
> > >> > > +Because @code{syscall} function does not know anything about what a particular
> > >> > > +system call does or what are the ABI requirements for it, it is important to be
> > >> > > +aware of any additional requirements that the target kernel might have for
> > >> > > +certain system calls.
> > >> > > 
> > >> > > ...
> > >
> > > ** Florian
> > >
> > >> > As this is discussing clone, I think you really should mention that
> > >> > using syscall for clones that are not fork-style (vfork-style, or
> > >> > thread-style) is NOT supported in general.  Not mentioning this
> > >> > important restriction implies support.
> > >
> > > I agree that we should mention this, however, I've looked through the
> > > manual and can't find anything that would imply that clones that are
> > > not fork-style are supported in general. It feels like this important
> > > bit should've been mentioned somewhere else in the manual, e.g. in a
> > > section that describes clone() but we don't seem to have any.
> > 
> > You are adding text that says “if you call clone through syscall, you
> > have to do this extra thing”.  This strongly implies that calling clone
> > through syscall is valid in some cases.  We can instead say that calling
> > clone through syscall is never valid.
> 
> Indeed, and I think this is the right action.


So if I understand this properly, the gist of this thread is that we
don't actually need to describe the actions needed if someone wants to
use SYS_clone or SYS_clone3 via the syscall() function on aarch64.
Instead we should have a patch not related to this SME changed that
would just spell that calling clone (or clone3) via syscall() is not
supported. Is this right?

Thanks,
Yury



More information about the Libc-alpha mailing list