Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp1714009imm; Thu, 21 Jun 2018 01:01:49 -0700 (PDT) X-Google-Smtp-Source: ADUXVKLQfaw97xe9wA8GGrjWm4lAEXFx7zrCKfC9EhnePonXk3st7uWIv8M64fpi7PMFt36HJfjO X-Received: by 2002:a62:1855:: with SMTP id 82-v6mr26339358pfy.132.1529568109343; Thu, 21 Jun 2018 01:01:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529568109; cv=none; d=google.com; s=arc-20160816; b=aUjjCeBOROkFB8oBrtSpYMeC5hQck+KT0/Z4julXE0P76AyzOYWB60qzqrQVTysD3g 6ut3LeWnASJ3EfwJSn14iFJog+hJvwW9zPwN9ut+sfVG7sjwSaOuhex+ClSshuni7Le9 K7lIGpQPYyKA7kIaop968vTu4no60rADeh1rQrawx28/N612+yWXRQJmDxkWia8D8NwY EA0RRId58FBVLFbe05k5TJwAdUg4oKlm/gso0LbYR3SfFeDaE2gaVrA1OF4dVKhlm3J2 vsNxQY/yQmlMismdgxZ5DoNoK9zpIgNksFSFyX7eHqeEVKIInHjodtQ7dW4cfVVpfW0D JRtw== 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=6OQxJL7dRUGV1PZscFRO3BT3f6gtAk63i40gpsWBu1Y=; b=AoT6YMYEQj/tMeiTlWiCJBuuZoj9MQeTN6lL1RI3B3Per8EnRc7wTfptSUTXIv/Wzl SavpsDk+B0xRopbbWdUfe22HdSRb+nPaiDuxFcOVHTz4CRR2e5Xz/RhuhfWx5ibcwkNY 4zBKQof4sUeZmUgW5joXDz2SeT89rvpwz7vdErogXVVvnFxDZiYomJLXfCHGHJdJU++9 p81vlimRy0j23NZiWUdiUbieichrXzO9RGQnYPS+4WQWcRsv60FArTnSzq9niXbdFdOO eMhcJlhbVt/Mh2fBEAmKY1ta+xVwr2IKcfb9BStBrrgy7Xfc3HovK3nwpZPH7KTu/M/C Xq2g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=DIKhaDGA; 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 c10-v6si1307779plr.398.2018.06.21.01.01.35; Thu, 21 Jun 2018 01:01:49 -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=DIKhaDGA; 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 S932617AbeFUH71 (ORCPT + 99 others); Thu, 21 Jun 2018 03:59:27 -0400 Received: from mail-pl0-f66.google.com ([209.85.160.66]:46824 "EHLO mail-pl0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932481AbeFUH70 (ORCPT ); Thu, 21 Jun 2018 03:59:26 -0400 Received: by mail-pl0-f66.google.com with SMTP id 30-v6so1225126pld.13 for ; Thu, 21 Jun 2018 00:59:26 -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=6OQxJL7dRUGV1PZscFRO3BT3f6gtAk63i40gpsWBu1Y=; b=DIKhaDGALKJGM2StUpZHmy3S8rCFq8J14y5K5n/pMfI2G23qFihTnuvIx/yen1bpo9 dRaH1PX4niQ1cRY8UvLjhUglJ90BLYqDd/d0ibB+pwidzvFHZyib2IQsv+nbjada5tP9 9oiLKyJZzg555gkGSWz/GeRpONROym9JpcAxPPtmT8/8a6R8976Y8ItSqrwx0G4z8pj8 VyYagUj+rre7UQXp1izQavKetZXtoTFY6oN1Tj3RB7M00GnoCrnhIHxv/HN2FFQfmnMo GnTqWjBRGPHQdHOTg307QAb25kSqJaqD7HY21282oxh0dCKdaZGB1ug1T6guilSrIIQN Smfg== 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=6OQxJL7dRUGV1PZscFRO3BT3f6gtAk63i40gpsWBu1Y=; b=ELHyoglQUqwj8YVV5ODU4+GcUBzMQtoeOlhsyjiJBxWxfOr8eGIqPaMpu/67dhP0p1 eds3L8U3BwZjyaXKyvT3trikKO1jwTOW0Sg//XBFUOHSADpfIvdIlY5IUGvR4rPPhYtj 6xxrPVjARCOYjShH0B+bXFlOy85rtae/Y8ZgRrvuOcHWTh2jHWjfG668vjbllJb62kDT uLmPWYgtAOZ7/WopUHGuMogF32Z0y53tdZ6L1X4eDDKD3eH5T0uJ1tLmj3VG63e+64T9 CRxdgrEocww1vZBmsvK4+iSIFB5jggBqtx4hg0yv53gJjEtREyTHx7dwOcJoyzWcr3Ce /BrQ== X-Gm-Message-State: APt69E0RlMO/+GWsdbCXMAUZjNp/tetn5wCAv5rTugirpNH58M9nNJPA T/hNrgJ96FrsnO6dcG9k7LYQ9MrGpVNvacIJm6ELvw== X-Received: by 2002:a17:902:8491:: with SMTP id c17-v6mr27037271plo.97.1529567965551; Thu, 21 Jun 2018 00:59:25 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a17:90a:de2:0:0:0:0 with HTTP; Thu, 21 Jun 2018 00:59:05 -0700 (PDT) In-Reply-To: References: <20180620125540.228766-1-dvyukov@gmail.com> From: Dmitry Vyukov Date: Thu, 21 Jun 2018 09:59:05 +0200 Message-ID: Subject: Re: [PATCH] arch/x86: get rid of KERN_CONT in show_fault_oops() To: Andy Shevchenko Cc: Dmitry Vyukov , Thomas Gleixner , Ingo Molnar , "maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT)" , Linux Kernel Mailing List , Sergey Senozhatsky 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 Thu, Jun 21, 2018 at 3:06 AM, Andy Shevchenko wrote: > On Wed, Jun 20, 2018 at 3:55 PM, 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. > >> + printk(KERN_ALERT "BUG: unable to handle kernel %s at %px\n", >> + (address < PAGE_SIZE ? "NULL pointer dereference" : >> + "paging request"), (void *) address); > > Perhaps pr_alert() ? It's the same, right? Make sense. > Btw, parens are redundant for the first argument. > > P.S. And personally I would rather do > if (address < PAGE_SIZE) > pr_alert(...NULL pointer dereference...); > else > pr_alert(...paging request...); It's kinda shorter this way. Any other opinions? pr_alert("BUG: unable to handle kernel %s at %px\n", address < PAGE_SIZE ? "NULL pointer dereference" : "paging request", (void *) address); vs: if (address < PAGE_SIZE) pr_alert("BUG: unable to handle kernel NULL pointer dereference at %px\n", (void *) address); else pr_alert("BUG: unable to handle kernel paging request at %px\n", (void *) address); Or, should we just do: pr_alert("BUG: unable to handle kernel paging request at %px\n", (void *) address); and not try to be too smart here? In the end, that can be a NULL deref with 5K offset, right?