lkml.org 
[lkml]   [2018]   [Dec]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH] x86/mm/fault: Streamline the fault error_code decoder some more
On Thu, Dec 6, 2018 at 12:28 PM Andy Lutomirski <luto@kernel.org> wrote:
>
> "read" isn't an actual bit in the error code, so I thought it would be
> polite to make it look a little bit different.

If you care about the bits in the error code, then just look at the number.

And if you care about what the numbers mean, it doesn't matter how it's encoded.

I don't think you should mix up the two concepts.

> Sure. Although it's extremely odd for us to OOPS from user mode, so
> maybe the OOPS code in general should print a big fat warning, and
> we'll just otherwise assume it was from kernel mode.

Yeah, the "from user mode" case is generally really something horribly
bad (reserved bits being set or us screwing up LDT's etc), so yeah,
maybe a better model is indeed to point that out explicitly, the same
way the "user/kernel doesn't match U/S bit" is pointed out.

Linus

\
 
 \ /
  Last update: 2018-12-06 21:40    [W:0.082 / U:3.964 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site