|
Message-Id: <1621487263.hkgxyf500s.astroid@bobo.none> Date: Thu, 20 May 2021 15:12:03 +1000 From: Nicholas Piggin <npiggin@...il.com> To: "Dmitry V. Levin" <ldv@...linux.org> Cc: Joakim Tjernlund <Joakim.Tjernlund@...inera.com>, libc-alpha@...rceware.org, libc-dev@...ts.llvm.org, linux-api@...r.kernel.org, linuxppc-dev@...ts.ozlabs.org, Michael Ellerman <mpe@...erman.id.au>, Matheus Castanho <msc@...ux.ibm.com>, musl@...ts.openwall.com Subject: Re: Linux powerpc new system call instruction and ABI Excerpts from Dmitry V. Levin's message of May 20, 2021 1:06 pm: > 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? Yeah I think we can do that. The kernel doesn't care what is put in the userspace pt_regs.trap too much so if this is your preferred approach then I will document it in the ABI. Thanks, Nick
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.