Re: [PATCH] x86/mm/fault: Streamline the fault error_code decoder some more

2018-12-06 Thread Linus Torvalds
On Thu, Dec 6, 2018 at 12:28 PM Andy Lutomirski wrote: > > "read" isn't an actual bit in the error code, so I thought it would be > polite to make it look a little bit different. If you care about the bits in the error code, then just look at the number. And if you care about what the numbers

Re: [PATCH] x86/mm/fault: Streamline the fault error_code decoder some more

2018-12-06 Thread Linus Torvalds
On Thu, Dec 6, 2018 at 12:28 PM Andy Lutomirski wrote: > > "read" isn't an actual bit in the error code, so I thought it would be > polite to make it look a little bit different. If you care about the bits in the error code, then just look at the number. And if you care about what the numbers

Re: [PATCH] x86/mm/fault: Streamline the fault error_code decoder some more

2018-12-06 Thread Andy Lutomirski
On Thu, Dec 6, 2018 at 12:24 PM Linus Torvalds wrote: > > On Thu, Dec 6, 2018 at 11:07 AM Andy Lutomirski wrote: > > > > How do you like the attached patch? > > I agree with whoever thought it's odd that "read" is in lower case > when everything else is in upper case. "read" isn't an actual bit

Re: [PATCH] x86/mm/fault: Streamline the fault error_code decoder some more

2018-12-06 Thread Andy Lutomirski
On Thu, Dec 6, 2018 at 12:24 PM Linus Torvalds wrote: > > On Thu, Dec 6, 2018 at 11:07 AM Andy Lutomirski wrote: > > > > How do you like the attached patch? > > I agree with whoever thought it's odd that "read" is in lower case > when everything else is in upper case. "read" isn't an actual bit

Re: [PATCH] x86/mm/fault: Streamline the fault error_code decoder some more

2018-12-06 Thread Linus Torvalds
On Thu, Dec 6, 2018 at 11:07 AM Andy Lutomirski wrote: > > How do you like the attached patch? I agree with whoever thought it's odd that "read" is in lower case when everything else is in upper case. And honestly, I'd just siggest making the err_text simply have the real user/kernel difference

Re: [PATCH] x86/mm/fault: Streamline the fault error_code decoder some more

2018-12-06 Thread Linus Torvalds
On Thu, Dec 6, 2018 at 11:07 AM Andy Lutomirski wrote: > > How do you like the attached patch? I agree with whoever thought it's odd that "read" is in lower case when everything else is in upper case. And honestly, I'd just siggest making the err_text simply have the real user/kernel difference

Re: [PATCH] x86/mm/fault: Streamline the fault error_code decoder some more

2018-12-06 Thread Andy Lutomirski
On Thu, Dec 6, 2018 at 10:15 AM Linus Torvalds wrote: > > On Wed, Dec 5, 2018 at 11:34 PM Ingo Molnar wrote: > > > > Yeah, so I don't like the overly long 'SUPERVISOR' and the somewhat > > inconsistent, sporadic handling of negatives. Here's our error code bits: > > > > /* > > * Page fault

Re: [PATCH] x86/mm/fault: Streamline the fault error_code decoder some more

2018-12-06 Thread Andy Lutomirski
On Thu, Dec 6, 2018 at 10:15 AM Linus Torvalds wrote: > > On Wed, Dec 5, 2018 at 11:34 PM Ingo Molnar wrote: > > > > Yeah, so I don't like the overly long 'SUPERVISOR' and the somewhat > > inconsistent, sporadic handling of negatives. Here's our error code bits: > > > > /* > > * Page fault

Re: [PATCH] x86/mm/fault: Streamline the fault error_code decoder some more

2018-12-06 Thread Linus Torvalds
On Wed, Dec 5, 2018 at 11:34 PM Ingo Molnar wrote: > > Yeah, so I don't like the overly long 'SUPERVISOR' and the somewhat > inconsistent, sporadic handling of negatives. Here's our error code bits: > > /* > * Page fault error code bits: > * > * bit 0 ==0: no page found 1:

Re: [PATCH] x86/mm/fault: Streamline the fault error_code decoder some more

2018-12-06 Thread Linus Torvalds
On Wed, Dec 5, 2018 at 11:34 PM Ingo Molnar wrote: > > Yeah, so I don't like the overly long 'SUPERVISOR' and the somewhat > inconsistent, sporadic handling of negatives. Here's our error code bits: > > /* > * Page fault error code bits: > * > * bit 0 ==0: no page found 1:

Re: [PATCH] x86/mm/fault: Streamline the fault error_code decoder some more

2018-12-06 Thread Ingo Molnar
* Andy Lutomirski wrote: > 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.

Re: [PATCH] x86/mm/fault: Streamline the fault error_code decoder some more

2018-12-06 Thread Ingo Molnar
* Andy Lutomirski wrote: > 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.

Re: [PATCH] x86/mm/fault: Streamline the fault error_code decoder some more

2018-12-06 Thread Andy Lutomirski
> On Dec 6, 2018, at 8:47 AM, Ingo Molnar wrote: > > > * Andy Lutomirski 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

Re: [PATCH] x86/mm/fault: Streamline the fault error_code decoder some more

2018-12-06 Thread Andy Lutomirski
> On Dec 6, 2018, at 8:47 AM, Ingo Molnar wrote: > > > * Andy Lutomirski 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

Re: [PATCH] x86/mm/fault: Streamline the fault error_code decoder some more

2018-12-06 Thread Ingo Molnar
* Andy Lutomirski 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

Re: [PATCH] x86/mm/fault: Streamline the fault error_code decoder some more

2018-12-06 Thread Ingo Molnar
* Andy Lutomirski 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

Re: [PATCH] x86/mm/fault: Streamline the fault error_code decoder some more

2018-12-06 Thread Andy Lutomirski
> On Dec 6, 2018, at 7:53 AM, Sean Christopherson > wrote: > >> On Thu, Dec 06, 2018 at 08:34:09AM +0100, Ingo Molnar wrote: >> I like your '!' idea, but with a further simplification: how about using >> '-/+' differentiation and a single character and a fixed-length message. >> >> The

Re: [PATCH] x86/mm/fault: Streamline the fault error_code decoder some more

2018-12-06 Thread Andy Lutomirski
> On Dec 6, 2018, at 7:53 AM, Sean Christopherson > wrote: > >> On Thu, Dec 06, 2018 at 08:34:09AM +0100, Ingo Molnar wrote: >> I like your '!' idea, but with a further simplification: how about using >> '-/+' differentiation and a single character and a fixed-length message. >> >> The

Re: [PATCH] x86/mm/fault: Streamline the fault error_code decoder some more

2018-12-06 Thread Ingo Molnar
* Sean Christopherson wrote: > On Thu, Dec 06, 2018 at 08:34:09AM +0100, Ingo Molnar wrote: > > I like your '!' idea, but with a further simplification: how about using > > '-/+' differentiation and a single character and a fixed-length message. > > > > The new output will be lines of: > >

Re: [PATCH] x86/mm/fault: Streamline the fault error_code decoder some more

2018-12-06 Thread Ingo Molnar
* Sean Christopherson wrote: > On Thu, Dec 06, 2018 at 08:34:09AM +0100, Ingo Molnar wrote: > > I like your '!' idea, but with a further simplification: how about using > > '-/+' differentiation and a single character and a fixed-length message. > > > > The new output will be lines of: > >

Re: [PATCH] x86/mm/fault: Streamline the fault error_code decoder some more

2018-12-06 Thread Sean Christopherson
On Thu, Dec 06, 2018 at 08:34:09AM +0100, Ingo Molnar wrote: > I like your '!' idea, but with a further simplification: how about using > '-/+' differentiation and a single character and a fixed-length message. > > The new output will be lines of: > > #PF error code: -P -W -U -S -I -K (0x00)

Re: [PATCH] x86/mm/fault: Streamline the fault error_code decoder some more

2018-12-06 Thread Sean Christopherson
On Thu, Dec 06, 2018 at 08:34:09AM +0100, Ingo Molnar wrote: > I like your '!' idea, but with a further simplification: how about using > '-/+' differentiation and a single character and a fixed-length message. > > The new output will be lines of: > > #PF error code: -P -W -U -S -I -K (0x00)

[PATCH] x86/mm/fault: Streamline the fault error_code decoder some more

2018-12-05 Thread Ingo Molnar
* Sean Christopherson wrote: > ...instead of manually handling the case where error_code=0, e.g. to > display "[SUPERVISOR] [READ]" instead of "normal kernel read fault". > > This makes the zero case consistent with all other messages and also > provides additional information for other error

[PATCH] x86/mm/fault: Streamline the fault error_code decoder some more

2018-12-05 Thread Ingo Molnar
* Sean Christopherson wrote: > ...instead of manually handling the case where error_code=0, e.g. to > display "[SUPERVISOR] [READ]" instead of "normal kernel read fault". > > This makes the zero case consistent with all other messages and also > provides additional information for other error