Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp4807741imm; Tue, 26 Jun 2018 00:31:20 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJXoED2INBCajraB8GmFyAGMmxfA+vBKgGhQXNj1+Eoddr2cB7gKvKBjVoaWuETqQJ+MJZM X-Received: by 2002:a63:4244:: with SMTP id p65-v6mr354636pga.432.1529998280938; Tue, 26 Jun 2018 00:31:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529998280; cv=none; d=google.com; s=arc-20160816; b=l6ADXxtg5lY+uBhjun6LdHjqiqmqcxfZJumwolR7d8mLvogkbM1K9X3DohgmiK7okk IYzSwTvf+8u6P+wEoIO19JjO5xSqJs+yYEFd06Nxu9p0W9ZE09vnZnB+HXRCbcpNQrmy bL7V/wOreHi8VZYhHV39G5GKv8z540424URBZkEd+LKuh9HnZnl6zXngPZPeozjH2x9e PI8L5jYt1J+VdfZtVoIJTzYloCvuxflc+6kX0uf22MEh/5jzLysuHMsDtX8eZUbK2d92 7J7WxhtdI8zkwi8ZkSjWYqwR01iLpsk6CX/IA5zT6NvHlUucZ8vdx8C9Bk7gMjgoY+hx jnVA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=Kji7RF0GGvi/vq0AAXS5641GMsrm7cqdl5I2CNHoDRQ=; b=l12E7exuAAZtcPCR/rbpluRWXTHrY7YuH1N9xETWF2R32UIa9+T/WrlvbfT7kNj9hw kNh4q6sK/0VB2ILBrjbBWaA3tT/0j9udOATvOWveBhsOXvqdzud5xTTF3tCZox3J/FPm JVYfS0a42JJ2DPu/C+jBi9KepjFGKs34QD0P/5EYiFYjrurhDveJGyvtPJPHGiGdxRnU TJ/uk+dCZbKp0fL4ZtwnueVRYcOINGIp0ZW5ymhVxqaR06pg6kXZUGrsVirffHuU3hlp Lqz4vPjsyTnhK2MmqWZdSLCr3hMmfUJjiFz7rMn/gMgxQhZItQ2NEcLJuQYe0lPoBEQm BNGw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b="MnG/P/r8"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e6-v6si867433pgq.265.2018.06.26.00.31.05; Tue, 26 Jun 2018 00:31:20 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b="MnG/P/r8"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752430AbeFZHaN (ORCPT + 99 others); Tue, 26 Jun 2018 03:30:13 -0400 Received: from mail-pl0-f66.google.com ([209.85.160.66]:39122 "EHLO mail-pl0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751869AbeFZHaM (ORCPT ); Tue, 26 Jun 2018 03:30:12 -0400 Received: by mail-pl0-f66.google.com with SMTP id s24-v6so8130398plq.6 for ; Tue, 26 Jun 2018 00:30:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=Kji7RF0GGvi/vq0AAXS5641GMsrm7cqdl5I2CNHoDRQ=; b=MnG/P/r8/6ygdkfXt31jr3x/oZ6PlgaA7J/W4ldSHPmRH7j7HYmrC+r2uv7+zG/uus MdKVvHsYiQHB3DTFqLxAVY61AkJiCd8OVTTMtIE283Qgh+5YxuhwIqQQujHM67L1KGD3 96c5jycQQM2H1wd7V8ejawj+WzPF95S8+e9vBuInKcmPrmvEUbxA7NaILL5W+irgBUHs NbnXGT/pRpb7SJ3aLmLTXHEUYDqja/IZL0SW7TzomgXjZ2RUyMYPuk+e/yx8Fg10LGjT /y+dPjcIuaLvuO0XddQMA0tEnxNgixMczuVrS2rNtOJ/N/3ZnBLM3bWacN6qCh8x7zNw d38Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=Kji7RF0GGvi/vq0AAXS5641GMsrm7cqdl5I2CNHoDRQ=; b=Wz7QYaQEpM2otDTVRIIQMGRz1ojAUUEq8ZfT6bvnEeBPAzynWr+e0RJc5iQNEKNtr1 j+J9D0DDGJ5Yn4w5tEZVXdzZ0DTqdQ/meQw4XzhjBo7BgxW2GGXypSziXQd9UWvRjG5K ZxrMyYfQvP4C9du3Vn5iDTI6YukqWWxY1ctsVsQ/xCWR+C7ktqHZYQ9WPv0BuOEfBe2T J+r4t1b+lERc6saogJDevS7qe+KRVZO4lcQ25Gfp7GyfN8kBgJXjXhDq3thS3ymZbQWb AsIxpMCjKTZBp/MYFhmxG4IYrnaoNNlRn5MfzmKhqJzghAbId5UMsDS4Hmra3YE1rOzV lbjw== X-Gm-Message-State: APt69E02pbWzBkpP6uWw7cmoRkBN3s9vPnkHMeOqJpJTXJSzhuY3Dyj0 GGd/EdHmcnMf1V9P0w2xclC/CJG8SPS/nY5IhezmCw== X-Received: by 2002:a17:902:5a4d:: with SMTP id f13-v6mr422829plm.85.1529998211253; Tue, 26 Jun 2018 00:30:11 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a17:90a:de2:0:0:0:0 with HTTP; Tue, 26 Jun 2018 00:29:50 -0700 (PDT) In-Reply-To: References: <20180625123808.227417-1-dvyukov@gmail.com> From: Dmitry Vyukov Date: Tue, 26 Jun 2018 09:29:50 +0200 Message-ID: Subject: Re: [PATCH v2] arch/x86: get rid of KERN_CONT in show_fault_oops() To: Joe Perches Cc: Dmitry Vyukov , Thomas Gleixner , Ingo Molnar , "the arch/x86 maintainers" , LKML , Sergey Senozhatsky , Andy Shevchenko Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jun 25, 2018 at 5:03 PM, Joe Perches wrote: > On Mon, 2018-06-25 at 14:38 +0200, Dmitry Vyukov wrote: >> From: Dmitry Vyukov >> >> 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 >> >> --- >> >> 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.