linux-hexagon.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christian Brauner <brauner@kernel.org>
To: Arnd Bergmann <arnd@arndb.de>
Cc: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>,
	 kernel test robot <lkp@intel.com>,
	llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
	 linux-kernel@vger.kernel.org, linux-hexagon@vger.kernel.org,
	sparclinux@vger.kernel.org,  linux-sh@vger.kernel.org,
	Dinh Nguyen <dinguyen@kernel.org>,
	 Simon Schuster <schuster.simon+binutils@siemens-energy.com>,
	Linux-Arch <linux-arch@vger.kernel.org>
Subject: Re: kernel/fork.c:3088:2: warning: clone3() entry point is missing, please fix
Date: Tue, 1 Jul 2025 10:49:27 +0200	[thread overview]
Message-ID: <20250701-packung-zweifach-49a0189a1dea@brauner> (raw)
In-Reply-To: <ccf937cb-a139-4a07-aa47-4006b880b025@app.fastmail.com>

On Mon, Jun 30, 2025 at 02:07:58PM +0200, Arnd Bergmann wrote:
> On Mon, Jun 30, 2025, at 12:45, John Paul Adrian Glaubitz wrote:
> > On Mon, 2025-06-30 at 12:02 +0200, Arnd Bergmann wrote:
> >> Some architectures have custom calling conventions for the
> >> fork/vfork/clone/clone3 syscalls, e.g. to handle copying all the
> >> registers correctly when the normal syscall entry doesn't do that,
> >> or to handle the changing stack correctly.
> >> 
> >> I see that both sparc and hexagon have a custom clone() syscall,
> >> so they likely need a custom clone3() as well, while sh and
> >> nios2 probably don't.
> >> 
> >> All four would need a custom assembler implementation in userspace
> >> for each libc, in order to test the userspace calling the clone3()
> >> function. For testing the kernel entry point itself, see Christian's
> >> original test case[1].
> >
> > Thanks for the explanation. So, I guess as long as a proposed implementation
> > of clone3() on sh would pass Arnd's test program, it should be good for merging?
> 
> Yes, Christian's test program should be enough for merging into
> the kernel, though I would recommend also coming up with the matching
> glibc patch, in order to ensure it can actually be regression tested
> automatically, and to use the new features provided by glibc clone3().

Note that we do have clone3() selftests in the kernel:

> ls -al tools/testing/selftests/clone3/
total 48
drwxrwxr-x   2 brauner brauner   175 Jun  4 22:45 .
drwxrwxr-x 118 brauner brauner  4096 Jun 16 10:10 ..
-rw-rw-r--   1 brauner brauner  7377 Apr 15 10:47 clone3.c
-rw-rw-r--   1 brauner brauner  3939 May 13 12:23 clone3_cap_checkpoint_restore.c
-rw-rw-r--   1 brauner brauner  2512 Apr 15 10:47 clone3_clear_sighand.c
-rw-rw-r--   1 brauner brauner  1437 Jun  4 22:45 clone3_selftests.h
-rw-rw-r--   1 brauner brauner 10738 Apr 15 10:47 clone3_set_tid.c
-rw-rw-r--   1 brauner brauner   113 Apr 11 15:36 .gitignore
-rw-rw-r--   1 brauner brauner   206 Apr 15 10:47 Makefile

  parent reply	other threads:[~2025-07-01  8:49 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <202506282120.6vRwodm3-lkp@intel.com>
2025-06-30  6:14 ` kernel/fork.c:3088:2: warning: clone3() entry point is missing, please fix Arnd Bergmann
2025-06-30  6:30   ` John Paul Adrian Glaubitz
2025-06-30 10:02     ` Arnd Bergmann
2025-06-30 10:45       ` John Paul Adrian Glaubitz
2025-06-30 12:07         ` Arnd Bergmann
2025-06-30 15:24           ` Andreas Larsson
2025-07-01  8:49           ` Christian Brauner [this message]
2025-06-30  6:31   ` Philip Li

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250701-packung-zweifach-49a0189a1dea@brauner \
    --to=brauner@kernel.org \
    --cc=arnd@arndb.de \
    --cc=dinguyen@kernel.org \
    --cc=glaubitz@physik.fu-berlin.de \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-hexagon@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sh@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=llvm@lists.linux.dev \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=schuster.simon+binutils@siemens-energy.com \
    --cc=sparclinux@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).