public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jeremy Fitzhardinge <jeremy@goop.org>
To: "H. Peter Anvin" <hpa@zytor.com>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Ingo Molnar <mingo@elte.hu>, Thomas Gleixner <tglx@linutronix.de>,
	Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>,
	Avi Kivity <avi@qumranet.com>
Subject: Re: The msr_safe functions and returning -EFAULT
Date: Mon, 31 Aug 2009 17:24:43 -0700	[thread overview]
Message-ID: <4A9C69CB.1050603@goop.org> (raw)
In-Reply-To: <4A9AE998.4040201@zytor.com>

On 08/30/09 14:05, H. Peter Anvin wrote:
> Right now, the *msr_safe() functions are returning -EFAULT.  As far as I
> can tell, this makes absolutely no sense -- EFAULT is a nonsensical
> error (it means a pointer into user memory given to a system call is
> invalid), and the only user that seems to use this as anything other
> than a boolean is the MSR driver, which wants EIO.
>
> Sending out an email in case I have missed any instances, but I'm
> inclined to just change this to EIO globally.
>
> Anyone has objections?
>   

I think the only rationale for EFAULT is that the *msr will fail with
GP, and a GPing instruction will send a SIGSEGV to usermode, and EFAULT
is the synchronous error-code equiv of SIGSEGV.  Sorta.

EIO makes more sense overall.  Or ENXIO.

    J

  reply	other threads:[~2009-09-01  0:24 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-30 21:05 The msr_safe functions and returning -EFAULT H. Peter Anvin
2009-09-01  0:24 ` Jeremy Fitzhardinge [this message]
2009-09-01  0:27   ` H. Peter Anvin

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=4A9C69CB.1050603@goop.org \
    --to=jeremy@goop.org \
    --cc=avi@qumranet.com \
    --cc=hpa@zytor.com \
    --cc=jeremy.fitzhardinge@citrix.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --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