lkml.org 
[lkml]   [2018]   [Sep]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [RFC][PATCH 1/8] x86/mm: clarify hardware vs. software "error_code"
From
Date


> On Sep 7, 2018, at 12:48 PM, Dave Hansen <dave.hansen@linux.intel.com> wrote:
>
>
> From: Dave Hansen <dave.hansen@linux.intel.com>
>
> We pass around a variable called "error_code" all around the page
> fault code. Sounds simple enough, especially since "error_code" looks
> like it exactly matches the values that the hardware gives us on the
> stack to report the page fault error code (PFEC in SDM parlance).
>
> But, that's not how it works.
>
> For part of the page fault handler, "error_code" does exactly match
> PFEC. But, during later parts, it diverges and starts to mean
> something a bit different.
>
> Give it two names for its two jobs.

How hard would it be to just remove sw_error_code instead? It seems like it adds little value and much confusion.

I’m also unconvinced that the warning is terribly useful. We’re going to oops when this happens anyway.

I’ll rebase my diagnostic patch on top of this series after it settles.

\
 
 \ /
  Last update: 2018-09-08 00:48    [W:0.196 / U:0.184 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site