lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 6 Dec 2018 17:47:10 +0100
From:   Ingo Molnar <mingo@...nel.org>
To:     Andy Lutomirski <luto@...capital.net>
Cc:     Sean Christopherson <sean.j.christopherson@...el.com>,
        Dave Hansen <dave.hansen@...ux.intel.com>,
        Andy Lutomirski <luto@...nel.org>,
        Peter Zijlstra <peterz@...radead.org>,
        Thomas Gleixner <tglx@...utronix.de>,
        Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
        x86@...nel.org, "H. Peter Anvin" <hpa@...or.com>,
        linux-kernel@...r.kernel.org,
        Linus Torvalds <torvalds@...ux-foundation.org>,
        Rik van Riel <riel@...riel.com>,
        Yu-cheng Yu <yu-cheng.yu@...el.com>
Subject: Re: [PATCH] x86/mm/fault: Streamline the fault error_code decoder
 some more


* Andy Lutomirski <luto@...capital.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ