mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Christian Brauner <brauner@kernel.org>
To: Arnd Bergmann <arnd@kernel.org>
Cc: musl@lists.openwall.com
Subject: Re: [musl] Re: add loongarch64 port
Date: Wed, 13 Apr 2022 11:04:25 +0200	[thread overview]
Message-ID: <20220413090425.rmprwzpgpztianin@wittgenstein> (raw)
In-Reply-To: <CAK8P3a3dJ_NvXZzpFX-nj1UUeQzviMHS+BKMSXf+KTyAqYOiqw@mail.gmail.com>

On Wed, Apr 13, 2022 at 10:26:06AM +0200, Arnd Bergmann wrote:
> On Wed, Apr 13, 2022 at 9:26 AM Christian Brauner <brauner@kernel.org> wrote:
> > On Sun, Apr 10, 2022 at 12:30:59PM +0200, Arnd Bergmann wrote:
> > > On Sat, Apr 9, 2022 at 3:31 PM Rich Felker <dalias@libc.org> wrote:
> > > >
> > > > Actually, if there aren't yet archs lacking SYS_clone, this API
> > > > regression may be a good argument not to drop SYS_clone on new archs
> > > > yet until there's a way for new archs to get the same behavior
> > > > (unspecified stack size).
> > >
> > > That is a good point, but it also appears that the behavior of
> > > clone3() is unintentional
> > > here, I'm fairly sure it was meant to be a drop-in replacement for clone() with
> > > additional features.
> >
> > Mostly but not in all ways. We did decide it's ok to make API
> > improvements that might break compatibility with legacy clone().
> 
> Ok
> 
> > >
> > > Not sure what the best fix for this is, as the check for size==0 was clearly
> > > intentional, but seems to prevent this from working. A special flag to ignore
> > > the size, or a magic size value like -1ull might work, but neither of them
> > > is a great interface.
> >
> > Can someone explain the use-case in a bit more detail, please?
> >
> > If it is a legitimate use-case that callers need to be able to pass a
> > stack and have no way of also passing a size then we should just remove
> > the size == 0 check for all architectures that don't have a hard
> > requirement on passing a size together with the stack pointer.
> >
> > Wdyt, Arnd?
> 
> The normal rule is that we don't define obsolete system calls in new
> architectures when an improved variant has been added, e.g. oldoldstat,
> oldstat, stat, newstat and stat64 have all been replaced by statx over
> the decades. I was expecting the same to be true for clone(), but if
> clone3() is not meant as a replacement, we can keep both around.

No, I agree with you on this and would like to only implement clone3()
on new architectures.

What I'm asking is whether removing the size == 0 check is enough to
unblock the missing behavior and whether you'd be on board with removing
the check?

  reply	other threads:[~2022-04-13 10:58 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-31  6:20 王洪亮
2022-03-31  8:14 ` Arnd Bergmann
2022-04-01  7:40   ` 王洪亮
2022-04-01  7:48     ` Arnd Bergmann
2022-04-02  6:19       ` 王洪亮
2022-04-02  7:21         ` Rich Felker
2022-04-02  9:53           ` 王洪亮
2022-04-27  1:58   ` 王洪亮
2022-04-27  2:13     ` Rich Felker
2022-03-31 18:47 ` Rich Felker
2022-04-02  7:59   ` 王洪亮
2022-04-06  2:08     ` 王洪亮
2022-04-06 16:00       ` Markus Wichmann
2022-04-08  2:21         ` 王洪亮
2022-04-08  6:46           ` Arnd Bergmann
2022-04-09  3:54             ` 王洪亮
2022-04-09 11:06               ` Arnd Bergmann
2022-04-09 13:19                 ` Rich Felker
2022-04-09 13:30                   ` Rich Felker
2022-04-10 10:30                     ` Arnd Bergmann
2022-04-10 15:26                       ` Rich Felker
2022-04-11  8:03                         ` Arnd Bergmann
2022-04-11 12:11                           ` Rich Felker
2022-04-11 13:01                             ` Arnd Bergmann
2022-04-12  1:11                               ` 王洪亮
2022-04-13  1:16                                 ` 王洪亮
2022-04-13  7:26                       ` Christian Brauner
2022-04-13  8:26                         ` Arnd Bergmann
2022-04-13  9:04                           ` Christian Brauner [this message]
2022-04-13 13:25                             ` Arnd Bergmann
2022-04-13 14:09                               ` Rich Felker
2022-04-14  9:36                                 ` Christian Brauner
2022-04-20  9:09                                   ` 王洪亮
2022-04-20 13:33                                     ` Christian Brauner
2022-04-20 13:54                                       ` Rich Felker
2022-04-21  6:54                                         ` 王洪亮
2022-04-14  9:36                               ` Christian Brauner
2022-04-13  7:19                   ` Christian Brauner
2022-04-13 14:06                     ` Rich Felker
2022-04-11  3:40                 ` 王洪亮
  -- strict thread matches above, loose matches on Subject: below --
2022-03-22  3:52 [musl] " 王洪亮
2022-03-29  8:12 ` [musl] " 王洪亮
2022-03-29  8:26   ` Arnd Bergmann

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=20220413090425.rmprwzpgpztianin@wittgenstein \
    --to=brauner@kernel.org \
    --cc=arnd@kernel.org \
    --cc=musl@lists.openwall.com \
    /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.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

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).