mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Roland McGrath <roland@redhat.com>
To: "Siddha, Suresh B" <suresh.b.siddha@intel.com>
Cc: mingo@elte.hu, tglx@linutronix.de, linux-kernel@vger.kernel.org
Subject: Re: [PATCH x86/mm] x86: i387 fpregs_set convert_to_fxsr
Date: Fri, 25 Jan 2008 12:38:08 -0800 (PST)	[thread overview]
Message-ID: <20080125203809.02C2C26F9FD@magilla.localdomain> (raw)
In-Reply-To: Siddha, Suresh B's message of  Friday, 25 January 2008 10:04:06 -0800 <20080125180406.GB5342@linux-os.sc.intel.com>

> On Thu, Jan 24, 2008 at 05:59:33PM -0800, Roland McGrath wrote:
> > +	if (pos > 0 || count < sizeof(env))
> > +		convert_from_fxsr(&env, target);
> 
> Well, is the generic regset code enforce the need for this now? Can we
> disallow the usage cases where the user passes smaller target buffer
> size or requests data from in between. We were disallowing such usage
> scenarios before, isn't it?

It's true that there was before no way to touch only part of the FPU state
via ptrace.  The user_regset interface genericizes access to every regset
to permit partial access, subject to the size and align fields.  Access to
some part of the data is certainly of use for some regsets, like the
general registers and TLS, which always have exposed means to touch just
one chunk (e.g. PTRACE_POKEUSR, PTRACE_SET_THREAD_AREA).  It's a very
worthwhile thing that we have a uniform interface for all the regsets,
so I certainly would not change that.  

It could fit into the user_regset interface as now defined, to set .n = 1,
.size = whole for the FPU regset, so that all partial access is officially
invalid.  But it is easy enough to support partial access in fact, and for
the common case (xfpregs) there is no overhead or complexity to it at all.
Some new user of the user_regset interfaces very well might have a use for
fetching or touching just one FP register, so why rule it out a priori?


Thanks,
Roland

  reply	other threads:[~2008-01-25 20:38 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-25  1:40 [patch] x86, i387: use convert_to_fxsr() in fpregs_set() Siddha, Suresh B
2008-01-25  1:59 ` [PATCH x86/mm] x86: i387 fpregs_set convert_to_fxsr Roland McGrath
2008-01-25 18:04   ` Siddha, Suresh B
2008-01-25 20:38     ` Roland McGrath [this message]
2008-01-25 10:49 ` [patch] x86, i387: use convert_to_fxsr() in fpregs_set() Ingo Molnar

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=20080125203809.02C2C26F9FD@magilla.localdomain \
    --to=roland@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=suresh.b.siddha@intel.com \
    --cc=tglx@linutronix.de \
    /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

all inboxes | Powered by JetHome®