Re: [PATCH] x86/fault: Decode and print #PF oops in human readable form

From: Linus Torvalds
Date: Fri Dec 07 2018 - 13:53:16 EST


On Fri, Dec 7, 2018 at 10:44 AM Sean Christopherson
<sean.j.christopherson@xxxxxxxxx> wrote:
>
> Remove the per-bit decoding of the error code and instead print the raw
> error code followed by a brief description of what caused the fault, the
> effective privilege level of the faulting access, and whether the fault
> originated in user code or kernel code.

This doesn't quite work as-is, though.

For example, at least the PK bit is independent of the other bits and
would be interesting in the human-legible version, but doesn't show up
there at all.

That said, I think the end result might be more legible than the
previous version, so this approach may well be good, it just needs at
least that "permissions violation" part to be extended with whether
it was PK or not.

Also, shouldn't we show the SGX bit too as some kind of "during SGX"
extension on the "in user/kernel space" part?

Linus

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature