From: Simon Guo <wei.guo.simon@gmail.com>
To: Michael Ellerman <mpe@ellerman.id.au>
Cc: Kees Cook <keescook@chromium.org>,
Rashmica Gupta <rashmicy@gmail.com>,
linux-kernel@vger.kernel.org,
Simon Guo <simonguo@linux.vnet.ibm.com>,
Paul Mackerras <paulus@samba.org>,
Laurent Dufour <ldufour@linux.vnet.ibm.com>,
linuxppc-dev@lists.ozlabs.org
Subject: Re: [RESEND, v2] powerpc: Export thread_struct.used_vr/used_vsr to user space
Date: Tue, 5 Jul 2016 05:08:41 +0800 [thread overview]
Message-ID: <20160704210841.GA8915@simonLocalRHEL7.x64> (raw)
In-Reply-To: <3rkCQx0jldz9sBl@ozlabs.org>
Hi Michael,
On Tue, Jul 05, 2016 at 03:40:40PM +1000, Michael Ellerman wrote:
> On Wed, 2016-06-04 at 07:00:12 UTC, Simon Guo wrote:
> > These 2 fields track whether user process has used Altivec/VSX
> > registers or not. They are used by kernel to setup signal frame
> > on user stack correctly regarding vector part.
> >
> > CRIU(Checkpoint and Restore In User space) builds signal frame
> > for restored process. It will need this export information to
> > setup signal frame correctly. And CRIU will need to restore these
> > 2 fields for the restored process.
> >
> > Signed-off-by: Simon Guo <wei.guo.simon@gmail.com>
> > Reviewed-by: Laurent Dufour <ldufour@linux.vnet.ibm.com>
> > @@ -176,6 +176,17 @@ struct pt_regs {
> > #define PTRACE_GETREGS64 0x16
> > #define PTRACE_SETREGS64 0x17
> >
> > +/*
> > + * Get or set some register used bit.
> > + * The flags will be saved in a 32 bit data.
> > + * Currently it is only used for VR/VSR usage.
> > + */
> > +#define PTRACE_GET_REGS_USAGE 0x1e
> > +#define PTRACE_SET_REGS_USAGE 0x1f
> > +
> > +#define PTRACE_REGS_USAGE_VR_BIT 0x00000001
> > +#define PTRACE_REGS_USAGE_VSR_BIT 0x00000002
>
>
> It looks like you just made up this new ptrace ABI ?
>
> Or is it used on other arches ? (no AFAICS)
>
> How do other arches handle this ?
>
> I'm a bit wary of adding new ptrace ABIs.
>
> If we do want to do this, I'd at least think the mask should be u64, to give us
> more capacity to add new registers.
>
> cheers
It is only used on PowerPc currently. I had better rename
it to:
#define PPC_PTRACE_GET_REGS_USAGE 0x96
#define PPC_PTRACE_SET_REGS_USAGE 0x97
I will change the mask into u64.
Thanks,
- Simon
prev parent reply other threads:[~2016-07-05 10:35 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-06 7:00 [RESEND][PATCH v2] powerpc: Export thread_struct.used_vr/used_vsr to user space Simon Guo
2016-04-12 2:58 ` Simon Guo
[not found] ` <20160621063006.GA6367@simonLocalRHEL7.x64>
2016-06-22 2:40 ` Simon Guo
2016-07-05 5:40 ` [RESEND, " Michael Ellerman
2016-07-04 21:08 ` Simon Guo [this message]
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=20160704210841.GA8915@simonLocalRHEL7.x64 \
--to=wei.guo.simon@gmail.com \
--cc=keescook@chromium.org \
--cc=ldufour@linux.vnet.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mpe@ellerman.id.au \
--cc=paulus@samba.org \
--cc=rashmicy@gmail.com \
--cc=simonguo@linux.vnet.ibm.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.
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).