Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp918976ybl; Wed, 11 Dec 2019 09:30:57 -0800 (PST) X-Google-Smtp-Source: APXvYqxISs991gVIWuf2gqeSdfBRhoPev/lfQq5eXGjlsDg806vpdjHfcgcQI1CXEVx/SxSzMEAW X-Received: by 2002:aca:4cc7:: with SMTP id z190mr3867073oia.10.1576085457368; Wed, 11 Dec 2019 09:30:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576085457; cv=none; d=google.com; s=arc-20160816; b=I0VNfmFF71gCCtEXeOjXYQW7l94qHRjPicyGPXD32iZSgkIA3Jy6TpVEwM38lQBXnl s3RME+Rt48ogFKIlVfGdJjgpxmagg7BG3sPoFnKGkXjsue3be5m5ZwZVAP54RqLp68sx vQGlmurMLDo0nMVSUnHcweq+bYeFjsUo6av0F01g1Vcb9g3bryAKcbkOGVxJgadJ1+CX X0jId+ezKbzp25F1NLsQNg0Q1DZ3z5dZxyoVkaL4uocGIywi/HnfcQUhMVoN8YlBDxgQ lh97HXMV6Lqodyh2hzcVZzrDfJm5pfhKttTrrXs7OmOx8ME8quPRKFHC2OROaa0TMIdo DQDg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=8aesE0e4I0F9DuRAYP1dhgNCcsnczB3N1jlspP6j4Fw=; b=eHIuL29Xz6qDGa+I2pHZNlVtbzFh2Z1MaCXjDjDUXkZRJhtKLgzXlxe7IRI83n2O/X D3RG8rj9AewfocxuJC6R6G56tXssx43ZQu7Qr8zPJIRmVIrFpzHwKx2/ESuZVyXaLwoh zte/++67g0e7hwxr0+OUGTF8zxYXUMCeRpAEthVoxvWM3/4REv6FE5H4HJoOZxwrEjrp sDFlx3DCFd3C+IX90MHzbh6nNydOBdC2RP0wQFDvrjdhK1w3Z0xPjkVq4lL6m0EcsZW2 K3s2L3M9fIieBGpgdmbrDshe6rTkdVNKxa560z8+nHNrtT8vhvyNfvsl2vglPdwwWLZu k7fw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=h0neVSvp; 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=NONE sp=NONE dis=NONE) header.from=alien8.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d22si1482493ote.229.2019.12.11.09.30.44; Wed, 11 Dec 2019 09:30:57 -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=@alien8.de header.s=dkim header.b=h0neVSvp; 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=NONE sp=NONE dis=NONE) header.from=alien8.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730962AbfLKR3w (ORCPT + 99 others); Wed, 11 Dec 2019 12:29:52 -0500 Received: from mail.skyhub.de ([5.9.137.197]:55098 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726368AbfLKR3w (ORCPT ); Wed, 11 Dec 2019 12:29:52 -0500 Received: from zn.tnic (p200300EC2F094900329C23FFFEA6A903.dip0.t-ipconnect.de [IPv6:2003:ec:2f09:4900:329c:23ff:fea6:a903]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.skyhub.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id F213C1EC0591; Wed, 11 Dec 2019 18:29:50 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1576085391; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=8aesE0e4I0F9DuRAYP1dhgNCcsnczB3N1jlspP6j4Fw=; b=h0neVSvpKg6qKZv3VUOUWlhz3b8IiUkJ7c4PBVtdMV1q6zWbDKm8oBx3jE/rFSCGylDK0z 7AF9lYcQrMAycZwXZ2BnuKv7hjeStQD+hSRmgdx2C++fDuXNwbPPIOiXtsmtuPitQ5tTR0 OWzG38FrhhK3FLtTb1dr0+sH2MPKl/g= Date: Wed, 11 Dec 2019 18:29:45 +0100 From: Borislav Petkov To: Andy Lutomirski Cc: Jann Horn , Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , x86@kernel.org, Andrey Ryabinin , Alexander Potapenko , Dmitry Vyukov , kasan-dev@googlegroups.com, linux-kernel@vger.kernel.org, Andrey Konovalov , Andy Lutomirski , Sean Christopherson Subject: Re: [PATCH v6 2/4] x86/traps: Print address on #GP Message-ID: <20191211172945.GE14821@zn.tnic> References: <20191211170632.GD14821@zn.tnic> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) 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 09:22:30AM -0800, Andy Lutomirski wrote: > Could we spare a few extra bytes to make this more readable? I can never keep track of which number is the oops count, which is the cpu, and which is the error code. How about: > > OOPS 1: general protection blah blah blah (CPU 0) > > and put in the next couple lines “#GP(0)”. Well, right now it is: [ 2.470492] general protection fault, probably for non-canonical address 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. 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... -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette