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.3 required=5.0 tests=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 6482 invoked from network); 20 May 2021 03:06:25 -0000 Received: from mother.openwall.net (195.42.179.200) by inbox.vuxu.org with ESMTPUTF8; 20 May 2021 03:06:25 -0000 Received: (qmail 7258 invoked by uid 550); 20 May 2021 03:06:23 -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 7219 invoked from network); 20 May 2021 03:06:22 -0000 Date: Thu, 20 May 2021 06:06:11 +0300 From: "Dmitry V. Levin" To: Nicholas Piggin Cc: Joakim Tjernlund , libc-alpha@sourceware.org, libc-dev@lists.llvm.org, linux-api@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, Michael Ellerman , Matheus Castanho , musl@lists.openwall.com Message-ID: <20210520030611.GB27081@altlinux.org> References: <20210519132656.GA17204@altlinux.org> <1621464056.o9t21cquw8.astroid@bobo.none> <20210519232726.GA24134@altlinux.org> <1621478238.xha1ow4ujh.astroid@bobo.none> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1621478238.xha1ow4ujh.astroid@bobo.none> Subject: [musl] Re: Linux powerpc new system call instruction and ABI On Thu, May 20, 2021 at 12:40:36PM +1000, Nicholas Piggin wrote: [...] > > Looks like struct pt_regs.trap already contains the information that could > > be used to tell 'sc' from 'scv': if (pt_regs.trap & ~0xf) == 0x3000, then > > it's scv. Is my reading of arch/powerpc/include/asm/ptrace.h correct? > > Hmm, I think it is. Certainly in the kernel regs struct it is, I had in > my mind that we put it to 0xc00 when populating the user struct for > compatibility, but it seems not. So I guess this would work. OK, can we state that (pt_regs.trap & ~0xf) == 0x3000 is a part of the scv ABI, so it's not going to change and could be relied upon by userspace? Could this be documented in Documentation/powerpc/syscall64-abi.rst, please? -- ldv