Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp969507ybl; Wed, 11 Dec 2019 10:18:48 -0800 (PST) X-Google-Smtp-Source: APXvYqwh4NbdrQ06BRQ6OhBCo57BEiZbsURwCYEf38TxrEXaZP7YBpreeudA7H7c5p2Q430CDUtq X-Received: by 2002:aca:b04:: with SMTP id 4mr3664369oil.151.1576088327917; Wed, 11 Dec 2019 10:18:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576088327; cv=none; d=google.com; s=arc-20160816; b=MNB6yFpkagnPip0wJ424jWwl7eLrgmGi4dbi3xLYpUquR6c0jL5oDqPViUyC0Sx0wp my/Mk6jV5UEmt6xzd67s4aqXoBf5dLSStwN2OjzkNofK8C0MEmdKuT1LaMK5hx0HMgjg pCky6pr1ShTgRpSQyOIQgQnKTAsg+jewBQTrYAwd9TJSDAChC4s3++RseYlYToUd3Cx5 Rw8wWo2JqJfCPYcm32mzqqKxxmtaDGu5IoOW/sXNYNlQCB+jgkA6QACK0hQg730mEx5E LDP2rTer0boIJeE2isrvFVVc8fu+UTyJs1avqTeBzY3tJEHyLpDBbpLIkp0Sa34NbTGO uMGA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=gdbdOJGDr6s2TB3vkGkLojy6hKiZ0+eS72V/GX35qQM=; b=mOO40TUPXqBTNcx7jskSMZzxStc51x5T1iubQnO34VZOiWn2x4dFzXaf7hFpLu4pjm ZU7iaxVAHyVgyAaWT42mFCX5mvBlKn1RmbnzOcu5UdV5h2z/NYhhGTQeDM5mY5k15tEl PDf+lDX5etZfCSjENCicrdtdCXhnL7xzXIXwSL9ln+zIcpVr5Gq/fiJXS3tcbAr8yf1h CmpSOTJHkW7IpuOhX4/11IL5/W7wER0qnp+Ua6e521wyHM5F8hJQ4QFIqBkWsNGCglJc VHTdfo/rXUexle2x66qhL3loQlvRF4vko9CGnt5o1dK8xwN8sZRKoHlmskg1DDpKOBkk j1Hg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amacapital-net.20150623.gappssmtp.com header.s=20150623 header.b=g44yxhTp; 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 m85si1594528oig.158.2019.12.11.10.18.35; Wed, 11 Dec 2019 10:18:47 -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=@amacapital-net.20150623.gappssmtp.com header.s=20150623 header.b=g44yxhTp; 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 S1731278AbfLKSRj (ORCPT + 99 others); Wed, 11 Dec 2019 13:17:39 -0500 Received: from mail-wm1-f67.google.com ([209.85.128.67]:38251 "EHLO mail-wm1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726411AbfLKSRi (ORCPT ); Wed, 11 Dec 2019 13:17:38 -0500 Received: by mail-wm1-f67.google.com with SMTP id p17so8045656wmi.3 for ; Wed, 11 Dec 2019 10:17:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amacapital-net.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=gdbdOJGDr6s2TB3vkGkLojy6hKiZ0+eS72V/GX35qQM=; b=g44yxhTp8JdnuxE9OcIrpnMwYX/4KkBpg/3xgew18mzg4Xaqb7jyrdjlRCxZRniDTM i8C0/tzDKBo7wRNB/6DaNihgzh2GJ0IFWEJHOTseCRdDOwFl/UEb9aznheriv/ZzzhH8 0EPPEOZmsFEbFt5ZeiRyUmi7eaOj4GSrbaVNgqaipJp4WfJ4RBOSSWVBs1Uy2SS0bi4h KpgGZYQCUQdXw3gb2TvgFU027R8KuKh40IeQbYrhfbU50FstnGdaUC2zaTa/mSMdbR15 QKWEB3uvbYV2YeUEKO6GHbtov+vhkhmA2Nwfi5sgH3JRjarkHI1DZt0+GaWb/IBdrM0T AKwA== 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:content-transfer-encoding; bh=gdbdOJGDr6s2TB3vkGkLojy6hKiZ0+eS72V/GX35qQM=; b=BQ2asSWVZDFDjFct4tjZz/FHLxbaF21jdChv2BEov9qstlO9QaJaMlA8mmbPuodp5p KCEJredJJ1eQz4iKeao0o0jZ82qztDXb1iwu/wLdl0isJCEHU9yBHiG/BXASPw/vnfFL 6tzJDcFa5jUsVqTB/W2qPJscDgHXrpN2cDPj085i4fWv8zJBLM40VPlumT65i6SyJwSK Jb4V5NwTBQbkoa2scIH2ds0vyXEdoTC1p504VVLX5WWj1CB2Kg5ygGLR25IjJm15U0cK xMBLM9KEccBvVnHTqCINWNNt4mTkqMHm5REBLFmG5rjaSHiIrSdvVpObas8zVCN4VG7B e6BQ== X-Gm-Message-State: APjAAAUjmyFrYyEVNOOqmP5ZALjvPdIahn5c7em77sAkXk3RoZsB8/fC jip1yxzeiq0maB2Gw5hdxHagO+VavB4UvbRUfE2O2A== X-Received: by 2002:a1c:2083:: with SMTP id g125mr1260281wmg.89.1576088256672; Wed, 11 Dec 2019 10:17:36 -0800 (PST) MIME-Version: 1.0 References: <20191211170632.GD14821@zn.tnic> <20191211172945.GE14821@zn.tnic> In-Reply-To: <20191211172945.GE14821@zn.tnic> From: Andy Lutomirski Date: Wed, 11 Dec 2019 10:17:25 -0800 Message-ID: Subject: Re: [PATCH v6 2/4] x86/traps: Print address on #GP To: Borislav Petkov Cc: Jann Horn , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , X86 ML , Andrey Ryabinin , Alexander Potapenko , Dmitry Vyukov , kasan-dev , LKML , Andrey Konovalov , Andy Lutomirski , Sean Christopherson Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Dec 11, 2019 at 9:29 AM Borislav Petkov wrote: > > On Wed, Dec 11, 2019 at 09:22:30AM -0800, Andy Lutomirski wrote: > > Could we spare a few extra bytes to make this more readable? I can nev= er keep track of which number is the oops count, which is the cpu, and whic= h is the error code. How about: > > > > OOPS 1: general protection blah blah blah (CPU 0) > > > > and put in the next couple lines =E2=80=9C#GP(0)=E2=80=9D. > > Well, right now it is: > > [ 2.470492] general protection fault, probably for non-canonical addre= ss 0xdfff000000000001: 0000 [#1] PREEMPT SMP > [ 2.471615] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 5.5.0-rc1+ #6 > > and the CPU is on the second line, the error code is before the number - > [#1] - in that case. > > If we pull the number in front, we can do: > > [ 2.470492] [#1] general protection fault, probably for non-canonical = address 0xdfff000000000001: 0000 PREEMPT SMP > [ 2.471615] [#1] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 5.5.0-rc1+ = #6 > > and this way you know that the error code is there, after the first > line's description. Hmm, I like that. > > I guess we can do: > > [ 2.470492] [#1] general protection fault, probably for non-canonical = address 0xdfff000000000001 Error Code: 0000 PREEMPT SMP > > to make it even more explicit... I like this too. > > -- > Regards/Gruss, > Boris. > > https://people.kernel.org/tglx/notes-about-netiquette --=20 Andy Lutomirski AMA Capital Management, LLC