Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp11152914imu; Thu, 6 Dec 2018 12:25:41 -0800 (PST) X-Google-Smtp-Source: AFSGD/Vu2WarX2SbJ/nZTvuCHPhHbW5xU8VCWnagEXV4DY7fC8028VjngEe0/Rbi/LJsKLXhOWGP X-Received: by 2002:a17:902:6bc7:: with SMTP id m7mr30299576plt.106.1544127941869; Thu, 06 Dec 2018 12:25:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544127941; cv=none; d=google.com; s=arc-20160816; b=xCagdKVZQ+j4e8xV8Tq6GVVuq9hyMHkCrsFChccIclRprf+rJKo/e0D0NXFvnup7Ym ak8kkqj0NaOasSboutYUbTRQMvYVp6JGMPnXn2wkRgRAHjwSRwIDooZg/DlWRn2g1KJ0 bREppIMhlCk2dTwIj278IATtq3XP5vF+yv2Y1KWO91C1LfyOWLXYUfGjB57GFF2C5V59 U3rwhYfOjAm6LSAHOa7qokyIQbQiLQnrOF4oy9RCMuWvIE2XkPBtaJF1kzdwOQvrRNsW Cm/oHSMS1wXh4QjEekKIF+nXDwGHCwWs0t4PP4KWGVBJjU/B55C6ATuZHXmCyu6vyAa9 kQlA== 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 :in-reply-to:references:mime-version:dkim-signature; bh=/Pn3nYNOWgA2vXqZK4nu66QPs+PB21QR2Ap68HqFHX8=; b=vWq0Y0IpkSJZ90HRlwB9wwGnxL1/CZGhMBKmUcMrD9zepchYMMQHT+ExA8hrV8U0HB 4+w3Yl6RvQdHl0jLTagw+3ECuggGaOvQCnSG1ZAwdLaRGHBNH7B+BwYe5aMNwrU7MRBC P3f00sYOGqwmlTG0eiO0QokxxAgjRUhe1nEQMbJEDQae2EAD9MUNwpzFO4mxf325ElJz gXTjEOxcUPXi0HtUfjkoD9U9Wqd1F+i3c3OKW4MBrJkHTKEMOSy1c3xvStYD1BLrjxEL 5hQ92cHfA9E/QadXZ00g7CzQv+NdulJq1FGeAyaDniJ+M60MCFlx+pPM1vXxGACGWxJv MUvA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=Z9CaXbx7; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h19si1054864plr.67.2018.12.06.12.25.25; Thu, 06 Dec 2018 12:25:41 -0800 (PST) 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=@linux-foundation.org header.s=google header.b=Z9CaXbx7; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726050AbeLFUYV (ORCPT + 99 others); Thu, 6 Dec 2018 15:24:21 -0500 Received: from mail-lj1-f195.google.com ([209.85.208.195]:45496 "EHLO mail-lj1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725928AbeLFUYV (ORCPT ); Thu, 6 Dec 2018 15:24:21 -0500 Received: by mail-lj1-f195.google.com with SMTP id s5-v6so1561059ljd.12 for ; Thu, 06 Dec 2018 12:24:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=/Pn3nYNOWgA2vXqZK4nu66QPs+PB21QR2Ap68HqFHX8=; b=Z9CaXbx7QAxEUGtrMzNXA6cNU7T3nFalFngJTv4WwWOsQ3yg21PsOO7FZDRJJ/xfD6 eNq43ngSidoH7zo1xrYTvp6IfHQLsbGKBQnJSJtWjKs4dr4o5fkeQtXzKT07DTQ+tdlC z2sBAb67zq3UxS6g2LlJdeET4rXBh1NcTCdz0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=/Pn3nYNOWgA2vXqZK4nu66QPs+PB21QR2Ap68HqFHX8=; b=Os+wXT0AzPN8MThS8oJLEoLdjfmdTgMZHoKX6g5hyf/HN1qxdOIV7U8j0UEenVoAlx LHeNShc0cUD1cQqa/d84+dbnSDcO+qcC5jwNef/y1iT1D6pAs+aj5vi4FFsSXk2uTQur iTyu1qVO9yKRzln8YZuP2OT64Oh9uBI90ivyd8pz7nDzTiTHNJ7Vh4/NqALeskAOy8Ac pJv16SzeJ19npvhp3+GM+Uq0c/QGlMckVs0EvpxUbpAegPov0AL/oIgik7JzaMmoJGt6 crorP4n7BSOYaiExeS+r2mWT5oCvp0V3LVgWen4l1yyUMuE7KOvo6ivsNfo/up5JQD0l Sa7g== X-Gm-Message-State: AA+aEWZrGpPypMuzbzzValBrhm+raf5B27FMxTeeCL7WHluCsCkSCj5P +47UsJ/iOsYHpl2g3uTGlsiUMPLIMZo= X-Received: by 2002:a2e:95c6:: with SMTP id y6-v6mr18725238ljh.59.1544127858862; Thu, 06 Dec 2018 12:24:18 -0800 (PST) Received: from mail-lj1-f180.google.com (mail-lj1-f180.google.com. [209.85.208.180]) by smtp.gmail.com with ESMTPSA id f29sm237466lfa.46.2018.12.06.12.24.17 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 06 Dec 2018 12:24:17 -0800 (PST) Received: by mail-lj1-f180.google.com with SMTP id k15-v6so1582682ljc.8 for ; Thu, 06 Dec 2018 12:24:17 -0800 (PST) X-Received: by 2002:a2e:994:: with SMTP id 142-v6mr17101613ljj.120.1544127857077; Thu, 06 Dec 2018 12:24:17 -0800 (PST) MIME-Version: 1.0 References: <20181205163624.1842-1-sean.j.christopherson@intel.com> <20181206073409.GA64887@gmail.com> In-Reply-To: From: Linus Torvalds Date: Thu, 6 Dec 2018 12:24:00 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] x86/mm/fault: Streamline the fault error_code decoder some more To: Andrew Lutomirski Cc: Ingo Molnar , sean.j.christopherson@intel.com, dave.hansen@linux.intel.com, Peter Zijlstra , Thomas Gleixner , Ingo Molnar , bp@alien8.de, "the arch/x86 maintainers" , Peter Anvin , Linux List Kernel Mailing , Rik van Riel , yu-cheng.yu@intel.com 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, 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 in it too, using something like pr_alert("#PF error: 0x%04lx%s from %s mode\n", error_code, err_txt, user_mode(regs) ? "user" : "kernel" ); The "oh, PF_USER and user_mode differs, so let's point that out explicitly" thing is a good thing regardless. Linus