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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 6 Dec 2018 09:05:11 -0800
From:   Andy Lutomirski <luto@...capital.net>
To:     Ingo Molnar <mingo@...nel.org>
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



> On Dec 6, 2018, at 8:47 AM, Ingo Molnar <mingo@...nel.org> wrote:
> 
> 
> * 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. 
> 
> 

That’s why I suggested “read,” in lowercase, for reads.  Other than that, most of the unset bits are uninteresting. An OOPS is so likely to be a kernel fault that it’s barely worth mentioning, and I even added a whole separate diagnostic for user oopses.  Similarly, I don’t think we need to remind the reader that an oops wasn’t an SGX error or that it wasn’t a PK error.  So I think my idea highlights the interesting bits and avoids distraction from the uninteresting bits.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ