public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@kernel.org>
To: Andy Lutomirski <luto@amacapital.net>
Cc: Sean Christopherson <sean.j.christopherson@intel.com>,
	Dave Hansen <dave.hansen@linux.intel.com>,
	Andy Lutomirski <luto@kernel.org>,
	Peter Zijlstra <peterz@infradead.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
	x86@kernel.org, "H. Peter Anvin" <hpa@zytor.com>,
	linux-kernel@vger.kernel.org,
	Linus Torvalds <torvalds@linux-foundation.org>,
	Rik van Riel <riel@surriel.com>,
	Yu-cheng Yu <yu-cheng.yu@intel.com>
Subject: Re: [PATCH] x86/mm/fault: Streamline the fault error_code decoder some more
Date: Thu, 6 Dec 2018 17:47:10 +0100	[thread overview]
Message-ID: <20181206164710.GA119529@gmail.com> (raw)
In-Reply-To: <C1F7477E-70B1-4F26-9457-EA6D825501A6@amacapital.net>


* Andy Lutomirski <luto@amacapital.net> wrote:

> > vs. (with SGX added as 'G' for testing purposes)
> > 
> > [    0.158849] #PF error code(0001):  +P !W !U !S !I !K !G
> > [    0.159292] #PF error code(0003):  +P +W !U !S !I !K !G
> > [    0.159742] #PF error code(0007):  +P +W +U !S !I !K !G
> > [    0.160190] #PF error code(0025):  +P !W +U !S !I +K !G
> > [    0.160638] #PF error code(0002):  !P +W !U !S !I !K !G
> > [    0.161087] #PF error code(0004):  !P !W +U !S !I !K !G
> > [    0.161538] #PF error code(0006):  !P +W +U !S !I !K !G
> > [    0.161992] #PF error code(0014):  !P !W +U !S +I !K !G
> > [    0.162450] #PF error code(0011):  +P !W !U !S +I !K !G
> > [    0.162667] #PF error code(8001):  +P !W !U !S !I !K +G
> > [    0.162667] #PF error code(8003):  +P +W !U !S !I !K +G
> > [    0.162667] #PF error code(8007):  +P +W +U !S !I !K +G
> > [    0.162667] #PF error code(8025):  +P !W +U !S !I +K +G
> > [    0.162667] #PF error code(8002):  !P +W !U !S !I !K +G
> > [    0.162667] #PF error code(8004):  !P !W +U !S !I !K +G
> > [    0.162667] #PF error code(8006):  !P +W +U !S !I !K +G
> > [    0.162667] #PF error code(8014):  !P !W +U !S +I !K +G
> > [    0.162667] #PF error code(8011):  +P !W !U !S +I !K +G
> > [    0.162667] #PF error code(0000):  !P !W !U !S !I !K !G
> > 
> 
> Please don’t. The whole reason I added the decoding was to make it easy 
> to read without a cheat sheet. This is incomprehensible without 
> reference to the code, and I’m familiar with it to begin with.

Dunno, I can deduct the meaning from the above abbreviations without a 
cheat sheet and I'm sure you'll be able to too from now on. All the 
letters are very obvious references - to me at least, and brevity and 
predictable, fixed-length output matters.

> How about:
> 
> #PF error code: 0001 [PROT read kernel]
> 
> #PF error code: 0001 [PROT WRITE kernel]
> 
> #PF error code: 0001 [PROT read kernel]
> 
> #PF error code: 8011 [PROT INSTR kernel SGX]
> 
> This has no noise from unset bits except that we add lowercase “read” 
> or “kernel” as appropriate.  Even “kernel” seems barely necessary.

The thing is, the 'noise' from unset bits is actually important 
information as well - at least for the major bits: it was a mostly random 
choice that Intel defined '1' for write access and not for read access. 

Thanks,

	Ingo

  reply	other threads:[~2018-12-06 16:47 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-05 16:36 [PATCH] x86/fault: Print "SUPERVISOR" and "READ" when decoding #PF oops Sean Christopherson
2018-12-05 19:27 ` Randy Dunlap
2018-12-05 19:35   ` Linus Torvalds
2018-12-06  7:34 ` [PATCH] x86/mm/fault: Streamline the fault error_code decoder some more Ingo Molnar
2018-12-06 15:53   ` Sean Christopherson
2018-12-06 16:23     ` Ingo Molnar
2018-12-06 16:39     ` Andy Lutomirski
2018-12-06 16:47       ` Ingo Molnar [this message]
2018-12-06 17:05         ` Andy Lutomirski
2018-12-06 17:36           ` Ingo Molnar
2018-12-06 18:15   ` Linus Torvalds
2018-12-06 19:06     ` Andy Lutomirski
2018-12-06 20:24       ` Linus Torvalds
2018-12-06 20:28         ` Andy Lutomirski
2018-12-06 20:39           ` Linus Torvalds
2018-12-07 18:44             ` [PATCH] x86/fault: Decode and print #PF oops in human readable form Sean Christopherson
2018-12-07 18:52               ` Linus Torvalds
2018-12-07 19:18                 ` Sean Christopherson
2018-12-07 19:52               ` [PATCH v2] " Sean Christopherson
2018-12-07 20:46                 ` Linus Torvalds
2018-12-07 22:06                   ` Sean Christopherson
2018-12-07 22:14                     ` Linus Torvalds
2018-12-07 23:57                       ` Andy Lutomirski
2018-12-10 16:04                         ` Sean Christopherson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20181206164710.GA119529@gmail.com \
    --to=mingo@kernel.org \
    --cc=bp@alien8.de \
    --cc=dave.hansen@linux.intel.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luto@amacapital.net \
    --cc=luto@kernel.org \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=riel@surriel.com \
    --cc=sean.j.christopherson@intel.com \
    --cc=tglx@linutronix.de \
    --cc=torvalds@linux-foundation.org \
    --cc=x86@kernel.org \
    --cc=yu-cheng.yu@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox