From: Thomas Meyer <thomas@m3y3r.de>
To: Richard Weinberger <richard@nod.at>
Cc: user-mode-linux-devel@lists.sourceforge.net
Subject: Re: [uml-devel] [PATCH] um: v3: Fix FP register size for XSTATE/XSAVE
Date: Mon, 17 Jul 2017 22:59:52 +0200 [thread overview]
Message-ID: <20170717154505.GA17661@localhost.localdomain> (raw)
In-Reply-To: <261315a5-f93a-9c1a-cfca-bd41f5b20dc6@nod.at>
On Wed, Jul 12, 2017 at 09:18:26PM +0200, Richard Weinberger wrote:
> Thomas,
>
> Am 12.07.2017 um 17:11 schrieb Thomas Meyer:
> > Am 10.07.2017 9:06 nachm. schrieb Richard Weinberger <richard@nod.at>:
> >
> > Thomas,
> >
> > Am 10.07.2017 um 00:33 schrieb Thomas Meyer:
> > > Hard code max size. Taken from
> > > https://sourceware.org/git/?p=binutils-gdb.git;a=blob;f=gdb/common/x86-xstate.h
> > >
> > > v3: use static fp_regs for get_skas_faultinfo
> > >
> > > Signed-off-by: Thomas Meyer <thomas@m3y3r.de>
> > > ---
> > > arch/um/os-Linux/skas/process.c | 7 ++++---
> > > arch/x86/um/os-Linux/registers.c | 18 ++++++++++++------
> > > arch/x86/um/user-offsets.c | 2 +-
> > > 3 files changed, 17 insertions(+), 10 deletions(-)
> > >
> > > diff --git a/arch/um/os-Linux/skas/process.c b/arch/um/os-Linux/skas/process.c
> > > index 03b3c4cc7735..b5fdef795985 100644
> > > --- a/arch/um/os-Linux/skas/process.c
> > > +++ b/arch/um/os-Linux/skas/process.c
> > > @@ -88,12 +88,13 @@ void wait_stub_done(int pid)
> > >
> > > extern unsigned long current_stub_stack(void);
> > >
> > > +static unsigned long skas_faultinfo_fpregs[FP_SIZE];
> > > +
> >
> > Uhmm, are you sure that this does not race with other userspace() instances?
> >
> > Oh, is it really possible that a task gets schedule while we are in userspace signal handling from ptrace?
>
> I hoped that you'd double check. ;)
I just did write a little test program, which seems to survive this
patch. Please have a look at this test program. As far as I understand
the problem, the test program should cover above test case.
Feel free to have a look at it:
https://github.com/thomasmey/xmm-test/
> From my knowledge it is not possible, but this code was not written by me and UML internal
> semantics are more than tricky.
> Let's postpone this patch for -rc2 and check again.
>
> > Another question: when malloc a memory area in userspace: when does a userspace process end in userspace function!? Where would you free the malloced memory?
>
> It ends via handle_trap() when userspac does an exit syscall.
> I agree this is tricky to catch and needs more effort.
Ah, okay, that makes sense!
>
> Thanks,
> //richard
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
next prev parent reply other threads:[~2017-07-17 21:00 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-12 15:11 [uml-devel] [PATCH] um: v3: Fix FP register size for XSTATE/XSAVE Thomas Meyer
2017-07-12 19:18 ` Richard Weinberger
2017-07-17 20:59 ` Thomas Meyer [this message]
2017-07-12 19:53 ` Richard Weinberger
2017-07-29 15:03 ` [uml-devel] [PATCH] um: v4: " Thomas Meyer
-- strict thread matches above, loose matches on Subject: below --
2017-07-07 22:13 [uml-devel] [PATCH] um: v2: " Richard Weinberger
2017-07-09 22:33 ` [uml-devel] [PATCH] um: v3: " Thomas Meyer
2017-07-10 19:06 ` Richard Weinberger
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=20170717154505.GA17661@localhost.localdomain \
--to=thomas@m3y3r.de \
--cc=richard@nod.at \
--cc=user-mode-linux-devel@lists.sourceforge.net \
/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