* Re: kernel/fork.c:3088:2: warning: clone3() entry point is missing, please fix [not found] <202506282120.6vRwodm3-lkp@intel.com> @ 2025-06-30 6:14 ` Arnd Bergmann 2025-06-30 6:30 ` John Paul Adrian Glaubitz 2025-06-30 6:31 ` Philip Li 0 siblings, 2 replies; 8+ messages in thread From: Arnd Bergmann @ 2025-06-30 6:14 UTC (permalink / raw) To: kernel test robot Cc: llvm, oe-kbuild-all, linux-kernel, linux-hexagon, sparclinux, linux-sh, Dinh Nguyen, Simon Schuster, Linux-Arch, linux-kernel, Christian Brauner On Sat, Jun 28, 2025, at 21:59, kernel test robot wrote: > Hi Arnd, > > FYI, the error/warning still remains. > > date: 12 months ago > config: hexagon-randconfig-2002-20250626 > (https://download.01.org/0day-ci/archive/20250628/202506282120.6vRwodm3-lkp@intel.com/config) > commit: 505d66d1abfb90853e24ab6cbdf83b611473d6fc clone3: drop __ARCH_WANT_SYS_CLONE3 macro >> kernel/fork.c:3088:2: warning: clone3() entry point is missing, please fix [-W#warnings] My patch only moved the warning about the four broken architectures (hexagon, sparc, sh, nios2) that have never implemented the clone3 syscall from commit 7f192e3cd316 ("fork: add clone3"), over six years ago. I usually try to fix warnings when I get them, but the entire point why these still exist is that they require someone to add the syscall with the correct calling conventions for the respective architecture and make sure this actually works correctly. I don't think any of those architecture maintainers are paying attention to the build warnings or the lkp reports, and they are clearly not trying to fix them any more, so maybe it's better to just stop testing them in lkp. Arnd ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: kernel/fork.c:3088:2: warning: clone3() entry point is missing, please fix 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 6:31 ` Philip Li 1 sibling, 1 reply; 8+ messages in thread From: John Paul Adrian Glaubitz @ 2025-06-30 6:30 UTC (permalink / raw) To: Arnd Bergmann, kernel test robot Cc: llvm, oe-kbuild-all, linux-kernel, linux-hexagon, sparclinux, linux-sh, Dinh Nguyen, Simon Schuster, Linux-Arch, Christian Brauner Hi Arnd, On Mon, 2025-06-30 at 08:14 +0200, Arnd Bergmann wrote: > On Sat, Jun 28, 2025, at 21:59, kernel test robot wrote: > > Hi Arnd, > > > > FYI, the error/warning still remains. > > > > date: 12 months ago > > config: hexagon-randconfig-2002-20250626 > > (https://download.01.org/0day-ci/archive/20250628/202506282120.6vRwodm3-lkp@intel.com/config) > > commit: 505d66d1abfb90853e24ab6cbdf83b611473d6fc clone3: drop __ARCH_WANT_SYS_CLONE3 macro > > > kernel/fork.c:3088:2: warning: clone3() entry point is missing, please fix [-W#warnings] > > My patch only moved the warning about the four broken architectures > (hexagon, sparc, sh, nios2) that have never implemented the clone3 > syscall from commit 7f192e3cd316 ("fork: add clone3"), over six years > ago. > > I usually try to fix warnings when I get them, but the entire point > why these still exist is that they require someone to add the > syscall with the correct calling conventions for the respective > architecture and make sure this actually works correctly. > > I don't think any of those architecture maintainers are paying > attention to the build warnings or the lkp reports, and they are > clearly not trying to fix them any more, so maybe it's better to > just stop testing them in lkp. I have seen that warning about clone3() missing but I was not aware that it's an urgent issue to address. Do you have any suggestion on how to implement that syscall? Adrian -- .''`. John Paul Adrian Glaubitz : :' : Debian Developer `. `' Physicist `- GPG: 62FF 8A75 84E0 2956 9546 0006 7426 3B37 F5B5 F913 ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: kernel/fork.c:3088:2: warning: clone3() entry point is missing, please fix 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 0 siblings, 1 reply; 8+ messages in thread From: Arnd Bergmann @ 2025-06-30 10:02 UTC (permalink / raw) To: John Paul Adrian Glaubitz, kernel test robot Cc: llvm, oe-kbuild-all, linux-kernel, linux-hexagon, sparclinux, linux-sh, Dinh Nguyen, Simon Schuster, Linux-Arch, Christian Brauner On Mon, Jun 30, 2025, at 08:30, John Paul Adrian Glaubitz wrote: > On Mon, 2025-06-30 at 08:14 +0200, Arnd Bergmann wrote: >> On Sat, Jun 28, 2025, at 21:59, kernel test robot wrote: >> >> I don't think any of those architecture maintainers are paying >> attention to the build warnings or the lkp reports, and they are >> clearly not trying to fix them any more, so maybe it's better to >> just stop testing them in lkp. > > I have seen that warning about clone3() missing but I was not aware that it's > an urgent issue to address. Do you have any suggestion on how to implement > that syscall? 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]. Arnd [1] https://lore.kernel.org/lkml/20190716130631.tohj4ub54md25dys@brauner.io/ ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: kernel/fork.c:3088:2: warning: clone3() entry point is missing, please fix 2025-06-30 10:02 ` Arnd Bergmann @ 2025-06-30 10:45 ` John Paul Adrian Glaubitz 2025-06-30 12:07 ` Arnd Bergmann 0 siblings, 1 reply; 8+ messages in thread From: John Paul Adrian Glaubitz @ 2025-06-30 10:45 UTC (permalink / raw) To: Arnd Bergmann, kernel test robot Cc: llvm, oe-kbuild-all, linux-kernel, linux-hexagon, sparclinux, linux-sh, Dinh Nguyen, Simon Schuster, Linux-Arch, Christian Brauner Hi Arnd, 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? Adrian -- .''`. John Paul Adrian Glaubitz : :' : Debian Developer `. `' Physicist `- GPG: 62FF 8A75 84E0 2956 9546 0006 7426 3B37 F5B5 F913 ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: kernel/fork.c:3088:2: warning: clone3() entry point is missing, please fix 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 0 siblings, 2 replies; 8+ messages in thread From: Arnd Bergmann @ 2025-06-30 12:07 UTC (permalink / raw) To: John Paul Adrian Glaubitz, kernel test robot Cc: llvm, oe-kbuild-all, linux-kernel, linux-hexagon, sparclinux, linux-sh, Dinh Nguyen, Simon Schuster, Linux-Arch, Christian Brauner 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(). Right now glibc assumes that clone3() is available on linux-5.3 or higher and uses it to implement the normal clone() in that case, except where the implementation is missing. I see that at alpha, csky, parisc and microblaze have a kernel implementation in modern Linux versions, but are missing the glibc wrapper for it, as the kernel side was done later without the glibc version. sparc and sh are the only ones with a glibc port that are missing both the kernel and userspace side, while hexagon and nios2 are not currently part of mainline glibc. Arnd ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: kernel/fork.c:3088:2: warning: clone3() entry point is missing, please fix 2025-06-30 12:07 ` Arnd Bergmann @ 2025-06-30 15:24 ` Andreas Larsson 2025-07-01 8:49 ` Christian Brauner 1 sibling, 0 replies; 8+ messages in thread From: Andreas Larsson @ 2025-06-30 15:24 UTC (permalink / raw) To: Arnd Bergmann, John Paul Adrian Glaubitz, kernel test robot, Philip Li Cc: llvm, oe-kbuild-all, linux-kernel, linux-hexagon, sparclinux, linux-sh, Dinh Nguyen, Simon Schuster, Linux-Arch, Christian Brauner On 2025-06-30 14:07, 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(). > > Right now glibc assumes that clone3() is available on linux-5.3 or > higher and uses it to implement the normal clone() in that case, > except where the implementation is missing. > > I see that at alpha, csky, parisc and microblaze have a kernel > implementation in modern Linux versions, but are missing the > glibc wrapper for it, as the kernel side was done later without > the glibc version. sparc and sh are the only ones with a glibc > port that are missing both the kernel and userspace side, > while hexagon and nios2 are not currently part of mainline glibc. Thanks for all the input Arnd! All this will be very good to have at hand when looking into implementing and testing it! I was not aware that clone3 was used under the hood in glibc. Given that clone3 is not exposed by glibc to the outside I did not realize that glibc would actually use it, so it never got high enough up in the priority even though I have been well aware of it being missing. Stopping the testing of these architectures in lkp because of the missing clone3 would be unfortunate and a bit excessive in my view. That testing is and has been very useful! Cheers, Andreas ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: kernel/fork.c:3088:2: warning: clone3() entry point is missing, please fix 2025-06-30 12:07 ` Arnd Bergmann 2025-06-30 15:24 ` Andreas Larsson @ 2025-07-01 8:49 ` Christian Brauner 1 sibling, 0 replies; 8+ messages in thread From: Christian Brauner @ 2025-07-01 8:49 UTC (permalink / raw) To: Arnd Bergmann Cc: John Paul Adrian Glaubitz, kernel test robot, llvm, oe-kbuild-all, linux-kernel, linux-hexagon, sparclinux, linux-sh, Dinh Nguyen, Simon Schuster, Linux-Arch 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 ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: kernel/fork.c:3088:2: warning: clone3() entry point is missing, please fix 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 6:31 ` Philip Li 1 sibling, 0 replies; 8+ messages in thread From: Philip Li @ 2025-06-30 6:31 UTC (permalink / raw) To: Arnd Bergmann Cc: kernel test robot, llvm, oe-kbuild-all, linux-kernel, linux-hexagon, sparclinux, linux-sh, Dinh Nguyen, Simon Schuster, Linux-Arch, Christian Brauner On Mon, Jun 30, 2025 at 08:14:16AM +0200, Arnd Bergmann wrote: > On Sat, Jun 28, 2025, at 21:59, kernel test robot wrote: > > Hi Arnd, > > > > FYI, the error/warning still remains. > > > > date: 12 months ago > > config: hexagon-randconfig-2002-20250626 > > (https://download.01.org/0day-ci/archive/20250628/202506282120.6vRwodm3-lkp@intel.com/config) > > commit: 505d66d1abfb90853e24ab6cbdf83b611473d6fc clone3: drop __ARCH_WANT_SYS_CLONE3 macro > >> kernel/fork.c:3088:2: warning: clone3() entry point is missing, please fix [-W#warnings] > > My patch only moved the warning about the four broken architectures > (hexagon, sparc, sh, nios2) that have never implemented the clone3 > syscall from commit 7f192e3cd316 ("fork: add clone3"), over six years > ago. Sorry for the false positive, I will configure the bot to avoid sending this again. > > I usually try to fix warnings when I get them, but the entire point > why these still exist is that they require someone to add the > syscall with the correct calling conventions for the respective > architecture and make sure this actually works correctly. > > I don't think any of those architecture maintainers are paying > attention to the build warnings or the lkp reports, and they are > clearly not trying to fix them any more, so maybe it's better to > just stop testing them in lkp. Thanks for the comments, we will consider to adjust the priority for the related archs. Also welcome more inputs for how to test and report out issues of these archs. > > Arnd > ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2025-07-01 8:49 UTC | newest] Thread overview: 8+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- [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 2025-06-30 6:31 ` Philip Li
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).