lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4A9C69CB.1050603@goop.org>
Date:	Mon, 31 Aug 2009 17:24:43 -0700
From:	Jeremy Fitzhardinge <jeremy@...p.org>
To:	"H. Peter Anvin" <hpa@...or.com>
CC:	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	Ingo Molnar <mingo@...e.hu>,
	Thomas Gleixner <tglx@...utronix.de>,
	Jeremy Fitzhardinge <jeremy.fitzhardinge@...rix.com>,
	Avi Kivity <avi@...ranet.com>
Subject: Re: The msr_safe functions and returning -EFAULT

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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ