linux-um.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Benjamin Berg <benjamin@sipsolutions.net>
To: Tiwei Bie <tiwei.btw@antgroup.com>, linux-um@lists.infradead.org
Subject: Re: [PATCH] um: always use the internal copy of the FP registers
Date: Fri, 13 Sep 2024 15:17:52 +0200	[thread overview]
Message-ID: <5e7c3ceb4adeeab1fb9f6295cb2abc4691b47ff3.camel@sipsolutions.net> (raw)
In-Reply-To: <f6422fd4-ac5c-407b-a0f4-e4fefed02dad@antgroup.com>

Hi,

On Fri, 2024-09-13 at 21:09 +0800, Tiwei Bie wrote:
> On 2024/9/13 16:22, Benjamin Berg wrote:
> > From: Benjamin Berg <benjamin.berg@intel.com>
> > [SNIP]
> > diff --git a/arch/um/kernel/process.c b/arch/um/kernel/process.c
> > index be2856af6d4c..ad798d40f8a4 100644
> > --- a/arch/um/kernel/process.c
> > +++ b/arch/um/kernel/process.c
> > @@ -290,8 +290,15 @@ unsigned long __get_wchan(struct task_struct *p)
> >  
> >  int elf_core_copy_task_fpregs(struct task_struct *t, elf_fpregset_t *fpu)
> >  {
> > -	int cpu = current_thread_info()->cpu;
> > +#ifdef CONFIG_X86_32
> > +	extern int have_fpx_regs;
> >  
> > -	return save_i387_registers(userspace_pid[cpu], (unsigned long *) fpu);
> > +	/* FIXME: A plain copy does not work on i386 with have_fpx_regs */
> > +	if (have_fpx_regs)
> > +		return -1;
> > +#endif
> > +	memcpy(fpu, &t->thread.regs.regs.fp, sizeof(*fpu));
> > +
> > +	return 0;
> >  }
> 
> This function is expected to return a boolean value which should be
> true on success.

Hah, of course. And there I was partially doing all of this because of
your patch fixing exactly that problem (and because the current code
cannot work in SECCOMP mode) …

Benjamin


      reply	other threads:[~2024-09-13 13:18 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-13  8:22 [PATCH] um: always use the internal copy of the FP registers Benjamin Berg
2024-09-13  8:42 ` Benjamin Berg
2024-09-13 13:09 ` Tiwei Bie
2024-09-13 13:17   ` Benjamin Berg [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=5e7c3ceb4adeeab1fb9f6295cb2abc4691b47ff3.camel@sipsolutions.net \
    --to=benjamin@sipsolutions.net \
    --cc=linux-um@lists.infradead.org \
    --cc=tiwei.btw@antgroup.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).