[lkml]   [2009]   [Aug]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: The msr_safe functions and returning -EFAULT
    On 08/31/2009 05:24 PM, Jeremy Fitzhardinge wrote:
    > 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.

    Well, EIO is what we want for the MSR driver, so I have just switched it
    to EIO across the board. As far as I can tell, there were no other
    users that didn't just test for error or no error.


     \ /
      Last update: 2009-09-01 02:31    [W:0.020 / U:57.460 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site