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]
Message-ID: <CACT4Y+bPa+YDmftYTCqD0vsdg4HN44mexG4SXxA8TcABhtvDDA@mail.gmail.com>
Date:   Tue, 26 Jun 2018 09:29:50 +0200
From:   Dmitry Vyukov <dvyukov@...gle.com>
To:     Joe Perches <joe@...ches.com>
Cc:     Dmitry Vyukov <dvyukov@...il.com>,
        Thomas Gleixner <tglx@...utronix.de>,
        Ingo Molnar <mingo@...hat.com>,
        "the arch/x86 maintainers" <x86@...nel.org>,
        LKML <linux-kernel@...r.kernel.org>,
        Sergey Senozhatsky <sergey.senozhatsky.work@...il.com>,
        Andy Shevchenko <andy.shevchenko@...il.com>
Subject: Re: [PATCH v2] arch/x86: get rid of KERN_CONT in show_fault_oops()

On Mon, Jun 25, 2018 at 5:03 PM, Joe Perches <joe@...ches.com> wrote:
> On Mon, 2018-06-25 at 14:38 +0200, Dmitry Vyukov wrote:
>> From: Dmitry Vyukov <dvyukov@...gle.com>
>>
>> KERN_CONT leads to split lines in kernel output
>> and complicates useful changes to printk like
>> printing context before each line.
>>
>> Only acceptable use of continuations is basically
>> boot-time testing.
>>
>> Get rid of it.
>>
>> Signed-off-by: Dmitry Vyukov <dvyukov@...gle.com>
>>
>> ---
>>
>> Changes since v1:
>>  - use pr_alert() instead of printk(KERN_ALERT)
>> ---
>>  arch/x86/mm/fault.c | 10 +++-------
>>  1 file changed, 3 insertions(+), 7 deletions(-)
>>
>> diff --git a/arch/x86/mm/fault.c b/arch/x86/mm/fault.c
> []
>> @@ -671,13 +671,9 @@ show_fault_oops(struct pt_regs *regs, unsigned long error_code,
>>                       printk(smep_warning, from_kuid(&init_user_ns, current_uid()));
>>       }
>>
>> -     printk(KERN_ALERT "BUG: unable to handle kernel ");
>> -     if (address < PAGE_SIZE)
>> -             printk(KERN_CONT "NULL pointer dereference");
>> -     else
>> -             printk(KERN_CONT "paging request");
>> -
>> -     printk(KERN_CONT " at %px\n", (void *) address);
>> +     pr_alert("BUG: unable to handle kernel %s at %px\n",
>> +             (address < PAGE_SIZE ? "NULL pointer dereference" :
>> +             "paging request"), (void *) address);
>
> Perhaps remove the used-once KERN_CRIT uses of
> nx_warning and smep_warning strings and maybe the
> unnecessary parentheses and spaces used here too.


Mailed v3 with both changes.

Andy actually already pointed to parentheses in v1 but I forgot about it in v2.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ