From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.1 required=5.0 tests=DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 13162 invoked from network); 19 May 2021 08:43:00 -0000 Received: from mother.openwall.net (195.42.179.200) by inbox.vuxu.org with ESMTPUTF8; 19 May 2021 08:43:00 -0000 Received: (qmail 32621 invoked by uid 550); 19 May 2021 08:42:58 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Reply-To: musl@lists.openwall.com Received: (qmail 32588 invoked from network); 19 May 2021 08:42:58 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:subject:to:cc:references:in-reply-to:mime-version :message-id:content-transfer-encoding; bh=65fGzdiHYqhXvVbJhIHcIGq1TKdRRhD4v1EI2Qzj/O4=; b=bMvtBjabQN3eFsv0N5aOWD4yHdxmHSz2tAvyzebsOfh42lhs0YRzuE9fo2BurrzTy6 yE5sELMIWjVjxjQQs2IJMy0NtS5JIGMhRdD2QH5zMLH9zFLizEk0zYOVUGxPh64DK/EW GAXkCixB0SU3IT3ZoAewXekanzhYWrppbBoDexfyImyL5OqufZhfib3Vz01Wahn3qhBg Qv0q0ciR0zlzUorAXTYP2NxVaO/pA5CMWffAMXfu+EIXuQNBI3sGyaLBDPQ/NH5fieVv SN0u/0X540RAlmL4nbnFbrD27mY2+Tw/CJhoM1yNFp2y99/0EzrGO3cyUOCea1rlvXZU E8uw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:subject:to:cc:references:in-reply-to :mime-version:message-id:content-transfer-encoding; bh=65fGzdiHYqhXvVbJhIHcIGq1TKdRRhD4v1EI2Qzj/O4=; b=Ime6wWIXCRaB2D+A8deQ8LRQ2FYaEhbatxiVId00OB6V3GRu9lvLYaMqjw4c/HS9qD nDhVUn1hsd2Eb7S6dp2P3GLZ3g+2zLpNpAjrdQBv/raAB40gAU4saLo9S4tA6W9SaK5b cVD+fb714zO0EtmSNdiC8nPcpIARgdfKSXVA3N7LaV/ha6O3rxXoXozGCQ6DxdIQ+eqV sPgo0Rm71eL8W0myrqA0b9NRDbJu/hTru/hlLPzcMtSz0fRsXGpRBnOfrqwaCyPDwVzx zzd8QBUo3Tfrh1olCFHF1IuT0JFtZYQAOs3jSNwR31nUFBtXgJ9p1oxozVIHrJktsSDO NZtQ== X-Gm-Message-State: AOAM5301DSdsKwsovWBodjUDgMSYAAnJuIHmXJ0PUFg5k8t9GTRKzvpu +Yi0a6N5TQlubJmGmEXTxdE= X-Google-Smtp-Source: ABdhPJyzdFSda9iEveEfmRNG4skSZvA4vZ1nhegSlYSuhYx5bmD0VkIKrMZjt/hRsVyA5O6u7V3nmA== X-Received: by 2002:a17:902:8d83:b029:ef:9dd8:4d9 with SMTP id v3-20020a1709028d83b02900ef9dd804d9mr9794872plo.40.1621413766014; Wed, 19 May 2021 01:42:46 -0700 (PDT) Date: Wed, 19 May 2021 18:42:40 +1000 From: Nicholas Piggin To: Joakim Tjernlund , "ldv@altlinux.org" , "mpe@ellerman.id.au" Cc: "libc-dev@lists.llvm.org" , "linux-api@vger.kernel.org" , "linuxppc-dev@lists.ozlabs.org" , "musl@lists.openwall.com" References: <20200611081203.995112-1-npiggin@gmail.com> <20210518231331.GA8464@altlinux.org> <9b5ea7059c5a5d4e9ccccd7d73ce2c66b2203f52.camel@infinera.com> <1621410291.c7si38sa9q.astroid@bobo.none> In-Reply-To: MIME-Version: 1.0 Message-Id: <1621413143.oec64jaci5.astroid@bobo.none> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: [musl] Re: Linux powerpc new system call instruction and ABI Excerpts from Joakim Tjernlund's message of May 19, 2021 6:08 pm: > On Wed, 2021-05-19 at 17:55 +1000, Nicholas Piggin wrote: >> Excerpts from Joakim Tjernlund's message of May 19, 2021 5:33 pm: >> > On Wed, 2021-05-19 at 02:13 +0300, Dmitry V. Levin wrote: >> > > Hi, >> > >=20 >> > > On Thu, Jun 11, 2020 at 06:12:01PM +1000, Nicholas Piggin wrote: >> > > [...] >> > > > - Error handling: The consensus among kernel, glibc, and musl is t= o move to >> > > > =C2=A0=C2=A0using negative return values in r3 rather than CR0[SO]= =3D1 to indicate error, >> > > > =C2=A0=C2=A0which matches most other architectures, and is closer = to a function call. >> >=20 >> > What about syscalls like times(2) which can return -1 without it being= an error? >>=20 >> They do become errors / indistinguishable and have to be dealt with by=20 >> libc or userspace. Which does follow what most architectures do (all=20 >> except ia64, mips, sparc, and powerpc actually). >>=20 >> Interesting question though, it should have been noted. >>=20 >> Thanks, >> Nick >=20 > I always figured the ppc way was superior. It begs the question if not th= e other archs should > change instead? It is superior in some ways, not enough to be worth being different. Other archs are unlikely to change because it would be painful for not much benefit. New system calls just should be made to not return error numbers. If we ever had a big new version of syscall ABI in Linux, we can always use another scv vector number for it. Thanks, Nick