[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <d94be5f21bf18c844d7088a96ae35aa209a0ef4e.camel@intel.com>
Date: Fri, 18 Feb 2022 17:28:58 +0000
From: "Edgecombe, Rick P" <rick.p.edgecombe@...el.com>
To: "Weiny, Ira" <ira.weiny@...el.com>
CC: "hpa@...or.com" <hpa@...or.com>,
"Williams, Dan J" <dan.j.williams@...el.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"Yu, Fenghua" <fenghua.yu@...el.com>,
"dave.hansen@...ux.intel.com" <dave.hansen@...ux.intel.com>
Subject: Re: [PATCH V8 26/44] x86/fault: Print PKS MSR on fault
On Thu, 2022-02-17 at 22:01 -0800, Ira Weiny wrote:
> Are you suggesting the PKRU should be printed instead or in addition
> to the
> PKS?
Well I was just thinking that PKRS should only be printed if it's an
access via a supervisor pte. I guess printing PKRU for user faults
could be more complete. I'm not sure how PKRU could be useful though, I
can only think if smap was disabled and there was an errant access.
>
> AFAICS this really should not present a problem even if the fault is
> due to a
> user pkey violation. It is simply extra information.
Yea there is still enough information to decode the fault, but it could
be misleading at a glance. You're right it's not a big deal, but if it
were me I would fix it.
Just looking more, you would have to look up the PTE like is happening
for PF_INSTR. That code would need to be tweaked a little to also
include X86_PF_PK.
On the other hand, someone once told me to avoid touching the oops code
because if it gets broken it makes debugging very hard. It's better to
be reliable than fancy for that stuff.
Powered by blists - more mailing lists